/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #f57224;
    --primary-dark: #e55c00;
    --secondary: #2a55a5;
    --dark: #212121;
    --light: #f8f9fa;
    --gray: #9e9e9e;
    --light-gray: #e0e0e0;
    --border: #e0e0e0;
    --success: #4caf50;
    --danger: #f44336;
    --warning: #ff9800;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

body {
    background-color: #f5f7fa;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 10px 16px;
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 0.85rem;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 8px 14px;
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
    font-size: 0.8rem;
}

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

/* Header Styles */
.top-bar {
    background: var(--dark);
    color: white;
    padding: 8px 0;
    font-size: 0.85rem;
    display: none;
}

.top-links {
    display: flex;
    justify-content: space-between;
}

.top-right-links {
    display: flex;
    gap: 20px;
}

.top-links a {
    color: #ccc;
    transition: var(--transition);
}

.top-links a:hover {
    color: white;
}

.main-header {
    background: white;
    padding: 12px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    flex-shrink: 0;
    order: 1;
}

.logo:hover {
    transform: scale(1.05);
}

.logo span {
    color: var(--secondary);
}

.mobile-search-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--dark);
    padding: 5px;
    order: 4;
}

.search-box {
    display: flex;
    align-items: center;
    border: 2px solid var(--primary);
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    margin: 10px 0;
    transition: var(--transition);
    order: 5;
    flex: 1 1 100%;
}

.search-box.active {
    display: flex;
}

.search-category {
    position: relative;
    background: var(--light-gray);
    padding: 0 12px;
    border-right: 1px solid var(--border);
    display: none;
}

.search-category select {
    border: none;
    background: transparent;
    padding: 10px 5px 10px 0;
    outline: none;
    cursor: pointer;
    appearance: none;
    font-size: 0.9rem;
    width: 120px;
}

.search-category i {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    pointer-events: none;
}

.search-box input {
    flex: 1;
    border: none;
    padding: 10px 12px;
    outline: none;
    font-size: 0.95rem;
}

.search-btn {
    background: var(--primary);
    color: white;
    padding: 10px 16px;
    transition: var(--transition);
    flex-shrink: 0;
}

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

.header-actions {
    display: flex;
    gap: 8px;
    order: 2;
    align-items: center;
}

.header-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 5px 6px;
    border-radius: 4px;
    position: relative;
    min-width: 40px;
}

.header-action-item:hover {
    background: var(--light-gray);
}

