/* ============================================
   bloomy — Affiliate Catalog
   Mobile-first · Manrope · Coral & Charcoal
   ============================================ */

/* --- Self-hosted Manrope (variable, woff2) --- */
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('/assets/fonts/manrope-greek.woff2') format('woff2');
    unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('/assets/fonts/manrope-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('/assets/fonts/manrope-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Design Tokens --- */
:root {
    /* Brand */
    --coral: #ff5050;
    --coral-light: #ff8f8f;
    --coral-dark: #e63946;
    --coral-glow: rgba(255, 80, 80, .12);
    --charcoal: #231f20;

    /* Aliases */
    --primary: var(--coral);
    --primary-light: var(--coral-light);
    --primary-dark: var(--coral-dark);

    /* Neutrals */
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-150: #efefef;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;

    /* Semantic */
    --success: #16a34a;
    --success-bg: #f0fdf4;
    --warning: #d97706;
    --warning-bg: #fffbeb;
    --danger: #dc2626;
    --danger-bg: #fef2f2;

    /* Surfaces */
    --body-bg: var(--gray-50);
    --card-bg: var(--white);
    --text: #4a4a4a;
    --text-heading: var(--charcoal);

    /* Shape */
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-pill: 9999px;

    /* Elevation */
    --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow: 0 4px 12px rgba(0,0,0,.06);
    --shadow-md: 0 8px 24px rgba(0,0,0,.08);
    --shadow-lg: 0 16px 40px rgba(0,0,0,.10);
    --shadow-card-hover: 0 12px 32px rgba(255,80,80,.12), 0 4px 12px rgba(0,0,0,.06);

    /* Motion */
    --ease: cubic-bezier(.4, 0, .2, 1);
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
    --dur-fast: 150ms;
    --dur: 250ms;
    --dur-slow: 400ms;

    /* Spacing scale (4px base) */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-10: 40px;
    --sp-12: 48px;
    --sp-16: 64px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-size-adjust: 100%;
}

body {
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--body-bg);
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--primary-dark); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--sp-4);
}
@media (min-width: 640px) {
    .container { padding: 0 var(--sp-6); }
}

.main-content, .site-main {
    min-height: calc(100vh - 180px);
    padding: var(--sp-6) 0 var(--sp-12);
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(0,0,0,.06);
    transition: box-shadow var(--dur) var(--ease);
}
.site-header.scrolled {
    box-shadow: 0 2px 16px rgba(0,0,0,.08);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-3) 0;
    min-height: 60px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.logo img {
    height: 32px;
    width: auto;
}
@media (min-width: 768px) {
    .logo img { height: 36px; }
}

/* Navigation */
.main-nav {
    display: none;
    align-items: center;
    gap: var(--sp-1);
}
.main-nav a {
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.875rem;
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--radius-sm);
    transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
    white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    background: var(--coral-glow);
}
@media (min-width: 768px) {
    .main-nav { display: flex; }
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-left: auto;
}

/* Header Search */
.header-search {
    position: relative;
    flex: 1;
    max-width: 400px;
    display: none;
}
.header-search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
}
.header-search .search-input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--charcoal);
    background: var(--gray-50);
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
    outline: none;
}
.header-search .search-input:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px var(--coral-glow);
}
.header-search .search-input::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}
@media (min-width: 640px) {
    .header-search { display: block; }
}

/* Legacy search-form support */
.search-form {
    position: relative;
    flex: 1;
    max-width: 360px;
    display: none;
}
.search-form input[type="search"] {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--charcoal);
    background: var(--gray-50);
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
    outline: none;
}
.search-form input[type="search"]:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px var(--coral-glow);
}
.search-form input[type="search"]::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}
@media (min-width: 640px) {
    .search-form { display: block; }
}

/* Search autocomplete results */
.search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 50;
}
.search-results.active { display: block; }
.search-result-item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--gray-100);
    transition: background var(--dur-fast) var(--ease);
    color: inherit;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover,
.search-result-item.highlighted {
    background: var(--gray-50);
}
.search-result-item img {
    width: 44px; height: 44px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: var(--gray-100);
    flex-shrink: 0;
}
.search-result-item .title {
    font-weight: 600;
    color: var(--charcoal);
    font-size: 0.875rem;
}
.search-result-item .price {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.875rem;
}

