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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Amazon Color Variables */
:root {
    --amazon-orange: #FF9900;
    --amazon-navy: #131921;
    --amazon-light: #232F3E;
    --orange-600: #ea580c;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

/* Header Styles */
.header {
    background-color: var(--amazon-navy);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: white;
    cursor: pointer;
}

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

/* Brand Logo & Theme Switching */
.site-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.site-logo .logo-light,
.site-logo .logo-dark,
.site-logo .logo-on-dark {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.site-logo .logo-light {
    display: block;
}

.site-logo .logo-dark {
    display: none;
}

html.dark .site-logo .logo-light,
body.dark-mode .site-logo .logo-light {
    display: none !important;
}

html.dark .site-logo .logo-dark,
body.dark-mode .site-logo .logo-dark {
    display: block !important;
}

.logo-affiliate {
    color: var(--amazon-orange);
}

.nav-desktop {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Search Bar Styles */
.search-container {
    flex: 1;
    max-width: 400px;
    margin: 0 24px;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 4px;
    overflow: hidden;
}

.search-input {
    flex: 1;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    outline: none;
}

.search-button {
    background: var(--amazon-orange);
    border: none;
    padding: 9px 16px;
    cursor: pointer;
    color: var(--amazon-navy);
    transition: background 0.3s ease;
}

.search-button:hover {
    background: var(--orange-600);
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
    padding: 4px 0;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    background-color: #ffffff;
    width: 0%;
    border-radius: 0;
    transition: width 0.25s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.dropbtn {
    position: relative;
    padding: 4px 0;
}

.dropbtn::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    background-color: #ffffff;
    width: 0%;
    border-radius: 0;
    transition: width 0.25s ease;
}

.dropbtn:hover::after,
.dropdown:hover .dropbtn::after,
.dropbtn.active::after {
    width: 100%;
}

/* Mega Menu Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: transparent;
    color: white;
    font-size: 16px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    padding: 0;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: min(600px, calc(100vw - 32px));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    border-radius: 12px;
    overflow: hidden;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px;
    margin-top: 12px;
}

/* Arrow pointer for the dropdown */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background-color: white;
    box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.05);
}

.dropdown-content.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.mega-menu-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background-color: white;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.mega-menu-item:hover {
    background-color: var(--gray-50);
    border-color: var(--gray-200);
    transform: translateY(-2px);
}

.mega-menu-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background-color: var(--gray-100);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--amazon-orange);
    transition: all 0.2s ease;
}

.mega-menu-item:hover .mega-menu-icon {
    background-color: var(--amazon-orange);
}

.mega-menu-item:hover .mega-menu-icon img {
    filter: brightness(0) invert(1);
}

.mega-menu-text h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--amazon-navy);
}

.mega-menu-text p {
    margin: 0;
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.4;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid rgba(255,255,255,0.35);
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 8px;
    z-index: 1010;
    position: relative;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.mobile-menu-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.6);
}

/* Mobile nav drawer — hidden by default, visible on mobile when .active */
.nav-mobile {
    display: none;
    flex-direction: column;
    background-color: var(--amazon-light);
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    /* slide-down reveal */
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.nav-mobile.active {
    max-height: 600px;
    padding: 12px 0;
}

.nav-mobile .nav-link {
    padding: 12px 20px;
    display: block;
    font-size: 16px;
    min-height: 44px;
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    transition: background 0.2s ease;
}

.nav-mobile .nav-link:hover {
    background-color: rgba(255,255,255,0.08);
}

.nav-mobile .dark-mode-toggle {
    margin: 4px 12px;
}

/* Overlay behind mobile menu */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}

.mobile-menu-overlay.active {
    display: block;
}

/* Section Management */
.section {
    display: none;
    min-height: calc(100vh - 64px);
}

