/* assets/css/style.css - Main stylesheet */

:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --success-color: #2ecc71;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    background: #f8f9fa;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #2980b9;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5rem 0;
    margin-top: -1.5rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero .lead {
    font-size: 1.5rem;
    opacity: 0.95;
}

/* Product Cards */
.product-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.product-card img {
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card .card-body {
    padding: 1.5rem;
}

.product-card .card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-card .card-text {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Product Detail Page */
.product-detail-image {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.product-detail-image:hover {
    transform: scale(1.02);
}

.product-price {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: bold;
}

.product-description {
    line-height: 1.8;
    color: #555;
}

/* Cart Page */
.cart-table img {
    border-radius: 8px;
}

.cart-table td {
    vertical-align: middle;
}

.cart-quantity-input {
    width: 80px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Checkout Page */
.checkout-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.order-summary {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 20px;
}

/* Category Badges */
.category-badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    margin: 0.25rem;
    background: var(--light-color);
    border-radius: 25px;
    color: var(--dark-color);
    transition: all 0.3s;
    font-weight: 500;
}

.category-badge:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(52,152,219,0.3);
}

/* Buttons */
.btn {
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-success {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-success:hover {
    background-color: #27ae60;
    border-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    animation: slideIn 0.5s;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Footer */
footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0;
    margin-top: 4rem;
}

footer a {
    color: rgba(255,255,255,0.7);
    transition: color 0.3s;
}

footer a:hover {
    color: white;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    z-index: 99;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

#backToTop:hover {
    background: #2980b9;
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .lead {
        font-size: 1.2rem;
    }
    
    .product-card img {
        height: 200px;
    }
    
    .cart-table {
        font-size: 0.9rem;
    }
    
    .cart-quantity-input {
        width: 60px;
    }
    
    .order-summary {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
    
    .product-price {
        font-size: 2rem;
    }
}

/* Admin Panel Specific */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
}

.sidebar a {
    color: #ecf0f1;
    padding: 15px 20px;
    display: block;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar a:hover {
    background: #34495e;
    border-left-color: #3498db;
}

.sidebar a.active {
    background: #3498db;
    border-left-color: #fff;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.stat-icon {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 3rem;
    opacity: 0.2;
}

/* Status Badges */
.status-badge {
    padding: 0.35rem 0.65rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-pending { background: var(--warning-color); color: white; }
.status-processing { background: var(--info-color); color: white; }
.status-shipped { background: #9b59b6; color: white; }
.status-delivered { background: var(--success-color); color: white; }

/* Custom Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}