/* Cart button */
.cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    color: var(--charcoal);
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.cart-btn:hover {
    background: var(--coral-glow);
    color: var(--primary);
}
.cart-btn svg {
    width: 22px;
    height: 22px;
}

/* Legacy cart-icon */
.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    color: var(--charcoal);
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.cart-icon:hover {
    background: var(--coral-glow);
    color: var(--primary);
}
.cart-icon svg {
    width: 22px;
    height: 22px;
}
.cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
}
.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--charcoal);
    border-radius: 2px;
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}
@media (min-width: 768px) {
    .mobile-menu-toggle { display: none; }
}

/* Mobile Nav Drawer */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
    backdrop-filter: blur(2px);
}
.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    background: var(--white);
    z-index: 201;
    transform: translateX(100%);
    transition: transform var(--dur) var(--ease);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}
.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid var(--gray-100);
}
.mobile-nav-logo {
    height: 28px;
    width: auto;
}
.mobile-nav-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--gray-500);
    padding: var(--sp-1);
    line-height: 1;
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease);
}
.mobile-nav-close:hover {
    color: var(--charcoal);
}

.mobile-nav-search {
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid var(--gray-100);
}
.mobile-nav-search input {
    width: 100%;
    padding: var(--sp-3) var(--sp-4);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9rem;
    outline: none;
    color: var(--charcoal);
    transition: border-color var(--dur) var(--ease);
}
.mobile-nav-search input:focus {
    border-color: var(--primary);
}

.mobile-nav-links {
    flex: 1;
    overflow-y: auto;
    padding: var(--sp-3) 0;
}
.mobile-nav-links a {
    display: block;
    padding: var(--sp-3) var(--sp-5);
    color: var(--charcoal);
    font-weight: 600;
    font-size: 1rem;
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.mobile-nav-links a:hover {
    background: var(--coral-glow);
    color: var(--primary);
}

@media (min-width: 768px) {
    .mobile-nav,
    .mobile-nav-overlay {
        display: none !important;
    }
}

/* Legacy main-nav.active fallback */
.main-nav.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 60px 0 0 0;
    background: var(--white);
    padding: var(--sp-6) var(--sp-4);
    gap: var(--sp-2);
    z-index: 99;
    animation: fadeSlideDown var(--dur) var(--ease);
}
.main-nav.active a {
    font-size: 1.1rem;
    padding: var(--sp-3) var(--sp-4);
}

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

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--charcoal) 0%, #3a2f30 45%, var(--coral) 100%);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--sp-10) var(--sp-6);
    margin-bottom: var(--sp-8);
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--coral-light) 0%, transparent 70%);
    opacity: 0.15;
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--coral) 0%, transparent 70%);
    opacity: 0.1;
    pointer-events: none;
}

.hero h1 {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: var(--sp-3);
    position: relative;
    z-index: 1;
}
.hero p {
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    opacity: 0.85;
    max-width: 520px;
    line-height: 1.5;
    margin-bottom: var(--sp-6);
    position: relative;
    z-index: 1;
}

/* Hero search bar */
.hero-search {
    display: flex;
    max-width: 520px;
    position: relative;
    z-index: 1;
}
.hero-search .search-input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 1rem;
    font-weight: 500;
    color: var(--charcoal);
    outline: none;
}
.hero-search .search-input::placeholder {
    color: var(--gray-400);
}
.hero-search button {
    padding: 14px 24px;
    background: var(--coral);
    color: var(--white);
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-weight: 700;
    font-size: 0.95rem;
    transition: background var(--dur) var(--ease);
    white-space: nowrap;
}
.hero-search button:hover {
    background: var(--coral-dark);
}

