/* Reset et variables */
:root {
    --primary-color: #008080;
    --secondary-color: #FF6B35;
    --dark-color: #1a1a1a;
    --light-color: #f4f4f4;
    --accent-blue: #00A8E8;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --text-color: #333;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--dark-color) 0%, #2c2c2c 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--box-shadow);
}

.header-top {
    background: var(--primary-color);
    padding: 8px 0;
    text-align: center;
    font-size: 14px;
}

.header-main {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-blue), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 24px;
}

.logo-text h1 {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

.logo-text span {
    font-size: 12px;
    color: var(--secondary-color);
}

/* Navigation mobile */
.mobile-menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: block;
}

.nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark-color);
    padding: 20px;
    box-shadow: var(--box-shadow);
}

.nav-menu.active {
    display: block;
}

.nav-menu ul {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 15px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-menu a:hover {
    background: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.cart-icon {
    position: relative;
    color: white;
    text-decoration: none;
    font-size: 24px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--primary-color) 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.hero h2 {
    font-size: 42px;
    margin-bottom: 10px;
    animation: fadeInUp 1s ease;
}

.hero .tagline {
    font-size: 20px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
}

.hero p {
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 30px;
    animation: fadeInUp 1s ease 0.4s;
    animation-fill-mode: both;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    animation: fadeInUp 1s ease 0.6s;
    animation-fill-mode: both;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255,107,53,0.4);
}

.btn-primary {
    background: var(--accent-blue);
}

.btn-primary:hover {
    box-shadow: 0 5px 15px rgba(0,168,232,0.4);
}

/* Categories */
.categories {
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    margin: 10px auto;
    border-radius: 2px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.category-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
    height: 300px;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 30px 20px 20px;
    color: white;
}

.category-overlay h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

.category-overlay p {
    font-size: 14px;
    opacity: 0.9;
}

/* Products */
.products {
    padding: 50px 20px;
    background: var(--light-color);
}

.products-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: #f8f8f8;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--primary-color);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 5px;
}

.product-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.add-to-cart {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
}

.add-to-cart:hover {
    background: #218838;
    transform: scale(1.05);
}

/* Features */
.features {
    padding: 50px 20px;
    background: white;
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: var(--border-radius);
    background: var(--light-color);
    transition: var(--transition);
}

.feature-card:hover {
    background: white;
    box-shadow: var(--box-shadow);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 30px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.feature-card p {
    color: #666;
    font-size: 14px;
}

/* Cart Page */
.cart-page {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.cart-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.cart-header {
    background: var(--dark-color);
    color: white;
    padding: 20px;
    font-size: 24px;
    font-weight: bold;
}

.cart-items {
    padding: 20px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr 100px 100px 80px;
    gap: 20px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info h4 {
    margin-bottom: 5px;
    color: var(--dark-color);
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: bold;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: white;
}

.qty-input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 5px;
}

.remove-item {
    color: var(--danger-color);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
}

.cart-summary {
    background: var(--light-color);
    padding: 30px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 16px;
}

.summary-row.total {
    font-size: 24px;
    font-weight: bold;
    color: var(--dark-color);
    border-top: 2px solid var(--primary-color);
    padding-top: 15px;
    margin-top: 15px;
}

/* Checkout */
.checkout-page {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.checkout-form {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,128,128,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 50px 20px 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 20px;
}

.footer-section p,
.footer-section a {
    color: #ccc;
    text-decoration: none;
    line-height: 2;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
}

/* Admin Panel */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    background: var(--dark-color);
    color: white;
    padding: 20px;
    overflow-y: auto;
}

.admin-sidebar h2 {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
}

.admin-menu {
    list-style: none;
}

.admin-menu li {
    margin-bottom: 10px;
}

.admin-menu a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.admin-menu a:hover,
.admin-menu a.active {
    background: var(--primary-color);
}

.admin-content {
    margin-left: 250px;
    padding: 30px;
    background: var(--light-color);
    min-height: 100vh;
}

.admin-header {
    background: white;
    padding: 20px 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
}

.stat-card h3 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-card p {
    color: #666;
    font-size: 14px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-main {
        flex-wrap: wrap;
    }
    
    .logo-text h1 {
        font-size: 22px;
    }
    
    .hero h2 {
        font-size: 28px;
    }
    
    .hero .tagline {
        font-size: 16px;
    }
    
    .categories-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 10px;
    }
    
    .cart-item-price,
    .quantity-control {
        grid-column: 2;
    }
    
    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
        z-index: 1001;
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
    }
}

@media (min-width: 769px) {
    .nav-menu {
        display: flex !important;
        position: static;
        background: transparent;
        padding: 0;
        box-shadow: none;
    }
    
    .nav-menu ul {
        display: flex;
        gap: 20px;
    }
    
    .nav-menu li {
        margin-bottom: 0;
    }
    
    .mobile-menu-btn {
        display: none;
    }
}

/* Utilities */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }

/* Alert messages */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    animation: fadeInUp 0.5s ease;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 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;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}