.section.active {
    display: block;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #131921 0%, #232F3E 50%, #FF9900 100%);
    color: white;
    padding: 40px 0;
    /* Reduced from 80px */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.category-header {
    background: linear-gradient(135deg, #131921 0%, #232F3E 50%, #FF9900 100%);
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-bottom: 20px;
}

.category-header .category-title {
    color: white;
    margin-bottom: 8px;
}

.category-header .category-subtitle {
    color: #e0e0e0;
    font-size: 1.1rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
}

.hero .container {
    position: relative;
    z-index: 10;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 24px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 32px;
    color: #fef3e2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background-color: var(--amazon-orange);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: var(--orange-600);
    transform: scale(1.05);
}

/* Carousel Section */
.carousel-section {
    background: white;
    padding: 64px 0;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    color: var(--amazon-navy);
    margin-bottom: 48px;
}

.carousel-container {
    overflow: hidden;
    position: relative;
    padding: 30px 50px;
    margin: -30px 0;
    /* prevent horizontal bleed-out on narrow screens */
    max-width: 100%;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--gray-600);
}

.carousel-btn:hover {
    background: var(--amazon-orange);
    color: white;
    border-color: var(--amazon-orange);
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.category-card {
    flex: 0 0 33.333%;
    padding: 16px;
}

.category-card-content {
    background: linear-gradient(135deg, #f3f4f6 0%, #f9fafb 100%);
    border-radius: 12px;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.2));
    padding: 16px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 420px;
    overflow: hidden;
}

.category-card-content:hover {
    transform: translateY(-8px);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.2));
    text-decoration: none;
    color: inherit;
}

.category-card-content.active-filter {
    border: 2px solid var(--amazon-orange);
    background: #000;
    /* Light orange background */
    transform: translateY(-4px);
}

.category-image {
    width: 100%;
    max-width: 100%;
    height: 192px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.category-icon {
    font-size: 32px;
    margin-bottom: 8px;
    color: var(--amazon-orange);
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.category-name {
    font-size: 24px;
    font-weight: 600;
    color: var(--amazon-navy);
    margin-bottom: 8px;
    flex-shrink: 0;
}

.category-description {
    color: var(--gray-600);
    margin-bottom: 12px;
    /* clamp to 3 lines so all cards stay the same height */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-shrink: 0;
}

.category-button {
    background-color: var(--amazon-orange);
    color: white;
    padding: 8px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.category-button:hover {
    background-color: var(--orange-600);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #FF9900 0%, #FFB84D 50%, #FF8C00 100%);
    padding: 40px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
}

.cta-section .container {
    position: relative;
    z-index: 10;
}

.cta-title {
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin-bottom: 24px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.cta-subtitle {
    font-size: 20px;
    color: #fef3e2;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.cta-section .btn-primary {
    background-color: var(--amazon-navy);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cta-section .btn-primary:hover {
    background-color: #232f3e;
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

/* Category Pages */
.category-section {
    background-color: var(--gray-50);
    padding: 64px 0;
}

.category-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--amazon-navy);
    text-align: center;
    margin-bottom: 16px;
}

.category-subtitle {
    font-size: 20px;
    color: var(--gray-600);
    text-align: center;
    margin-bottom: 48px;
}

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

/* Responsive Grid Breakpoints — handled in main media query blocks below */

/* Product Card */
.product-card {
    background: white;
    border-radius: 12px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
    padding: 16px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.2));
}

.product-image {
    width: 100%;
    max-width: 100%;
    height: 220px;
    object-fit: contain;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 6px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.product-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--amazon-navy);
    margin-bottom: 4px;
    /* Limit title to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    color: var(--gray-600);
    margin-bottom: 12px;
    /* Limit description to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
    /* Pushes the button section down if text is short */
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    margin-top: auto;
    /* Ensure it sticks to bottom if description logic changes */
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: #059669;
}

.product-rating {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #fbbf24;
    font-size: 13px;
}

.review-count {
    color: var(--gray-500);
    font-size: 12px;
}

.buy-button {
    width: 100%;
    background-color: var(--amazon-orange);
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 15px;
    white-space: nowrap;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-button:hover {
    background-color: var(--orange-600);
}

/* Footer */
.footer {
    background-color: var(--amazon-navy);
    color: white;
    padding: 48px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-description {
    color: var(--gray-300);
    margin-bottom: 24px;
    max-width: 400px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    background-color: var(--amazon-light);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--gray-600);
}

.social-link.pinterest:hover {
    background-color: var(--amazon-orange);
}

.footer-links h4,
.footer-social h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Pill-style quick links */
.footer-links ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    color: var(--gray-300);
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    font-size: 13px;
    line-height: 1.4;
}

.footer-links a:hover {
    color: var(--amazon-navy);
    background: var(--amazon-orange);
    border-color: var(--amazon-orange);
}

.follow-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.follow-links a {
    color: var(--gray-300);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: color 0.3s ease;
}

.follow-links a:hover {
    color: var(--amazon-orange);
}

.footer-bottom {
    border-top: 1px solid var(--amazon-light);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-400);
    margin-bottom: 8px;
}