@media (min-width: 768px) {
    .hero {
        padding: var(--sp-16) var(--sp-12);
    }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    margin-bottom: var(--sp-10);
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--sp-5);
    gap: var(--sp-4);
}
.section-header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.01em;
}
.section-header a {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}
.section-header a:hover {
    text-decoration: underline;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-2);
    padding: var(--sp-4) 0;
    font-size: 0.8rem;
    font-weight: 500;
}
.breadcrumbs a {
    color: var(--gray-500);
}
.breadcrumbs a:hover {
    color: var(--primary);
}
.breadcrumbs .separator {
    color: var(--gray-300);
    font-size: 0.7rem;
}
.breadcrumbs .current {
    color: var(--charcoal);
    font-weight: 600;
}

/* ============================================
   PRODUCT GRID
   ============================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
}
@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--sp-4);
    }
}
@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--sp-5);
    }
}

/* ============================================
   PRODUCT CARD
   ============================================ */
.product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur) var(--ease);
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--gray-150);
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
    border-color: transparent;
}

.product-card .product-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
    text-decoration: none;
}

.product-card .product-image {
    position: relative;
    aspect-ratio: 1;
    background: var(--gray-50);
    overflow: hidden;
}
.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: var(--sp-4);
    transition: transform var(--dur-slow) var(--ease);
}
.product-card:hover .product-image img {
    transform: scale(1.06);
}

/* Badges */
.discount-badge {
    position: absolute;
    top: var(--sp-3);
    left: var(--sp-3);
    background: var(--coral);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.02em;
}
.discount-badge.large {
    font-size: 0.85rem;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
}

.stock-badge {
    position: absolute;
    top: var(--sp-3);
    right: var(--sp-3);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.stock-badge.out-of-stock {
    background: var(--gray-700);
    color: var(--white);
}

.compare-badge {
    position: absolute;
    bottom: var(--sp-2);
    left: var(--sp-2);
    background: rgba(35,31,32,.85);
    backdrop-filter: blur(4px);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

/* Card info */
.product-card .product-info {
    padding: var(--sp-3) var(--sp-3) var(--sp-4);
    display: flex;
    flex-direction: column;
    flex: 1;
}
.product-card .product-brand {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
}
.product-card .product-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--sp-2);
    flex: 1;
}
.product-card .product-price {
    display: flex;
    align-items: baseline;
    gap: var(--sp-2);
    flex-wrap: wrap;
    margin-top: auto;
}
.product-card .price-current {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--charcoal);
}
.product-card .price-original {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--gray-400);
    text-decoration: line-through;
}
.product-card .price-from {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-500, #6b7280);
    text-transform: lowercase;
}
.product-card .price-stores {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--gray-400, #9ca3af);
    white-space: nowrap;
}

/* Card add-to-cart button (inside card) */
.product-card {
    position: relative;
}
.product-card .card-add-btn {
    position: absolute;
    bottom: var(--sp-3);
    right: var(--sp-3);
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    border-radius: 50%;
    background: var(--white);
    color: var(--charcoal);
    border: 1.5px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(4px) scale(.9);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease-spring), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
    z-index: 2;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
.product-card:hover .card-add-btn {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.product-card .card-add-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(0) scale(1.08);
    box-shadow: 0 4px 12px rgba(255,80,80,.25);
}
.product-card .card-add-btn svg {
    width: 16px;
    height: 16px;
}

/* Legacy card-cart-btn */
.product-card .card-cart-btn {
    position: absolute;
    bottom: var(--sp-2);
    right: var(--sp-2);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    color: var(--charcoal);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), background var(--dur-fast) var(--ease);
    z-index: 2;
}
.product-card:hover .card-cart-btn {
    opacity: 1;
    transform: translateY(0);
}
.product-card .card-cart-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.product-card .card-cart-btn svg {
    width: 16px;
    height: 16px;
}

/* On larger screens, show price in coral when on sale */
.product-card .price-current.on-sale {
    color: var(--coral);
}

@media (min-width: 640px) {
    .product-card .product-info {
        padding: var(--sp-4);
    }
    .product-card .product-title {
        font-size: 0.9rem;
    }
    .product-card .price-current {
        font-size: 1.1rem;
    }
}

/* ============================================
   CATEGORY GRID
   ============================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
}
@media (min-width: 640px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--sp-4);
    }
}
@media (min-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.category-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: var(--sp-5);
    border: 1px solid var(--gray-150);
    transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
    text-decoration: none;
    display: flex;
    flex-direction: column;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--coral-light);
}

.category-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: var(--sp-1);
}
.category-count {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-500);
}

/* ============================================
   SIDEBAR & FILTERS
   ============================================ */
