/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.logo-image {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: brightness(1.1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.logo:hover .logo-image {
    filter: brightness(1.2) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .logo-image {
        height: 40px;
    }
}

@media (max-width: 480px) {
    .logo-image {
        height: 35px;
    }
}

.logo i {
    font-size: 1.8rem;
}

/* Header Search */
.header-search {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}

.header-search input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.header-search button {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

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

.nav-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-dark);
    cursor: pointer;
    position: relative;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

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

.cart-count, .wishlist-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

.wishlist-count {
    background-color: var(--danger-color);
}

.wishlist-count.hidden {
    display: none;
}

/* User Dropdown Menu */
.user-menu-wrapper {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1002;
    overflow: hidden;
}

.user-dropdown.hidden {
    display: none;
}

.user-dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

.user-dropdown-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.user-dropdown-phone {
    font-size: 0.85rem;
    color: var(--text-light);
}

.user-dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
}

.user-dropdown-menu li a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.user-dropdown-menu li a i {
    width: 18px;
    text-align: center;
}

.user-dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

.user-dropdown-logout {
    color: var(--danger-color) !important;
}

.user-dropdown-logout:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

.hamburger-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
    display: none;
}

.hamburger-btn:hover {
    color: var(--primary-color);
}

/* Side Navigation */
.side-nav {
    position: fixed;
    left: -350px;
    top: 0;
    width: 350px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: var(--shadow-xl);
    transition: left 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.side-nav.active {
    left: 0;
}

.side-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
}

.side-nav-header h3 {
    font-size: 1.5rem;
    margin: 0;
}

.close-side-nav {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--white);
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.close-side-nav:hover {
    transform: rotate(90deg);
}

.side-nav-content {
    flex: 1;
    padding: 1rem 0;
}

.side-nav-user {
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-bottom: 2px solid var(--border-color);
}

.side-nav-user .user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.side-nav-user .user-info div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.side-nav-user .user-info strong {
    font-size: 1.1rem;
    color: var(--text-dark);
}

.side-nav-user .divider {
    height: 1px;
    background-color: var(--border-color);
    margin-top: 1rem;
}

.side-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-nav-menu > li {
    border-bottom: 1px solid var(--border-color);
}

.side-nav-menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.side-nav-menu a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding-left: 2rem;
}

.side-nav-menu a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.has-submenu {
    justify-content: space-between;
}

.toggle-icon {
    transition: transform 0.3s ease;
    margin-left: auto;
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: var(--bg-light);
}

.submenu.active {
    max-height: 500px;
}

.submenu li {
    border-bottom: 1px solid var(--border-color);
}

.submenu a {
    padding: 0.875rem 1.5rem 0.875rem 3.5rem;
    font-size: 0.95rem;
}

.submenu a:hover {
    padding-left: 4rem;
}

/* Side Nav Filters */
.side-nav-filters {
    padding: 1.5rem;
    border-top: 2px solid var(--border-color);
    background-color: var(--bg-light);
    margin-top: 1rem;
}

.side-nav-filters h4 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.side-nav-filters h4 i {
    color: var(--primary-color);
}

.filter-group {
    margin-bottom: 1.25rem;
}

.filter-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.side-nav-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: var(--white);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.side-nav-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-clear-filters {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

/* Hero Banner Carousel */
.hero-banners {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.banners-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.banner-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
}

.banner-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 2rem;
}

.banner-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-description {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.banner-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    font-size: 1.5rem;
}

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

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: white;
    width: 30px;
    border-radius: 6px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 3;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

/* Old Hero Styles (kept for backward compatibility) */
.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background-color: #d97706;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-add-cart {
    background-color: var(--primary-color);
    color: var(--white);
    width: 100%;
    justify-content: center;
}

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

.btn-buy-now {
    background-color: #f97316;
    color: var(--white);
    width: 100%;
    justify-content: center;
    font-weight: 600;
}