.footer-bottom a {
    color: var(--gray-300);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--amazon-orange);
}

.disclaimer {
    font-size: 14px;
    color: var(--gray-500);
}

/* ============================================
   RESPONSIVE DESIGN — TABLET (≤768px)
   ============================================ */
@media (max-width: 768px) {
    /* --- Navbar --- */
    .nav-desktop {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* Show nav-mobile element (initially max-height:0 for animation) */
    .nav-mobile {
        display: flex;
    }

    /* --- Search bar --- */
    .search-container {
        flex: 1;
        margin: 0 12px;
        max-width: none;
    }

    /* --- Hero --- */
    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .btn-primary {
        font-size: 16px;
        padding: 14px 28px;
        min-height: 44px;
    }

    /* --- Section title --- */
    .section-title {
        font-size: 28px;
        margin-bottom: 32px;
    }

    /* --- Carousel --- */
    .category-card {
        flex: 0 0 80%;
    }

    /* --- Product grid: 2 columns on tablet --- */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* --- Product card sizes --- */
    .product-image {
        height: 180px;
    }

    .product-title {
        font-size: 16px;
    }

    .product-price {
        font-size: 20px;
    }

    /* Buy button tap-friendly */
    .buy-button {
        padding: 12px 16px;
        min-height: 44px;
        font-size: 14px;
    }

    /* --- Footer --- */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .follow-links {
        align-items: center;
    }

    .footer-links ul {
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- Category header --- */
    .category-title {
        font-size: 28px;
    }

    .category-subtitle {
        font-size: 16px;
        margin-bottom: 32px;
    }

    /* --- CTA --- */
    .cta-title {
        font-size: 28px;
    }

    .cta-subtitle {
        font-size: 16px;
    }
}

/* ============================================
   RESPONSIVE DESIGN — PHONE (≤480px)
   ============================================ */
@media (max-width: 480px) {
    /* Prevent any horizontal overflow */
    html, body {
        overflow-x: hidden;
    }

    .container {
        padding: 0 16px;
    }

    /* --- Navbar height and search --- */
    .nav-content {
        height: 56px;
    }

    .search-container {
        margin: 0 8px;
    }

    .search-input {
        font-size: 14px;
        padding: 8px 10px;
    }

    /* --- Hero --- */
    .hero {
        padding: 40px 0;
    }

    .hero-title {
        font-size: 26px;
        margin-bottom: 16px;
    }

    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 24px;
    }

    /* --- Section spacing --- */
    .carousel-section,
    .cta-section,
    .category-section {
        padding: 40px 0;
    }

    /* --- Product grid: 1 column on phone --- */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .product-image {
        height: 200px;
    }

    /* --- Clothes sub-categories --- */
    .clothes-subcategories .carousel-track {
        flex-wrap: wrap;
        justify-content: center !important;
    }

    .clothes-subcategories .category-card {
        flex: 0 0 calc(50% - 16px) !important;
    }

    /* --- Footer single column --- */
    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-links ul {
        grid-template-columns: 1fr;
    }

    /* --- CTA --- */
    .cta-title {
        font-size: 22px;
    }

    .cta-subtitle {
        font-size: 14px;
    }

    /* --- Pagination tap targets --- */
    .pagination-btn {
        width: 44px;
        height: 44px;
        font-size: 14px;
    }

    /* --- Back button --- */
    .back-btn {
        min-height: 44px;
        padding: 10px 16px;
    }
}

/* Articles Section Styles */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

.article-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.article-image {
    width: 100%;
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.article-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--amazon-navy);
    margin-bottom: 12px;
    text-align: left;
    line-height: 1.4;
}