.page-with-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--sp-6);
}
@media (min-width: 768px) {
    .page-with-sidebar {
        display: grid;
        grid-template-columns: 260px 1fr;
        gap: var(--sp-8);
    }
}

.sidebar {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: var(--sp-5);
    border: 1px solid var(--gray-150);
    align-self: start;
}
@media (min-width: 768px) {
    .sidebar {
        position: sticky;
        top: 80px;
    }
}

.filter-section {
    margin-bottom: var(--sp-5);
    padding-bottom: var(--sp-5);
    border-bottom: 1px solid var(--gray-150);
}
.filter-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--charcoal);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--sp-3);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.filter-option {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: 0.875rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: 2px 0;
    transition: color var(--dur-fast) var(--ease);
}
.filter-option:hover {
    color: var(--charcoal);
}
.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    flex-shrink: 0;
}
.filter-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--gray-400);
    font-weight: 500;
}

.price-range {
    display: flex;
    gap: var(--sp-2);
    align-items: center;
}
.price-input {
    flex: 1;
    min-width: 0;
    max-width: 100px;
    padding: var(--sp-2) var(--sp-3);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    outline: none;
    transition: border-color var(--dur) var(--ease);
    -moz-appearance: textfield;
}
.price-input::-webkit-outer-spin-button,
.price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.price-input:focus {
    border-color: var(--primary);
}

.price-inputs {
    display: flex;
    gap: var(--sp-2);
    align-items: center;
}
.price-separator {
    color: var(--gray-400);
    font-size: 0.875rem;
}

.filter-options-scroll {
    max-height: 200px;
    overflow-y: auto;
    padding-right: var(--sp-2);
}
.filter-options-scroll::-webkit-scrollbar {
    width: 4px;
}
.filter-options-scroll::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 2px;
}
.filter-options-scroll::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 2px;
}

.filter-option .filter-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-submit {
    display: block;
    width: 100%;
    margin-top: var(--sp-4);
    padding: var(--sp-3) var(--sp-4);
    background: linear-gradient(135deg, var(--coral), var(--coral-dark));
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.filter-submit:hover {
    background: linear-gradient(135deg, var(--coral-dark), var(--coral));
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}
.filter-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-clear {
    display: block;
    text-align: center;
    margin-top: var(--sp-3);
    padding: var(--sp-2);
    font-size: 0.8rem;
    color: var(--gray-500);
    border-radius: var(--radius-sm);
    transition: all var(--dur-fast) var(--ease);
}
.filter-clear:hover {
    color: var(--primary);
    background: var(--gray-100);
}

.filter-link {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-1) 0;
    color: var(--gray-600);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease);
}
.filter-link:hover {
    color: var(--primary);
}
.filter-link .filter-label {
    flex: 1;
}

/* Store Header */
.store-header {
    display: flex;
    gap: var(--sp-6);
    align-items: center;
    flex-wrap: wrap;
    padding: var(--sp-6);
    margin-bottom: var(--sp-6);
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.store-logo {
    flex-shrink: 0;
}
.store-logo img {
    max-height: 80px;
    max-width: 200px;
    object-fit: contain;
}
.store-info {
    flex: 1;
    min-width: 200px;
}
.store-info h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: var(--sp-2);
}
.store-description {
    color: var(--gray-500);
    line-height: 1.6;
    margin-bottom: var(--sp-3);
}
.store-link {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 500;
}
.store-stats {
    flex-shrink: 0;
    text-align: center;
}
.store-count {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}
.store-count-label {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Listing Content (grid second column) */
.listing-content {
    min-width: 0; /* Prevent grid blowout */
}

/* ============================================
   SORT BAR
   ============================================ */
.sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    margin-bottom: var(--sp-5);
    padding: var(--sp-3) var(--sp-4);
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--gray-150);
    overflow-x: auto;
}
.sort-bar a {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    padding: var(--sp-1) var(--sp-2);
    border-radius: var(--radius-sm);
    transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.sort-bar a:hover {
    background: var(--gray-100);
}

/* ============================================
   PRODUCT DETAIL PAGE
   ============================================ */
.product-detail {
    display: flex;
    flex-direction: column;
    gap: var(--sp-6);
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--sp-5);
    border: 1px solid var(--gray-150);
}
@media (min-width: 768px) {
    .product-detail {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--sp-10);
        padding: var(--sp-8);
    }
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}
.main-image {
    aspect-ratio: 1;
    background: var(--gray-50);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}
