* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #F85606;
    --primary-dark: #E64500;
    --secondary: #FFF2E6;
    --dark: #222;
    --light: #f5f5f5;
    --gray: #999;
    --text: #333;
    --white: #fff;
    --blue: #007BFF;
    --light-blue: #E6F7FF;
    --red: #FF3E00;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    background-color: #f8f8f8;
    color: var(--text);
    padding-top: 80px;
    position: relative;
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 15px 5%;
}

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

.logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.search-bar {
    flex-grow: 1;
    max-width: 600px;
    margin: 0 20px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 20px;
    border-radius: 30px;
    border: 1px solid #ddd;
    font-size: 16px;
    outline: none;
}

.search-bar button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    background: var(--primary-dark);
}

.nav-icons {
    display: flex;
    gap: 20px;
}

.nav-icon {
    position: relative;
    font-size: 22px;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

.nav-icon:hover {
    color: var(--primary);
}

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

/* Hero Section */
.hero {
    padding: 40px 5%;
    background: linear-gradient(135deg, #ff9d00 0%, #ff6600 100%);
    color: var(--white);
    text-align: center;
    margin-bottom: 40px;
    border-radius: 0 0 20px 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

.btn {
    display: inline-block;
    background: var(--white);
    color: var(--primary);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Categories Section */
.section {
    padding: 40px 5%;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--text);
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-card {
    background: var(--light);
    border-radius: 10px;
    padding: 25px 15px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border: 2px solid var(--primary);
}

.category-icon {
    font-size: 40px;
    margin-bottom: 15px;
    color: var(--primary);
}

.category-name {
    font-size: 18px;
    font-weight: 600;
}

/* Flash Sale */
.flash-sale {
    background: var(--secondary);
    padding: 40px 5%;
    margin: 40px 0;
}

.sale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.timer {
    display: flex;
    gap: 10px;
}

.timer-box {
    background: var(--dark);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 18px;
    min-width: 60px;
    text-align: center;
}

.timer-label {
    font-size: 14px;
    text-align: center;
    margin-top: 5px;
    color: var(--text);
}

.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

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

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

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

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 600;
}

.product-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 10px;
}

.product-price .old {
    color: var(--gray);
    text-decoration: line-through;
    font-size: 16px;
    margin-left: 5px;
}

.product-actions {
    display: flex;
    justify-content: space-between;
}

.action-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-btn:hover {
    background: var(--primary-dark);
}

.wishlist {
    background: transparent;
    color: var(--gray);
    border: 1px solid #ddd;
}

.wishlist:hover {
    color: var(--red);
    border-color: var(--red);
}

.wishlist.active {
    color: var(--red);
    border-color: var(--red);
}

/* Banner Ad */
.banner-ad {
    margin: 40px 5%;
    background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
    border-radius: 15px;
    padding: 30px;
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.banner-content {
    max-width: 60%;
}

.banner-content h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.banner-content p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.promo-code {
    background: rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 20px;
}

/* Newsletter */
.newsletter {
    background: var(--light-blue);
    padding: 60px 5%;
    text-align: center;
    margin: 60px 0;
}

.newsletter h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.newsletter p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 30px;
    color: #666;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 30px 0 0 30px;
    font-size: 16px;
    outline: none;
}

.newsletter-form button {
    background: var(--blue);
    color: var(--white);
    border: none;
    border-radius: 0 30px 30px 0;
    padding: 0 30px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: #0069d9;
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 5% 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    text-decoration: underline;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--white);
    font-size: 18px;
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
    color: #999;
    font-size: 14px;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100%;
    background: var(--white);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1100;
    transition: var(--transition);
    padding: 20px;
    overflow-y: auto;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.cart-title {
    font-size: 1.5rem;
    color: var(--text);
}

.close-cart {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: var(--transition);
}

.close-cart:hover {
    color: var(--red);
}

.cart-items {
    margin-bottom: 30px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 10px;
}

.cart-item-actions {
    display: flex;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    background: var(--light);
    border: none;
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
}

.quantity {
    width: 40px;
    text-align: center;
}

.remove-btn {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    margin-left: 10px;
    transition: var(--transition);
}

.remove-btn:hover {
    color: var(--red);
}

.cart-total {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.checkout-btn:hover {
    background: var(--primary-dark);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Product Modal */
.product-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 1000px;
    background: var(--white);
    border-radius: 15px;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 30px;
    display: flex;
    gap: 30px;
}

.product-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
}

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

.modal-content {
    flex: 1;
}

.modal-title {
    font-size: 2rem;
    margin-bottom: 15px;
}

.modal-price {
    font-size: 1.8rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 20px;
}

.modal-description {
    line-height: 1.6;
    margin-bottom: 25px;
    color: #666;
}

.modal-actions {
    display: flex;
    gap: 15px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--red);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #4CAF50;
    color: var(--white);
    padding: 15px 25px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 1200;
    transform: translateX(150%);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .categories, .products {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
    }
    
    .search-bar {
        order: 3;
        margin: 15px 0 0;
        max-width: 100%;
    }
    
    .categories, .products {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .banner-ad {
        flex-direction: column;
        text-align: center;
    }
    
    .banner-content {
        max-width: 100%;
        margin-bottom: 30px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .product-modal {
        flex-direction: column;
        max-height: 90vh;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .categories, .products {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .newsletter-form input {
        border-radius: 30px;
    }
    
    .newsletter-form button {
        border-radius: 30px;
        padding: 12px;
    }
}