.article-date {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.article-text {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pagination Styles */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

.pagination-pill {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    background: var(--gray-100, #f3f4f6);
    border-radius: 999px;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-300);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--gray-700);
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--amazon-orange);
    color: var(--amazon-orange);
}

.pagination-btn.active {
    background: var(--amazon-orange);
    color: white;
    border-color: var(--amazon-orange);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--gray-100);
}

/* Responsive Articles */
@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
}

/* Single Article View Styles */
.hidden {
    display: none !important;
}

#singleArticleView {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.back-btn {
    background: transparent;
    border: 1px solid var(--gray-300);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.single-article-content-wrapper {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.single-article-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 24px;
}

.article-image-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin: 32px auto;
    width: 100%;
}

.article-image-row .article-body-image {
    flex: 1 1 0;
    min-width: 0;
    max-width: 80%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.article-inline-image {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    vertical-align: middle;
    margin: 0 12px;
}

.single-article-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--amazon-navy);
    margin-bottom: 8px;
    text-align: left;
}

.single-article-date {
    display: block;
    color: var(--gray-500);
    margin-bottom: 24px;
    font-size: 14px;
}

.single-article-text {
    font-size: 18px;
    line-height: 1.8;
    color: var(--gray-800);
    white-space: pre-line;
    /* Handle newlines in description */
}

@media (max-width: 768px) {
    .single-article-image {
        height: 250px;
    }

    .single-article-title {
        font-size: 24px;
    }

    .single-article-content-wrapper {
        padding: 20px;
    }
}

/* Scroll Reveal Animation */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
    will-change: opacity, transform;
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* =============================================
   BLOG STRIP SECTION — minimal, joyful design
   ============================================= */
.blog-grid-section {
    padding: 80px 0 60px;
    background: linear-gradient(160deg, #fff 60%, #fff8f0 100%);
    overflow: hidden;
}

/* Section header row */
.blog-grid-layout {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Override reveal-on-scroll for the section container itself */
.blog-grid-section.reveal-on-scroll {
    transform: none;
    opacity: 1;
    visibility: visible;
}

/* Info box — centered header above strip */
.blog-info-box {
    text-align: center;
    background: none;
    border: none;
    padding: 0;
    max-width: 580px;
    margin: 0 auto;
    opacity: 0;
    translate: 0 30px;
    transition: opacity 0.7s ease, translate 0.7s ease;
}

.blog-grid-section.reveal-on-scroll.visible .blog-info-box {
    opacity: 1;
    translate: 0 0;
    transition-delay: 0.05s;
}

.info-box-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--amazon-navy);
    margin-bottom: 12px;
    line-height: 1.2;
}

.info-box-title span {
    color: var(--amazon-orange);
}

.info-box-text {
    font-size: 1rem;
    color: var(--gray-500);
    line-height: 1.65;
}

/* Horizontal scrollable strip */
.blog-cards-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 16px 4px 24px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--amazon-orange) transparent;
}

.blog-cards-container::-webkit-scrollbar {
    height: 4px;
}

.blog-cards-container::-webkit-scrollbar-thumb {
    background: var(--amazon-orange);
    border-radius: 4px;
}

/* Each blog card — compact vertical card */
.blog-grid-card {
    flex: 0 0 240px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    scroll-snap-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gray-100);
    /* stagger initial fade-in */
    opacity: 0;
    translate: 0 30px;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                translate 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s ease,
                box-shadow 0.3s ease;
}