.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: var(--sp-8);
}

.thumbnail-gallery {
    display: flex;
    gap: var(--sp-2);
    overflow-x: auto;
}
.thumb {
    width: 56px;
    height: 56px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    background: var(--gray-50);
    transition: border-color var(--dur-fast) var(--ease);
    padding: 0;
}
.thumb:hover,
.thumb.active {
    border-color: var(--primary);
}
.thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.product-content .product-brand {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--sp-2);
}
.product-content .product-title {
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    font-weight: 800;
    color: var(--charcoal);
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin-bottom: var(--sp-4);
}

.product-price-box {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: var(--sp-5);
    margin-bottom: var(--sp-5);
}
.product-price-box .price-current {
    font-size: 2rem;
    font-weight: 800;
    color: var(--charcoal);
}
.product-price-box .price-original {
    font-size: 1rem;
    color: var(--gray-400);
    text-decoration: line-through;
    margin-left: var(--sp-2);
}
.price-savings {
    display: inline-block;
    margin-top: var(--sp-2);
    padding: var(--sp-1) var(--sp-3);
    background: var(--coral-glow);
    color: var(--coral);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
}

.product-availability {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: var(--sp-4);
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--radius-sm);
}
.product-availability.in_stock {
    color: var(--success);
    background: var(--success-bg);
}
.product-availability.out_of_stock {
    color: var(--danger);
    background: var(--danger-bg);
}
.product-availability.preorder,
.product-availability.backorder {
    color: var(--warning);
    background: var(--warning-bg);
}

.product-attributes {
    margin-top: var(--sp-6);
    padding-top: var(--sp-6);
    border-top: 1px solid var(--gray-150);
}
.product-attributes h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--charcoal);
    margin-bottom: var(--sp-4);
}
.product-attributes dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--sp-2) var(--sp-4);
    font-size: 0.875rem;
}
.product-attributes dt {
    font-weight: 600;
    color: var(--gray-600);
}
.product-attributes dd {
    color: var(--charcoal);
}

.product-description {
    margin-top: var(--sp-6);
    padding-top: var(--sp-6);
    border-top: 1px solid var(--gray-150);
}
.product-description h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--charcoal);
    margin-bottom: var(--sp-4);
}
.description-content {
    color: var(--text);
    line-height: 1.75;
    font-size: 0.95rem;
}

/* Related products section */
.related-products {
    margin-top: var(--sp-10);
}
.related-products h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: var(--sp-5);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-5);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.btn-primary {
    background: var(--coral);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--coral-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255,80,80,.3);
}

.btn-large {
    padding: var(--sp-4) var(--sp-8);
    font-size: 1rem;
    border-radius: var(--radius);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-200);
    color: var(--charcoal);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Add to cart button */
.add-to-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    background: var(--charcoal);
    color: var(--white);
    border: none;
    padding: var(--sp-3) var(--sp-5);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.add-to-cart-btn:hover {
    background: var(--primary);
    transform: translateY(-1px);
}
.add-to-cart-btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   COMPARISON TABLE
   ============================================ */
.comparison-table {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--gray-150);
    overflow: hidden;
    margin: var(--sp-6) 0;
}
.comparison-table table {
    width: 100%;
    border-collapse: collapse;
}
.comparison-table thead tr {
    background: var(--gray-50);
}
.comparison-table th {
    text-align: left;
    padding: var(--sp-3) var(--sp-5);
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.comparison-table td {
    padding: var(--sp-4) var(--sp-5);
    border-top: 1px solid var(--gray-100);
    font-size: 0.9rem;
}
.comparison-table tbody tr:first-child,
.comparison-table tbody tr.best-price {
    background: var(--success-bg);
}

.comparison-header {
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 2px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.comparison-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--charcoal);
}
.comparison-count {
    font-size: 0.8rem;
    color: var(--gray-400);
    font-weight: 500;
}