.btn-buy-now:hover {
    background-color: #ea580c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Categories Section */
.categories {
    padding: 5rem 0;
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

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

.category-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.category-card p {
    color: var(--text-light);
}

/* Products Section */
.products {
    padding: 5rem 0;
}

/* Filter Section */
.filter-section {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-box input {
    flex: 1;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-box button {
    padding: 0.875rem 2rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

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

.filter-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: var(--white);
    cursor: pointer;
    transition: border-color 0.3s ease;
    min-width: 180px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-clear {
    padding: 0.75rem 1.5rem;
    background-color: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
}

.btn-clear:hover {
    background-color: var(--border-color);
}

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

.product-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 1rem 1rem 1rem;
    position: relative;
    z-index: 10;
}

.product-actions .btn {
    border-radius: 8px;
}

.product-card .btn-add-cart {
    margin: 0;
    width: 100%;
}

.product-card .btn-buy-now {
    margin: 0;
    width: 100%;
}

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

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.product-badge.sale {
    background-color: var(--danger-color);
}

.wishlist-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    color: var(--text-dark);
}

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

.wishlist-btn.active i {
    font-weight: 900;
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3rem;
    line-height: 1.5;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.product-rating span {
    color: var(--text-light);
    margin-left: 0.5rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.old-price {
    font-size: 1.1rem;
    color: var(--text-light);
    text-decoration: line-through;
}

/* Newsletter Section */
.newsletter {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 5rem 0;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.newsletter-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.newsletter-form input:focus {
    outline: 2px solid var(--secondary-color);
}

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 4rem 0 2rem;
}

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

.footer-col h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-col p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.footer-col ul li i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: var(--shadow-xl);
    transition: right 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

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

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

.cart-header h3 {
    font-size: 1.5rem;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
    padding: 0.5rem;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.empty-cart {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-cart i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

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

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

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    background-color: var(--bg-light);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.remove-item {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 0.5rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
}

.overlay.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-search {
        max-width: 300px;
        margin: 0 1rem;
    }
}

@media (max-width: 768px) {
    .header-search {
        display: none;
    }

    .nav-wrapper {
        flex-wrap: wrap;
    }

    .side-nav {
        width: 280px;
        left: -280px;
    }

    .hero-banners {
        height: 400px;
    }

    .banner-title {
        font-size: 2.5rem;
    }

    .banner-description {
        font-size: 1.2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }

    .hero-banners {
        height: 300px;
    }

    .banner-title {
        font-size: 2rem;
    }

    .banner-description {
        font-size: 1rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .side-nav {
        width: 100%;
        left: -100%;
    }
}

/* ===================================
   LOGIN MODAL STYLES
   =================================== */

.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.login-modal.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.login-modal-content {
    background-color: var(--white);
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.login-modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-modal-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.login-modal-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.login-step {
    display: none;
}

.login-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.step-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.step-header p {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    padding: 0;
}

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

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.help-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.otp-timer {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.otp-timer span {
    font-weight: 600;
    color: var(--primary-color);
}

.modal-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    z-index: 10;
}

.modal-loading.hidden {
    display: none;
}

.modal-loading .spinner {
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.modal-loading p {
    margin-top: 1rem;
    color: var(--text-dark);
}

.modal-alert {
    margin-bottom: 1.25rem;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
    animation: slideUp 0.3s ease;
}

.modal-alert.hidden {
    display: none;
}

.modal-alert i {
    font-size: 1.25rem;
}

.modal-alert.success {
    border-color: #22c55e;
    background-color: rgba(34, 197, 94, 0.1);
    color: #166534;
}

.modal-alert.success i {
    color: #22c55e;
}

.modal-alert.error {
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

.modal-alert.error i {
    color: #ef4444;
}

.modal-alert.info {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
    color: #1e40af;
}

.modal-alert.info i {
    color: #3b82f6;
}

/* Modal Social — single button (Google only) */
.modal-social-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 1.25rem;
}

.modal-social-tile {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.modal-social-tile:hover {
    border-color: #764ba2;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

/* Modal Divider */
.modal-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.25rem;
    color: var(--text-light);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Password input wrapper for modal toggle */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-right: 2.75rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* Auth mode toggle row */
.auth-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Mobile Responsive for Login Modal */
@media (max-width: 480px) {
    .login-modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .login-modal-header h2 {
        font-size: 1.5rem;
    }

    .form-group input {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .modal-social-tile {
        font-size: 0.78rem;
        padding: 10px 6px;
    }
}

/* ===================================
   INFINITE SCROLL STYLES
   =================================== */

/* Loading state for initial product fetch */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.loading-state i {
    animation: spin 1s linear infinite;
}

/* Scroll indicator section — sits below the grid */
.scroll-indicator-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0 1.5rem;
}

/* Spinner shown while fetching the next page */
.scroll-loading-indicator {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    background: var(--bg-light);
    border: 1.5px solid var(--border-color);
    border-radius: 50px;
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.1);
    animation: fadeInUp 0.3s ease;
}

.scroll-loading-indicator i {
    font-size: 1.1rem;
}

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

/* "You've seen all N products" end message */
.products-end-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    text-align: center;
}

.products-end-message i {
    font-size: 2.5rem;
    color: #10b981;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0%   { transform: scale(0); opacity: 0; }
    70%  { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.products-end-message p {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    opacity: 0.7;
}

/* New product cards fade-slide in when appended */
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .scroll-loading-indicator {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .products-end-message {
        padding: 1.5rem 1rem;
    }
}
