/* Reset and Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2874f0;
    --secondary-color: #ff9f00;
    --text-color: #212121;
    --text-light: #878787;
    --border-color: #e0e0e0;
    --bg-light: #f1f3f6;
    --success-color: #388e3c;
    --error-color: #d32f2f;
    --white: #ffffff;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 8px rgba(0,0,0,0.15);
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    background: var(--primary-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 20px;
}

.logo h1 {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 500;
}

.logo span {
    color: var(--secondary-color);
    font-style: italic;
}

.search-box {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 50px 12px 16px;
    border: none;
    border-radius: 2px;
    font-size: 14px;
    outline: none;
}

.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    padding: 0 16px;
    background: var(--secondary-color);
    border: none;
    color: var(--white);
    cursor: pointer;
    border-radius: 0 2px 2px 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 30px;
}

.account, .more, .cart {
    position: relative;
    cursor: pointer;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.3s;
}

.account:hover, .more:hover {
    background: rgba(255,255,255,0.1);
}

.cart {
    background: var(--white);
    color: var(--primary-color);
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--error-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Dropdowns */
.account-dropdown, .more-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    min-width: 180px;
    box-shadow: var(--shadow-hover);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 100;
}

.account:hover .account-dropdown,
.more:hover .more-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-dropdown ul, .more-dropdown ul {
    list-style: none;
    padding: 8px 0;
}

.account-dropdown li, .more-dropdown li {
    padding: 0;
}

.account-dropdown a, .more-dropdown a {
    display: block;
    padding: 12px 16px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
}

.account-dropdown a:hover, .more-dropdown a:hover {
    background: var(--bg-light);
}

/* Navigation */
.navbar {
    background: var(--white);
    border-top: 1px solid var(--border-color);
}

.nav-links {
    display: flex;
    list-style: none;
    justify-content: space-around;
    padding: 0;
    margin: 0;
}

.nav-links li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 10px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links li a:hover {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 15px;
}

/* Hero Banner */
.hero-banner {
    position: relative;
    margin-bottom: 30px;
}

.banner-slider {
    position: relative;
    height: 280px;
    overflow: hidden;
    border-radius: 8px;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50px;
    transform: translateY(-50%);
    color: var(--white);
    z-index: 2;
}

.banner-content h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.banner-content p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #e68900;
    transform: translateY(-2px);
}

.banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.prev-btn, .next-btn {
    background: rgba(255,255,255,0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.prev-btn:hover, .next-btn:hover {
    background: var(--white);
    transform: scale(1.1);
}

/* Sections */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    text-align: center;
    color: var(--text-color);
}

.categories, .featured-products, .deals-section {
    margin-bottom: 50px;
}

.categories {
    background: var(--white);
    padding: 40px 0;
    border-radius: 8px;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.category-card p {
    color: var(--success-color);
    font-weight: 500;
}

/* Product Grid */
.featured-products {
    background: var(--white);
    padding: 40px 0;
    border-radius: 8px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--error-color);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.wishlist-btn, .quick-view-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.wishlist-btn:hover, .quick-view-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-color);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.product-rating .fas {
    color: var(--secondary-color);
    font-size: 14px;
}

.product-rating .far {
    color: var(--border-color);
    font-size: 14px;
}

.product-rating span {
    font-size: 14px;
    color: var(--text-light);
    margin-left: 5px;
}

.product-price {
    margin-bottom: 15px;
}

.current-price {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    margin-right: 10px;
}

.original-price {
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
    margin-right: 10px;
}

.discount {
    font-size: 14px;
    color: var(--success-color);
    font-weight: 500;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.add-to-cart-btn:hover {
    background: #e68900;
}

/* Deals Section */
.deals-section {
    background: var(--white);
    padding: 40px 0;
    border-radius: 8px;
}

.deals-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.deals-banner h2 {
    font-size: 1.8rem;
    color: var(--text-color);
}

.deals-timer {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
}

.timer {
    display: flex;
    gap: 10px;
}

.time-unit {
    text-align: center;
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 4px;
}

.time-unit span {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
}

.time-unit label {
    font-size: 12px;
    opacity: 0.8;
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.deal-card {
    display: flex;
    background: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.deal-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.deal-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.deal-info {
    padding: 20px;
    flex: 1;
}

.deal-info h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.deal-discount {
    color: var(--error-color);
    font-weight: 600;
    margin-bottom: 5px;
}

.deal-price {
    color: var(--text-light);
    font-size: 14px;
}

/* Footer */
.footer {
    background: var(--text-color);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    color: var(--white);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-methods h4 {
    margin-bottom: 10px;
    font-size: 14px;
}

.payment-icons {
    display: flex;
    gap: 15px;
}

.payment-icons i {
    font-size: 1.5rem;
    color: #ccc;
}

.footer-text p {
    font-size: 14px;
    color: #ccc;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--white);
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 2000;
    transition: right 0.3s;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.item-details {
    flex: 1;
}

.item-details h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.item-details p {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-item {
    background: none;
    border: none;
    color: var(--error-color);
    cursor: pointer;
    font-size: 1.2rem;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    margin-bottom: 15px;
    text-align: right;
}

.cart-total p {
    font-size: 1.2rem;
    font-weight: 600;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: var(--success-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-actions {
        gap: 20px;
    }
    
    .banner-content h2 {
        font-size: 2rem;
    }
    
    .deals-banner {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box {
        order: -1;
        max-width: 100%;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .banner-content {
        left: 20px;
        right: 20px;
        text-align: center;
    }
    
    .banner-content h2 {
        font-size: 1.5rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .deals-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .header-actions {
        gap: 15px;
    }
    
    .account span, .more span {
        display: none;
    }
    
    .banner-content h2 {
        font-size: 1.2rem;
    }
    
    .banner-content p {
        font-size: 1rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .timer {
        flex-wrap: wrap;
        justify-content: center;
    }
}