.blog-grid-section.reveal-on-scroll.visible .blog-grid-card {
    opacity: 1;
    translate: 0 0;
}

.blog-grid-section.reveal-on-scroll.visible .blog-grid-card:nth-child(1) { transition-delay: 0.1s; }
.blog-grid-section.reveal-on-scroll.visible .blog-grid-card:nth-child(2) { transition-delay: 0.2s; }
.blog-grid-section.reveal-on-scroll.visible .blog-grid-card:nth-child(3) { transition-delay: 0.3s; }
.blog-grid-section.reveal-on-scroll.visible .blog-grid-card:nth-child(4) { transition-delay: 0.4s; }

.blog-grid-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 28px rgba(0,0,0,0.13);
}

.blog-grid-card .category-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    border-radius: 0;
    margin-bottom: 0;
    background: var(--gray-100);
}

/* coloured accent bar per card */
.blog-grid-card::after {
    content: '';
    display: block;
    height: 3px;
    background: var(--amazon-orange);
    margin: 0 16px;
    border-radius: 2px;
    flex-shrink: 0;
}

.blog-grid-card .category-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--amazon-navy);
    line-height: 1.45;
    padding: 12px 16px 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Animation for swapping card */
.blog-card-swapping {
    opacity: 0;
    transform: scale(0.92) !important;
    box-shadow: none;
}

/* Clothes Subcategories Scoped Styles */
.clothes-subcategories .category-card-content {
    padding: 10px 16px;
    border-top: 3px solid var(--amazon-orange);
}

.clothes-subcategories .category-icon {
    margin-bottom: 4px;
}

.clothes-subcategories .category-name {
    margin-bottom: 0px;
}

/* About Us Section Styles */
.about-us-section {
    background-color: #fdf8f5;
    padding: 60px 0 20px;
    overflow: hidden;
    margin-bottom: 0;
}

/* Metrics Section Styles */
.metrics-section {
    background-color: #fdf8f5;
    padding: 20px 0 80px;
    margin-bottom: 40px;
}

/* Ensure background of metrics section doesn't move when revealed */
.metrics-section.reveal-on-scroll {
    transform: none;
    opacity: 1;
    visibility: visible;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    border-top: 1px solid black;
    padding-top: 40px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.metrics-section.reveal-on-scroll.visible .metric-item {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animations for metric items */
.metrics-section.reveal-on-scroll.visible .metric-item:nth-child(1) { transition-delay: 0.1s; }
.metrics-section.reveal-on-scroll.visible .metric-item:nth-child(2) { transition-delay: 0.2s; }
.metrics-section.reveal-on-scroll.visible .metric-item:nth-child(3) { transition-delay: 0.3s; }
.metrics-section.reveal-on-scroll.visible .metric-item:nth-child(4) { transition-delay: 0.4s; }

.metric-label {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 16px;
    font-weight: 400;
}

.metric-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--amazon-navy);
    font-family: 'Inter', sans-serif;
    line-height: 1;
    letter-spacing: -1px;
}

@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    .metric-value {
        font-size: 2.5rem;
    }
}

.about-us-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 0 40px;
}

/* ── DESKTOP: original typographic grid ── */
.about-us-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(40px, auto);
    gap: 15px 20px;
    align-items: center;
}