.comparison-store {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}
.comparison-store-logo {
    max-height: 28px;
    max-width: 80px;
    object-fit: contain;
}
.comparison-store-name {
    font-weight: 600;
    color: var(--charcoal);
    font-size: 0.9rem;
}
.best-price-badge {
    background: var(--success);
    color: var(--white);
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    white-space: nowrap;
}

.comparison-price {
    display: flex;
    align-items: baseline;
    gap: var(--sp-2);
}
.comparison-price-current {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--charcoal);
}
.comparison-price-current.best {
    color: var(--success);
}
.comparison-price-old {
    font-size: 0.8rem;
    color: var(--gray-400);
    text-decoration: line-through;
}

.avail-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}
.avail-success { background: var(--success-bg); color: var(--success); }
.avail-danger { background: var(--danger-bg); color: var(--danger); }
.avail-warning { background: var(--warning-bg); color: var(--warning); }
.avail-neutral { background: var(--gray-100); color: var(--gray-500); }

.comparison-action {
    text-align: center;
}
.comparison-cta {
    font-size: 0.85rem;
    padding: var(--sp-2) var(--sp-5);
    white-space: nowrap;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-1);
    margin-top: var(--sp-8);
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--sp-3);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--dur) var(--ease);
}
.pagination a {
    background: var(--card-bg);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}
.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--coral-glow);
}
.pagination .current {
    background: var(--coral);
    color: var(--white);
    border: 1px solid var(--coral);
}
.pagination .dots {
    color: var(--gray-400);
    border: none;
}

/* ============================================
   CART PAGE — Mobile-first
   ============================================ */
/* -- Cart grid layout (mobile-first) -- */
.cart-grid {
    display: flex;
    flex-direction: column;
    gap: var(--sp-5);
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

/* -- Single cart item card -- */
.cart-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--gray-150);
    padding: var(--sp-4);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    transition: box-shadow var(--dur) var(--ease);
}
.cart-item:hover {
    box-shadow: var(--shadow-sm);
}

/* -- Main row: image + details + remove btn -- */
.cart-item-main {
    display: flex;
    gap: var(--sp-3);
    align-items: flex-start;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    background: var(--gray-50);
    flex-shrink: 0;
    overflow: hidden;
}
.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-title {
    font-weight: 600;
    color: var(--charcoal);
    text-decoration: none;
    font-size: 0.88rem;
    line-height: 1.45;
    transition: color var(--dur-fast) var(--ease);
}
.cart-item-title:hover {
    color: var(--primary);
}

.cart-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px var(--sp-2);
    font-size: 0.76rem;
    color: var(--gray-400);
    line-height: 1.4;
}
.cart-item-brand {
    font-weight: 500;
}
.cart-item-meta .cart-item-brand + .cart-item-store::before {
    content: "·";
    margin-right: var(--sp-2);
    color: var(--gray-300);
}
.cart-item-store {
    color: var(--gray-500);
}

.cart-item-price {
    display: flex;
    align-items: baseline;
    gap: var(--sp-2);
    margin-top: 2px;
}
.cart-item-price .price-current {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--charcoal);
}
.cart-item-price .price-current.on-sale {
    color: var(--coral);
}
.cart-item-price .price-original {
    font-size: 0.78rem;
    color: var(--gray-400);
    text-decoration: line-through;
}

/* -- Remove button (top-right X) -- */
.cart-item-remove {
    flex-shrink: 0;
    margin-left: auto;
}
.cart-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--gray-400);
    transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
    padding: 0;
}
.cart-remove-btn:hover {
    color: var(--danger);
    background: var(--danger-bg);
}

/* -- Actions row: checkout CTA -- */
.cart-item-actions {
    display: flex;
}
.cart-item-checkout {
    flex: 1;
    text-decoration: none;
    font-size: 0.84rem;
    padding: var(--sp-2) var(--sp-4);
    text-align: center;
    gap: var(--sp-2);
}
.cart-item-checkout svg {
    flex-shrink: 0;
}

