/* =========================================================
   Products catalogue page - scoped stylesheet
   Inherits the same look as the homepage, with adjustments
   for the catalogue layout and load-more control.
   ========================================================= */

:root {
    --bg: #ffffff;
    --bg-soft: #fafafa;
    --bg-elev: #ffffff;
    --text: #1f1f1f;
    --text-muted: #5a5a5a;
    --text-soft: #8a8a8a;
    --border: #ececec;
    --border-strong: #d8d8d8;
    --hero-bg: #c9bff0;
    --accent-btn: #ece6ff;
    --accent-btn-hover: #dcd2ff;
    --green: #b6f0a0;
    --green-strong: #9be07f;
    --green-soft: #e7fbe0;
    --chip-bg: #f1f1f1;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-search: 0 6px 18px rgba(0, 0, 0, 0.06);
    --icon-fill: #1f1f1f;
    --icon-on-dark: #ffffff;
    --rating-popular-bg: #ffe5b8;
    --rating-popular-fg: #6a3a00;
    --rating-new-bg: #e7fbe0;
    --rating-new-fg: #0a5b0a;
    --radius: 10px;
    --radius-sm: 6px;
    --container: 1200px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --ink: #1f1f1f;
    --ink-muted: #5a5a5a;
    --card: #ffffff;
    --link: #4338ca;
    --link-hover: #3730a3;
}

[data-theme="dark"] {
    --bg: #121214;
    --bg-soft: #1a1a1d;
    --bg-elev: #1f1f24;
    --text: #f4f4f5;
    --text-muted: #b5b5bb;
    --text-soft: #8a8a92;
    --border: #2a2a30;
    --border-strong: #3a3a42;
    --hero-bg: #2a2454;
    --accent-btn: #2d2750;
    --accent-btn-hover: #3a3370;
    --green: #2f7a3f;
    --green-strong: #3aa050;
    --green-soft: #1f3a26;
    --chip-bg: #26262c;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-search: 0 6px 18px rgba(0, 0, 0, 0.5);
    --icon-fill: #f4f4f5;
    --icon-on-dark: #1a1a1d;
    --rating-popular-bg: #4a3a18;
    --rating-popular-fg: #ffd699;
    --rating-new-bg: #1f3a26;
    --rating-new-fg: #a8e6b0;
    --ink: #f4f4f5;
    --ink-muted: #c4c4cc;
    --card: #1f1f24;
    --link: #a5b4fc;
    --link-hover: #c7d2fe;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.2s ease, color 0.2s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; padding: 0; margin: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: transparent; color: inherit; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Header (same as homepage) ---------- */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 24px;
}
.logo {
    display: inline-flex;
    align-items: center;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.01em;
}
.logo-text {
    color: var(--text);
    white-space: nowrap;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.logo-dot { color: var(--text); }

.primary-nav ul { display: flex; gap: 32px; }
.primary-nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.15s ease;
    padding: 6px 0;
    position: relative;
}
.primary-nav a:hover,
.primary-nav a.active { color: var(--text); }
.primary-nav a.active::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
}

.header-actions { display: flex; align-items: center; gap: 10px; }

/* Translate */
.translate-box { display: inline-flex; align-items: center; min-height: 32px; }
.translate-box .goog-te-gadget { font-size: 0 !important; color: transparent !important; }
.translate-box .goog-te-gadget .goog-te-combo {
    margin: 0 !important;
    padding: 6px 28px 6px 10px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    color: var(--text);
    background: var(--chip-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
}
[data-theme="dark"] .translate-box .goog-te-combo {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23bbb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}
.translate-box .goog-te-gadget > span > a { display: none !important; }
.translate-box .goog-te-banner-frame.skiptranslate { display: none !important; }
body { top: 0 !important; }

/* Theme toggle */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--chip-bg);
    border: 1px solid var(--border);
    color: var(--text);
    transition: background 0.15s ease, transform 0.1s ease;
}
.theme-toggle:hover { background: var(--border); }
.theme-toggle:active { transform: scale(0.95); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline-block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: inline-block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Nav toggle (mobile) */
.nav-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--chip-bg);
    border: 1px solid var(--border);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
}
.nav-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Page hero ---------- */
.page-hero {
    background: var(--hero-bg);
    padding: 64px 0 48px;
    text-align: center;
    transition: background 0.2s ease;
}
.page-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: var(--bg-elev);
    color: var(--text);
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}
.page-title {
    font-size: 44px;
    font-weight: 800;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    color: var(--text);
}
.page-subtitle {
    max-width: 620px;
    margin: 0 auto 28px;
    font-size: 14px;
    color: var(--text-muted);
}
.page-hero .hero-stats {
    justify-content: center;
    gap: 40px;
    margin: 8px 0 0;
}