.about-item {
    opacity: 0;
    transform: translateY(80px) scale(0.85);
    filter: blur(8px);
    transition: all 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-on-scroll.visible .about-item {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.about-large-text {
    font-family: 'Inter', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    color: var(--amazon-navy);
    line-height: 1.1;
    letter-spacing: -2px;
    margin: 0;
    white-space: nowrap;
}

.about-medium-text {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    font-weight: 300;
    color: var(--amazon-navy);
    line-height: 1.2;
    display: block;
    white-space: nowrap;
    letter-spacing: -1px;
}

.about-large-text.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.about-small-text {
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.6;
    max-width: 280px;
    margin: 0;
}

/* Desktop grid placement */
.about-item-1 { grid-column: 2 / 8; grid-row: 1; margin-bottom: 5px; text-align: left; }
.about-item-2 { grid-column: 8 / 13; grid-row: 1; padding-top: 10px; text-align: left; }
.about-item-3 { grid-column: 1 / 5; grid-row: 2; margin-bottom: 5px; }
.about-item-4 { grid-column: 8 / 13; grid-row: 2; text-align: left; }
.about-item-5 { grid-column: 1 / 9; grid-row: 3; text-align: left; }
.about-item-6 { grid-column: 9 / 13; grid-row: 3; margin-top: 10px; text-align: left; }
.about-item-7 { grid-column: 5 / 13; grid-row: 4; text-align: center; margin-top: 15px; }

/* Staggered Animations */
.reveal-on-scroll.visible .about-item-1 { transition-delay: 0.1s; }
.reveal-on-scroll.visible .about-item-2 { transition-delay: 0.2s; }
.reveal-on-scroll.visible .about-item-3 { transition-delay: 0.3s; }
.reveal-on-scroll.visible .about-item-4 { transition-delay: 0.4s; }
.reveal-on-scroll.visible .about-item-5 { transition-delay: 0.5s; }
.reveal-on-scroll.visible .about-item-6 { transition-delay: 0.6s; }
.reveal-on-scroll.visible .about-item-7 { transition-delay: 0.7s; }

@media (max-width: 1024px) {
    .about-large-text { font-size: 3rem; }
    .about-medium-text { font-size: 2rem; }
    .about-item-1 { grid-column: 2 / 8; }
    .about-item-2 { grid-column: 7 / 12; }
    .about-item-3 { grid-column: 1 / 5; }
    .about-item-4 { grid-column: 7 / 12; }
    .about-item-5 { grid-column: 1 / 10; }
    .about-item-6 { grid-column: 8 / 13; }
    .about-item-7 { grid-column: 4 / 12; }
}

/* ── MOBILE: feature-card grid ── */
@media (max-width: 768px) {
    /* Hide the typographic items completely on mobile */
    .about-us-grid {
        display: none;
    }

    /* Show mobile-only feature cards */
    .about-mobile-grid {
        display: grid !important;
    }
}

/* Feature card grid — mobile about section replacement */
.about-mobile-grid {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0 4px;
}

.about-feature-card {
    background: white;
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    border: 1px solid var(--gray-100);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    /* shared animation state */
    opacity: 0;
    transform: translateY(40px) scale(0.92);
    filter: blur(4px);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.8s ease;
}

.reveal-on-scroll.visible .about-feature-card {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* Stagger */
.reveal-on-scroll.visible .about-feature-card:nth-child(1) { transition-delay: 0.05s; }
.reveal-on-scroll.visible .about-feature-card:nth-child(2) { transition-delay: 0.15s; }
.reveal-on-scroll.visible .about-feature-card:nth-child(3) { transition-delay: 0.25s; }
.reveal-on-scroll.visible .about-feature-card:nth-child(4) { transition-delay: 0.35s; }
.reveal-on-scroll.visible .about-feature-card:nth-child(5) { transition-delay: 0.45s; }
.reveal-on-scroll.visible .about-feature-card:nth-child(6) { transition-delay: 0.55s; }

/* Full-width on small phones */
.about-feature-card.wide {
    grid-column: 1 / -1;
}

.about-feature-icon {
    font-size: 28px;
    color: var(--amazon-orange);
    margin-bottom: 10px;
    display: block;
}

.about-feature-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--amazon-navy);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.about-feature-text {
    font-size: 0.8rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin: 0;
}

/* Section title for mobile about */
.about-mobile-title {
    display: none;
    text-align: center;
    margin-bottom: 24px;
}

.about-mobile-title h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--amazon-navy);
    margin-bottom: 6px;
}

.about-mobile-title h2 span {
    color: var(--amazon-orange);
}

.about-mobile-title p {
    font-size: 0.9rem;
    color: var(--gray-500);
}