/* -- Summary sidebar -- */
.cart-summary {
    background: #ffd3d3;
    border-radius: var(--radius);
    border: 1px solid #f5b8b8;
    padding: var(--sp-5);
    color: var(--charcoal);
}
.cart-summary-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: var(--sp-4);
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: var(--sp-3) 0;
    border-bottom: 1px solid rgba(0,0,0,.1);
    font-size: 0.9rem;
    color: var(--charcoal);
}
.cart-summary-value {
    font-weight: 600;
    color: var(--charcoal);
}
.cart-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: var(--sp-3) 0;
    margin-bottom: var(--sp-4);
    font-weight: 700;
    color: var(--charcoal);
}
.cart-total-price {
    font-size: 1.25rem;
    color: var(--charcoal);
    font-weight: 800;
}
.cart-summary-note {
    font-size: 0.75rem;
    color: rgba(0,0,0,.6);
    line-height: 1.5;
    margin-bottom: var(--sp-4);
}
.cart-continue-link {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    background: var(--charcoal);
    color: var(--white);
    border-color: var(--charcoal);
}
.cart-continue-link:hover {
    background: var(--gray-700);
    color: var(--white);
}

/* -- Desktop cart layout -- */
@media (min-width: 768px) {
    .cart-grid {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: var(--sp-6);
        align-items: start;
    }
    .cart-summary {
        position: sticky;
        top: 80px;
    }
    .cart-item {
        flex-direction: row;
        align-items: center;
        gap: var(--sp-4);
    }
    .cart-item-main {
        flex: 1;
        min-width: 0;
    }
    .cart-item-image {
        width: 72px;
        height: 72px;
    }
    .cart-item-actions {
        flex-shrink: 0;
        width: 200px;
    }
    .cart-item-checkout {
        width: 100%;
    }
}

/* ============================================
   STORE CARDS
   ============================================ */
.stores-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-4);
}
@media (min-width: 640px) {
    .stores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .stores-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.store-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--gray-150);
    overflow: hidden;
    transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur) var(--ease);
    display: flex;
    flex-direction: column;
}
.store-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.store-card-logo {
    padding: var(--sp-5);
    text-align: center;
    border-bottom: 1px solid var(--gray-100);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.store-card-logo img {
    max-height: 56px;
    max-width: 180px;
    object-fit: contain;
}
.store-card-placeholder {
    width: 56px;
    height: 56px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

.store-card-body {
    padding: var(--sp-4) var(--sp-5);
    flex: 1;
    display: flex;
    flex-direction: column;
}
.store-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: var(--sp-2);
}
.store-card-desc {
    color: var(--gray-500);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: var(--sp-4);
    flex: 1;
}
.store-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}
.store-card-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

/* Category card enhancements */
.category-sub {
    display: block;
    font-size: 0.78rem;
    color: var(--gray-400);
    margin-top: 2px;
}
.category-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--sp-4);
}
.category-count-badge {
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
}
.category-arrow {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
}

/* Brands Grid */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
}
@media (min-width: 640px) {
    .brands-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--sp-4);
    }
}
@media (min-width: 1024px) {
    .brands-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.brand-card {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--gray-150);
    border-radius: var(--radius);
    padding: var(--sp-5);
    text-decoration: none;
    transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.brand-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--coral-light);
}
.brand-name {
    display: block;
    font-weight: 700;
    color: var(--charcoal);
    font-size: 0.95rem;
    margin-bottom: var(--sp-1);
}
.brand-count {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* ============================================
   PAGE CONTENT
   ============================================ */
.page-content {
    color: var(--text);
    line-height: 1.85;
    font-size: 1rem;
}
.page-content h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--charcoal);
    margin: var(--sp-6) 0 var(--sp-3);
}
.page-content p {
    margin-bottom: var(--sp-4);
}
.page-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ============================================
   SEARCH PAGE FORM
   ============================================ */