/* ---------- Products section ---------- */
.products-section { padding: 56px 0 96px; }

.catalog-search-bar {
    width: 100%;
    max-width: 720px;
    margin: 0 auto 28px;
    box-shadow: var(--shadow-search);
}

.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.filter-label { font-size: 14px; font-weight: 600; color: var(--text); flex-shrink: 0; }
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.result-count {
    margin: -8px 0 24px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: right;
}
.result-count #result-count { color: var(--text); font-weight: 700; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, color 0.15s ease;
}
.chip:hover { background: var(--chip-bg); color: var(--text); }
.chip-active { color: var(--text); font-weight: 600; }
.chip-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--chip-bg);
}
.chip-icon-green { background: var(--green); color: var(--rating-new-fg); }

.filter-clear {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 999px;
    flex-shrink: 0;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, color 0.15s ease;
}
.filter-clear:hover { background: rgba(239, 68, 68, 0.16); color: #991b1b; }
.filter-clear[hidden] { display: none; }
[data-theme="dark"] .filter-clear {
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.25);
}

/* ---------- Product card (same shape as homepage) ---------- */
.product-list { display: flex; flex-direction: column; gap: 16px; }

.catalog-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 15px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg-soft);
}

.product-card {
    display: grid;
    grid-template-columns: 130px 1.2fr 110px 1.5fr 1.3fr 200px;
    align-items: center;
    gap: 20px;
    padding: 18px 22px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.product-card:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08); }
.product-card.is-hidden { display: none; }

.product-logo { display: inline-block; }
.logo-square {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.1;
    padding: 6px;
}
.logo-square-text { display: block; }

.logo-square img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 4px;
}

/* Tall product bottle images (supplements, etc.) */
.logo-square-product {
    width: 84px;
    height: 108px;
    padding: 6px 8px;
}
.logo-square-product img {
    padding: 0;
    object-fit: contain;
    object-position: center bottom;
}

[data-theme="dark"] .logo-square-image {
    background: #ffffff !important;
    border-color: #d4d4d8 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.product-name h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--text); }
.product-name h3 a:hover { text-decoration: underline; }
.product-tag { display: block; font-size: 12px; color: var(--text-soft); margin-top: 2px; }

.product-rating { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.product-rating .star { display: inline-flex; align-items: center; }
.rating-value { font-size: 18px; font-weight: 700; color: var(--text); }
.rating-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
}
.rating-new { color: var(--rating-new-fg); background: var(--rating-new-bg); }
.rating-trending { color: var(--rating-popular-fg); background: var(--rating-popular-bg); }
.rating-popular { color: var(--rating-popular-fg); background: var(--rating-popular-bg); }

.product-bonus { font-size: 13px; color: var(--text); line-height: 1.5; }
.bonus-line { margin: 0; font-weight: 600; }
.bonus-line strong { font-weight: 700; }
.bonus-meta { margin: 4px 0 0; font-size: 11px; color: var(--text-soft); font-weight: 400; }

.product-features { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); }
.product-features li { display: flex; align-items: center; gap: 6px; }
.check { color: #2ea44f; font-weight: 700; }

.product-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.read-review { font-size: 12px; color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.read-review:hover { color: var(--text); }

/* ---------- Buttons (shared) ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease, color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
    border: 1px solid transparent;
    cursor: pointer;
}
.btn-visit {
    background: var(--green);
    color: var(--text);
    border-color: var(--green-strong);
    border-radius: var(--radius-sm);
}
.btn-visit:hover { background: var(--green-strong); }
.btn-view-more {
    background: var(--accent-btn);
    color: var(--text);
    border-color: var(--accent-btn);
    border-radius: 999px;
    padding: 14px 28px;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: var(--shadow-card);
}
.btn-view-more:hover {
    background: var(--accent-btn-hover);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.btn-view-more svg { transition: transform 0.15s ease; }
.btn-view-more:hover svg { transform: translateX(3px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- Load more ---------- */
.load-more-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 32px;
}
.load-more-meta {
    margin: 0;
    font-size: 12px;
    color: var(--text-soft);
}
.load-more-meta span { color: var(--text); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    padding: 56px 0 24px;
    margin-top: 32px;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}
.footer-brand p { font-size: 13px; color: var(--text-muted); margin: 12px 0 0; max-width: 360px; }
.footer-links h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 12px; color: var(--text); }
.footer-links ul { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 13px; color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; text-align: center; font-size: 12px; color: var(--text-soft); }