.header-action-item i {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.header-action-item span {
    font-size: 0.7rem;
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -3px;
    right: 3px;
    background: var(--secondary);
    color: white;
    font-size: 0.65rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.mobile-menu {
    display: block;
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
    order: 3;
    padding: 5px;
    margin-left: auto;
}

.mobile-menu:hover {
    color: var(--primary);
}

.main-nav {
    background: white;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-links {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-width: max-content;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-links a {
    font-weight: 500;
    transition: var(--transition);
    padding: 6px 10px;
    position: relative;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    font-size: 0.85rem;
    border-radius: 4px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
    background: rgba(245, 114, 36, 0.1);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
}

/* Hero Slider */
.hero-slider {
    padding: 15px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
}

.slider-container {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    height: 220px;
}

.slider-wrapper {
    position: relative;
    height: 100%;
    width: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: translateX(100%);
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
}

.slide.previous {
    transform: translateX(-100%);
}

.slide-content {
    max-width: 70%;
    color: white;
    z-index: 2;
    animation: fadeInUp 0.8s ease;
    padding-right: 10px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide h1 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    line-height: 1.3;
    font-weight: 700;
}

.slide p {
    font-size: 0.85rem;
    margin-bottom: 15px;
    opacity: 0.9;
    line-height: 1.4;
}

.slide-image {
    width: 30%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: zoomIn 0.8s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.slide-image img {
    max-width: 100%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
/*
.slider-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 8px;
    transform: translateY(-50%);
    z-index: 10;
} */

.slider-prev, .slider-next {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(5px);
    font-size: 0.9rem;
}

.slider-prev:hover, .slider-next:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.slider-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

/* Flash Sale */
.flash-sale {
    padding: 25px 0;
    background: white;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-size: 1.3rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sale-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff3e0;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ffcc80;
    font-size: 0.8rem;
}

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

.timer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--primary);
    color: white;
    padding: 3px 6px;
    border-radius: 4px;
    min-width: 30px;
}

.timer-item span:first-child {
    font-weight: 700;
    font-size: 0.9rem;
}

.timer-item span:last-child {
    font-size: 0.55rem;
}

.view-all {
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
    font-size: 0.85rem;
}

.view-all:hover {
    gap: 8px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.flash-products .product-card {
    border: 2px solid #ffcc80;
    position: relative;
    overflow: hidden;
}

.flash-products .product-card::before {
    content: 'FLASH SALE';
    position: absolute;
    top: 8px;
    left: -28px;
    background: var(--danger);
    color: white;
    padding: 3px 25px;
    font-size: 0.55rem;
    font-weight: 700;
    transform: rotate(-45deg);
    z-index: 2;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    height: 130px;
    overflow: hidden;
    position: relative;
}

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

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

.product-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--primary);
    color: white;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    z-index: 1;
}

.product-info {
    padding: 10px;
}

.product-title {
    font-size: 0.85rem;
    margin-bottom: 5px;
    font-weight: 600;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
}

.original-price {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 0.75rem;
}

.discount {
    background: #ffebee;
    color: var(--danger);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}

.stars {
    color: #ffc107;
    font-size: 0.75rem;
}

.rating-count {
    color: var(--gray);
    font-size: 0.7rem;
}

/* Product Actions - FIXED */
.product-actions {
    display: flex;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.product-actions button {
    flex: 1;
    padding: 8px 6px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
}

.add-to-cart {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}

.add-to-cart:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.wishlist-btn {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

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

/* Categories */
.categories {
    padding: 30px 0;
    background: white;
}

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

.category-item {
    background: var(--light);
    border-radius: 8px;
    padding: 15px 8px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border);
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.category-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 1rem;
    color: var(--primary);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.category-item:hover .category-icon {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.category-item h3 {
    font-size: 0.75rem;
}

/* Banner Section */
.banner-section {
    padding: 25px 0;
}

.banner-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.banner-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 150px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.banner-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.banner-item.large {
    grid-row: span 1;
}

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

.banner-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 15px;
    background: linear-gradient(to right, rgba(0,0,0,0.7), transparent);
    color: white;
}

.banner-content h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.banner-content p {
    margin-bottom: 10px;
    opacity: 0.9;
    font-size: 0.8rem;
}

/* Recommended Products */
.recommended-products {
    padding: 25px 0;
    background: white;
}

/* Brands Section */
.brands-section {
    padding: 25px 0;
    background: var(--light);
}

.brands-slider {
    overflow: hidden;
    position: relative;
}

.brands-track {
    display: flex;
    gap: 15px;
    animation: scrollBrands 30s linear infinite;
}

@keyframes scrollBrands {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.brand-item {
    flex: 0 0 auto;
    width: 100px;
    height: 50px;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.brand-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.brand-item img {
    max-width: 100%;
    max-height: 100%;
    filter: grayscale(100%);
    transition: var(--transition);
}

.brand-item:hover img {
    filter: grayscale(0%);
}

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 30px 0;
    text-align: center;
}

.newsletter h2 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.newsletter p {
    max-width: 600px;
    margin: 0 auto 15px;
    opacity: 0.9;
    font-size: 0.85rem;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.newsletter-input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    outline: none;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 30px 0 15px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.footer-section h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    position: relative;
    padding-bottom: 6px;
}

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

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul a {
    color: #b0b7c3;
    transition: var(--transition);
    font-size: 0.8rem;
}

.footer-section ul a:hover {
    color: white;
    padding-left: 3px;
}

.app-download {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.app-store, .google-play {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 10px;
    border-radius: 6px;
    transition: var(--transition);
}

.app-store:hover, .google-play:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.app-store i, .google-play i {
    font-size: 1rem;
}

.app-store div, .google-play div {
    display: flex;
    flex-direction: column;
}

.app-store span, .google-play span {
    font-size: 0.65rem;
}

.app-store strong, .google-play strong {
    font-size: 0.8rem;
}

.payment-methods h4 {
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.payment-icons {
    display: flex;
    gap: 10px;
    font-size: 1rem;
    color: #b0b7c3;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #b0b7c3;
    font-size: 0.75rem;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-links {
    display: flex;
    gap: 12px;
}

.footer-links a {
    color: #b0b7c3;
    transition: var(--transition);
    font-size: 0.75rem;
}

.footer-links a:hover {
    color: white;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    z-index: 1100;
    display: flex;
    flex-direction: column;
}

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

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
}

.cart-header h2 {
    font-size: 1.2rem;
}

.close-cart {
    background: none;
    font-size: 1.2rem;
    color: var(--gray);
    transition: var(--transition);
}

.close-cart:hover {
    color: var(--dark);
    transform: rotate(90deg);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.empty-cart {
    text-align: center;
    padding: 25px 0;
    color: var(--gray);
}

.empty-cart i {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.5;
}

.empty-cart p {
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.cart-item {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

.cart-item-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.quantity-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.75rem;
}

.quantity-btn:hover {
    background: var(--light-gray);
}

.quantity {
    margin: 0 6px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    font-size: 0.85rem;
}

.remove-item {
    color: var(--gray);
    background: none;
    margin-left: auto;
    transition: var(--transition);
    font-size: 0.85rem;
}

.remove-item:hover {
    color: var(--primary);
}

.cart-footer {
    padding: 12px 15px;
    border-top: 1px solid var(--border);
}

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

.checkout-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.checkout-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.checkout-btn:hover::before {
    left: 100%;
}

.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: 1050;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

/* RESPONSIVE BREAKPOINTS */

/* Small phones (320px - 575px) */
@media (min-width: 320px) {
    .slider-container {
        height: 240px;
    }
    
    .slide h1 {
        font-size: 1.4rem;
    }
    
    .slide p {
        font-size: 0.9rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    }
    
    .product-title {
        font-size: 0.9rem;
        height: 38px;
    }
}

/* Medium phones (576px - 767px) */
@media (min-width: 576px) {
    .container {
        padding: 0 20px;
    }
    
    .header-container {
        gap: 15px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .search-box {
        margin: 0;
        order: 2;
        flex: 1;
    }
    
    .header-actions {
        order: 3;
        gap: 12px;
    }
    
    .mobile-menu {
        order: 4;
    }
    
    .mobile-search-toggle {
        display: none;
    }
    
    .slider-container {
        height: 280px;
    }
    
    .slide {
        padding: 0 20px;
    }
    
    .slide h1 {
        font-size: 1.6rem;
    }
    
    .slide p {
        font-size: 1rem;
    }
    
    .slider-controls {
        padding: 0 12px;
    }
    
    .slider-prev, .slider-next {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 15px;
    }
    
    .banner-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .banner-item {
        height: 180px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .cart-sidebar {
        width: 320px;
        right: -320px;
    }
}

/* Tablets (768px - 991px) */
@media (min-width: 768px) {
    .top-bar {
        display: block;
    }
    
    .main-header {
        padding: 15px 0;
    }
    
    .header-container {
        flex-wrap: nowrap;
    }
    
    .search-category {
        display: block;
    }
    
    .mobile-menu {
        display: none;
    }
    
    .header-actions {
        display: flex;
    }
    
    .nav-links {
        gap: 20px;
        padding: 12px 0;
        overflow-x: visible;
    }
    
    .nav-links a {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    
    .slider-container {
        height: 320px;
    }
    
    .slide {
        padding: 0 30px;
    }
    
    .slide h1 {
        font-size: 2rem;
    }
    
    .slide p {
        font-size: 1.1rem;
    }
    
    .slider-controls {
        padding: 0 20px;
    }
    
    .slider-prev, .slider-next {
        width: 42px;
        height: 42px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    }
    
    .banner-grid {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 15px;
    }
    
    .banner-item {
        height: 200px;
    }
    
    .banner-content {
        padding: 20px;
    }
    
    .banner-content h3 {
        font-size: 1.2rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 30px;
    }
}

/* Small desktops (992px - 1199px) */
@media (min-width: 992px) {
    .search-box {
        max-width: 500px;
    }
    
    .slide h1 {
        font-size: 2.3rem;
    }
    
    .slide p {
        font-size: 1.2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
        gap: 20px;
    }
    
    .product-image {
        height: 170px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .category-item {
        padding: 20px 10px;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .banner-item {
        height: 220px;
    }
    
    .cart-sidebar {
        width: 380px;
        right: -380px;
    }
}

/* Large desktops (1200px and up) */
@media (min-width: 1200px) {
    .container {
        padding: 0 15px;
    }
    
    .slider-container {
        height: 420px;
    }
    
    .slide h1 {
        font-size: 2.6rem;
    }
    
    .slide p {
        font-size: 1.3rem;
    }
    
    .search-box {
        max-width: 600px;
    }
}

/* Mobile-specific fixes for Add to Cart button */
@media (max-width: 480px) {
    .product-actions button {
        padding: 7px 5px;
        font-size: 0.7rem;
        gap: 3px;
    }
}

@media (max-width: 400px) {
    .product-actions button {
        padding: 6px 4px;
        font-size: 0.65rem;
        gap: 2px;
    }
    
    .add-to-cart .btn-text,
    .wishlist-btn .btn-text {
        display: none;
    }
    

    
    .wishlist-btn::after {
        content: "Wish";
    }
}

@media (max-width: 360px) {
    .product-actions button {
        padding: 5px 3px;
        font-size: 0.6rem;
        gap: 2px;
    }
    
    
    .wishlist-btn::after {
        content: "♥";
    }
}