.search-page-form {
    margin-bottom: var(--sp-6);
}
.search-page-input-wrap {
    display: flex;
    gap: var(--sp-2);
    max-width: 600px;
}
.search-page-input {
    flex: 1;
    padding: var(--sp-3) var(--sp-4);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--charcoal);
    outline: none;
    transition: border-color var(--dur) var(--ease);
}
.search-page-input:focus {
    border-color: var(--primary);
}

/* Sort bar enhancements */
.sort-options {
    display: flex;
    gap: var(--sp-1);
    font-size: 0.8rem;
}
.sort-option {
    padding: var(--sp-1) var(--sp-3);
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--gray-500);
    white-space: nowrap;
    transition: all var(--dur-fast) var(--ease);
}
.sort-option:hover {
    background: var(--gray-100);
    color: var(--charcoal);
}
.sort-option.active {
    color: var(--primary);
    background: var(--coral-glow);
}
.sort-count {
    color: var(--gray-400);
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Page article */
.page-article {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--gray-150);
    padding: var(--sp-6) var(--sp-8);
    margin-bottom: var(--sp-6);
}
.page-article-title {
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    font-weight: 800;
    color: var(--charcoal);
    margin-bottom: var(--sp-6);
    letter-spacing: -0.01em;
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
    text-align: center;
    padding: var(--sp-12) var(--sp-6);
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--gray-150);
}
.empty-state svg {
    width: 56px;
    height: 56px;
    color: var(--gray-300);
    margin: 0 auto var(--sp-4);
}
.empty-state h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: var(--sp-2);
}
.empty-state p {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: var(--sp-5);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--charcoal);
    color: rgba(255,255,255,.6);
    margin-top: var(--sp-12);
}

/* Footer grid */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-8);
    padding: var(--sp-10) 0 var(--sp-6);
}
@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}
.footer-logo {
    height: 32px;
    width: auto;
}
.footer-brand img {
    height: 30px;
    width: auto;
}
.footer-tagline {
    font-size: 0.85rem;
    line-height: 1.6;
    max-width: 300px;
}

.footer-col {
    display: flex;
    flex-direction: column;
}
.footer-heading {
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--sp-4);
}
.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}
.footer-links li {
    list-style: none;
}
.footer-links a {
    color: rgba(255,255,255,.5);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--dur-fast) var(--ease);
}
.footer-links a:hover {
    color: var(--white);
}

/* Legacy footer-inner */
.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-8);
    padding: var(--sp-10) 0 var(--sp-6);
}
@media (min-width: 768px) {
    .footer-inner {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer-section h4 {
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--sp-4);
}
.footer-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}
.footer-section a {
    color: rgba(255,255,255,.5);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--dur-fast) var(--ease);
}
.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: var(--sp-5) 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    font-size: 0.8rem;
}
@media (min-width: 640px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}
.footer-disclaimer {
    font-size: 0.75rem;
    opacity: 0.5;
}
.footer-bottom .disclaimer {
    font-size: 0.75rem;
    opacity: 0.5;
}

/* ============================================
   UTILITIES
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Page heading pattern */
.page-heading {
    margin-bottom: var(--sp-6);
}
.page-heading h1 {
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    font-weight: 800;
    color: var(--charcoal);
    letter-spacing: -0.01em;
}
.page-heading p {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-top: var(--sp-1);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Staggered entrance for product cards */
.product-grid .product-card {
    animation: fadeUp var(--dur-slow) var(--ease) both;
}
.product-grid .product-card:nth-child(1) { animation-delay: 0ms; }
.product-grid .product-card:nth-child(2) { animation-delay: 50ms; }
.product-grid .product-card:nth-child(3) { animation-delay: 100ms; }
.product-grid .product-card:nth-child(4) { animation-delay: 150ms; }
.product-grid .product-card:nth-child(5) { animation-delay: 200ms; }
.product-grid .product-card:nth-child(6) { animation-delay: 250ms; }
.product-grid .product-card:nth-child(7) { animation-delay: 300ms; }
.product-grid .product-card:nth-child(8) { animation-delay: 350ms; }

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Back-to-top (styled via JS, these override) */
.back-to-top {
    background: var(--coral) !important;
    border-radius: var(--radius) !important;
    font-weight: 800 !important;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}