/* =========================================================
   AdSense ad slots
   ========================================================= */
.ad-slot {
    margin: 28px 0;
    padding: 14px 0;
    text-align: center;
    background: var(--bg-soft);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 60px;
}
.ad-slot::before {
    content: 'Advertisement';
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 10px;
    opacity: 0.6;
}
.ad-slot .adsbygoogle {
    display: block;
    min-height: 90px;
    margin: 0 auto;
}
.ad-slot-list {
    margin: 20px 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .product-card { grid-template-columns: 110px 1.1fr 100px 1.3fr 1.1fr 180px; gap: 14px; padding: 16px; }
    .primary-nav ul { gap: 22px; }
}

@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; }
    .primary-nav {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg-elev);
        border-bottom: 1px solid var(--border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }
    .primary-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 8px 24px 16px;
    }
    .primary-nav li { border-bottom: 1px solid var(--border); }
    .primary-nav li:last-child { border-bottom: none; }
    .primary-nav a { display: block; padding: 14px 0; }
    .nav-open .primary-nav { max-height: 500px; }

    .product-card { grid-template-columns: 1fr 1fr; gap: 16px; }
    .product-logo, .product-name, .product-rating, .product-bonus, .product-features, .product-actions { grid-column: span 2; }
    .product-actions { flex-direction: row; justify-content: space-between; }
    .page-title { font-size: 34px; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .header-inner { height: 60px; gap: 12px; }
    .header-actions { gap: 6px; }
    .logo { font-size: 16px; }

    .page-hero { padding: 40px 0 32px; }
    .page-title { font-size: 28px; }
    .page-subtitle { font-size: 13px; }

    .catalog-search-bar {
        margin-bottom: 20px;
        padding: 4px 4px 4px 14px;
    }
    .catalog-search-bar input { padding: 10px 0; font-size: 13px; }
    .catalog-search-bar .btn-search { padding: 8px 12px; }
    .catalog-search-bar .btn-search span { display: none; }

    .filter-bar {
        gap: 10px;
        padding-bottom: 20px;
        flex-wrap: nowrap;
        overflow: hidden;
    }
    .filter-label { font-size: 13px; flex-shrink: 0; }
    .filter-clear { font-size: 11px; padding: 3px 8px; flex-shrink: 0; }
    .filter-chips {
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 4px;
        margin-bottom: -4px;
        flex: 1;
        min-width: 0;
    }
    .filter-chips::-webkit-scrollbar { display: none; }
    .chip {
        padding: 5px 10px;
        font-size: 12.5px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }
    .result-count {
        margin: -12px 0 20px;
        text-align: center;
        font-size: 12px;
    }

    /* Mobile product card — centered layout (matches homepage) */
    .product-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 24px 18px;
        gap: 14px;
    }
    .product-logo, .product-name, .product-rating, .product-bonus, .product-features, .product-actions { grid-column: span 1; }
    .product-logo {
        display: flex;
        justify-content: center;
        margin: 0 auto;
    }
    .product-logo .logo-square {
        width: 96px;
        height: 96px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    }
    .product-logo .logo-square-product {
        width: 120px;
        height: 150px;
        padding: 8px 10px;
    }
    .product-name { text-align: center; }
    .product-name h3 { font-size: 20px; }
    .product-tag { text-align: center; }
    .product-rating {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    .product-bonus {
        text-align: center;
        background: var(--bg-soft);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        padding: 12px 14px;
    }
    .product-features {
        align-items: flex-start;
        max-width: 280px;
        margin: 0 auto;
        text-align: left;
    }
    .product-actions { flex-direction: column; align-items: stretch; gap: 6px; }
    .btn-visit, .btn-view-more { width: 100%; padding: 14px 22px; font-size: 13px; }
    .read-review { text-align: center; }
    .footer-inner { grid-template-columns: 1fr; }
    .products-section { padding: 40px 0 64px; }
}