@media (max-width: 768px) {
    .about-mobile-title {
        display: block;
    }
    .about-us-section {
        padding: 48px 0 28px;
    }
}

@media (max-width: 480px) {
    .about-mobile-grid {
        grid-template-columns: 1fr 1fr;
    }
    .about-feature-card {
        padding: 16px 12px;
    }
    .about-feature-icon {
        font-size: 24px;
    }
}

/* Dark Mode Styles */
body.dark-mode {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --card-bg: #1e293b;
    --card-text: #cbd5e1;
    background-color: var(--bg-color);
    color: var(--text-color);
}

body.dark-mode .product-card,
body.dark-mode .dropdown-content,
body.dark-mode .mega-menu-item,
body.dark-mode .search-wrapper,
body.dark-mode .carousel-btn,
body.dark-mode .blog-grid-card {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: rgba(255,255,255,0.08);
}

body.dark-mode .category-card-content {
    background: var(--card-bg);
    color: var(--text-color);
}

body.dark-mode .product-title,
body.dark-mode .category-name,
body.dark-mode .section-title,
body.dark-mode .category-title,
body.dark-mode .mega-menu-text h3,
body.dark-mode .about-large-text,
body.dark-mode .about-medium-text,
body.dark-mode .info-box-title,
body.dark-mode .single-article-title {
    color: var(--text-color);
}

body.dark-mode .product-description,
body.dark-mode .category-description,
body.dark-mode .mega-menu-text p,
body.dark-mode .category-subtitle,
body.dark-mode .about-small-text,
body.dark-mode .info-box-text,
body.dark-mode .single-article-text {
    color: var(--card-text);
}

body.dark-mode .mega-menu-item:hover {
    background-color: #334155;
    border-color: #334155;
}

body.dark-mode .search-input {
    background-color: var(--card-bg);
    color: var(--text-color);
}

body.dark-mode .category-section,
body.dark-mode .carousel-section,
body.dark-mode .about-us-section,
body.dark-mode .blog-grid-section {
    background-color: var(--bg-color);
}

body.dark-mode .product-image,
body.dark-mode .single-article-image {
    background-color: white;
}

body.dark-mode .header {
    background-color: #131921; /* Keeping header dark */
}
body.dark-mode .footer {
    background-color: #131921; /* Keeping footer dark */
}

/* Toggle Button Styles */
.dark-mode-toggle {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, transform 0.3s ease;
}

.dark-mode-toggle:hover {
    color: var(--amazon-orange);
    transform: scale(1.1);
}



body.dark-mode .metrics-section {
    background-color: var(--bg-color);
}

body.dark-mode .metric-value,
body.dark-mode .metric-label {
    color: var(--text-color);
}



body.dark-mode .metrics-grid {
    border-top: 1px solid white;
}



body.dark-mode .blog-grid-card,
body.dark-mode .category-card-content,
body.dark-mode .product-card {
    filter: none;
    box-shadow: 0 4px 20px rgba(255, 153, 0, 0.25);
}

/* Feature cards (about section mobile) dark mode */
body.dark-mode .about-feature-card {
    background-color: var(--card-bg);
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 4px 20px rgba(255,153,0,0.15);
}

body.dark-mode .about-feature-title {
    color: var(--text-color);
}

body.dark-mode .about-feature-text {
    color: var(--card-text);
}

body.dark-mode .about-mobile-title h2 {
    color: var(--text-color);
}

body.dark-mode .about-mobile-title p {
    color: var(--card-text);
}

/* Footer pill links dark mode */
body.dark-mode .footer-links a {
    border-color: rgba(255,255,255,0.18);
}

body.dark-mode .footer-links a:hover {
    background: var(--amazon-orange);
    color: var(--amazon-navy);
    border-color: var(--amazon-orange);
}

/* Blog strip dark mode */
body.dark-mode .blog-grid-section {
    background: var(--bg-color);
}

body.dark-mode .blog-grid-card .category-name {
    color: var(--text-color);
}












