@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700;800&display=swap');

/* ===== Theme variables (black & smoke-white, editorial-modern palette) ===== */
:root {
    --color-primary: #121212;     /* rich black - header, trust, headings */
    --color-secondary: #4A4A4A;   /* charcoal - secondary accent */
    --color-cta: #FF5C39;         /* punchy red-orange - affiliate buttons pop against black/white */
    --color-cta-2: #FFB800;       /* amber, gradient partner for CTA */
    --color-accent: #FFC93C;      /* gold - stars / value */
    --color-success: #00B37E;     /* verified badges */
    --color-danger: #E63946;      /* sparse use only */
    --color-bg: #FFFFFF;          /* plain white */
    --color-card: #FFFFFF;
    --color-text: #161616;
    --color-muted: #6B6B6B;
    --color-border: #E6E6E6;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 4px 18px rgba(18, 18, 18, 0.08);
    --shadow-hover: 0 12px 30px rgba(18, 18, 18, 0.16);
    --max-width: 1180px;
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary) 45%, black) 100%);
    --gradient-cta: linear-gradient(135deg, var(--color-cta) 0%, var(--color-cta-2) 100%);
    --gradient-hero: #FFFFFF;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.65;
}
h1, h2, h3, h4 { font-family: 'Poppins', 'Inter', sans-serif; letter-spacing: -0.01em; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }

/* ===== Header / Nav ===== */
.site-header {
    background: var(--gradient-primary);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.25);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.4rem; }
.brand img { height: 36px; width: auto; border-radius: 8px; }
.brand:hover { text-decoration: none; opacity: 0.92; }

.nav-toggle {
    display: none;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 8px;
    padding: 4px 10px;
}
.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav a { color: #fff; font-weight: 600; opacity: 0.92; padding-bottom: 3px; }
.main-nav a:hover { opacity: 1; text-decoration: none; border-bottom: 2px solid var(--color-accent); }

.search-form { display: flex; }
.search-form input { border: none; border-radius: 20px 0 0 20px; padding: 9px 14px; width: 180px; font-family: inherit; }
.search-form button { border: none; background: var(--color-accent); color: #3a2e00; border-radius: 0 20px 20px 0; padding: 9px 16px; cursor: pointer; font-weight: 700; }

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1A1A1A;
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 16px 20px;
        gap: 14px;
    }
    .main-nav.open { display: flex; }
    .search-form { width: 100%; }
    .search-form input { flex: 1; width: auto; }
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-cta {
    background: var(--gradient-cta);
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 92, 122, 0.35);
    font-size: 1.05rem;
}
.btn-cta:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 12px 26px rgba(255, 92, 122, 0.45); color: #fff; }
.btn-primary { background: var(--gradient-primary); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; text-decoration: none; }
.btn-sm { padding: 7px 15px; font-size: 0.85rem; border-radius: 20px; }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ===== Cards / grids ===== */
.section { padding: 44px 0; }
.section-title { font-size: 1.7rem; margin-bottom: 22px; color: var(--color-text); position: relative; display: inline-block; }
.section-title::after { content: ''; display: block; width: 56px; height: 5px; border-radius: 4px; background: var(--gradient-cta); margin-top: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }

.product-card {
    background: var(--color-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    border: 1px solid var(--color-border);
}
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-5px); }
.product-card img { width: 100%; height: 190px; object-fit: cover; background: #eee; }
.product-card .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card h3 { margin: 0; font-size: 1.08rem; font-family: 'Poppins', sans-serif; }
.product-card h3 a { color: var(--color-text); }
.product-card .excerpt { color: var(--color-muted); font-size: 0.92rem; flex: 1; }
.product-card .tag-chip { font-size: 0.68rem; padding: 3px 9px; }

.badge {
    display: inline-block;
    background: var(--color-success);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 12px;
    width: fit-content;
    letter-spacing: 0.02em;
}
.badge-featured { background: var(--gradient-cta); color: #fff; }

.stars { color: var(--color-accent); font-size: 1rem; letter-spacing: 1px; }
.stars .star-empty { color: #E5E2F5; }
.rating-count { color: var(--color-muted); font-size: 0.85rem; }

.tag-chip {
    display: inline-block;
    background: #EFEBFF;
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 14px;
    margin: 2px 4px 2px 0;
    transition: transform 0.15s ease;
}
.tag-chip:hover { transform: translateY(-1px); text-decoration: none; }
.tag-chip.chip-c1 { background: #EFEBFF; color: #6C5CE7; }
.tag-chip.chip-c2 { background: #E0F9F6; color: #00A896; }
.tag-chip.chip-c3 { background: #FFE8EE; color: #FF5C7A; }
.tag-chip.chip-c4 { background: #FFF4D9; color: #C98A00; }
.tag-chip.chip-c5 { background: #E7F0FF; color: #2E6BFF; }
.tag-chip.chip-c6 { background: #FCE7FF; color: #C026D3; }
.tag-chip.chip-c1:hover { background: #6C5CE7; color: #fff; }
.tag-chip.chip-c2:hover { background: #00A896; color: #fff; }
.tag-chip.chip-c3:hover { background: #FF5C7A; color: #fff; }
.tag-chip.chip-c4:hover { background: #C98A00; color: #fff; }
.tag-chip.chip-c5:hover { background: #2E6BFF; color: #fff; }
.tag-chip.chip-c6:hover { background: #C026D3; color: #fff; }

/* ===== Product detail page ===== */
.product-hero { display: grid; grid-template-columns: 1fr 1.3fr; gap: 32px; align-items: start; margin-bottom: 30px; }
.product-hero .price { font-size: 1.5rem; font-weight: 800; font-family: 'Poppins', sans-serif; color: var(--color-cta); }

/* ===== Product media gallery — object-fit:contain everywhere so nothing gets cropped, regardless of the source image/video's aspect ratio ===== */
.product-media-main {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #F0EFEC;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.media-panel { width: 100%; height: 100%; }
.media-panel img { width: 100%; height: 100%; object-fit: contain; border-radius: 0; box-shadow: none; }
.media-panel .video-embed { margin-top: 0; height: 100%; padding-top: 0; border-radius: 0; }
.product-media-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.media-thumb {
    flex: 0 0 auto;
    width: 64px; height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: #F0EFEC;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.media-thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 0; box-shadow: none; }
.media-thumb.active { border-color: var(--color-cta); }
.media-thumb-video { background: #1a1a1a; color: #fff; font-size: 1.4rem; }

@media (max-width: 760px) {
    .product-media-main { aspect-ratio: 1 / 1; }
}
.cta-box { background: var(--color-card); border-radius: var(--radius); padding: 22px; text-align: center; margin-top: 18px; box-shadow: var(--shadow); position: relative; }
.cta-box::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: var(--radius);
    padding: 2px;
    background: var(--gradient-cta);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.cta-box .btn-cta { width: 100%; font-size: 1.15rem; padding: 16px; }
.cta-box small { display: block; margin-top: 10px; color: var(--color-muted); }

@media (max-width: 760px) {
    .product-hero { grid-template-columns: 1fr; }
}

.content-body { background: var(--color-card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin-bottom: 26px; }
.content-body h2 { color: var(--color-primary); }

.video-embed { position: relative; width: 100%; padding-top: 56.25%; margin-top: 20px; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.video-embed iframe, .video-embed video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* ===== Author byline / bio box (E-E-A-T trust signals) ===== */
.byline { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 0.9rem; color: var(--color-muted); }
.byline-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.byline a { color: var(--color-text); font-weight: 700; }

.author-box { display: flex; gap: 20px; align-items: flex-start; border: 1px solid var(--color-border); }
.author-box-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box-name { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.1rem; }
.author-box-title { color: var(--color-cta); font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.author-box-links { font-size: 0.88rem; }

@media (max-width: 500px) {
    .author-box { flex-direction: column; align-items: center; text-align: center; }
}

/* ===== Reviews / comments ===== */
.review-item { border-bottom: 1px solid var(--color-border); padding: 16px 0; display: flex; gap: 12px; }
.review-item img { width: 42px; height: 42px; border-radius: 50%; }
.review-item .meta { font-size: 0.82rem; color: var(--color-muted); }
.review-form textarea { width: 100%; min-height: 100px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 12px; font-family: inherit; }
.star-input { font-size: 1.7rem; cursor: pointer; color: #E5E2F5; }
.star-input .active { color: var(--color-accent); }
.g-signin-wrap { margin: 14px 0; }

/* ===== Sidebar / footer ad slots ===== */
.ad-slot { text-align: center; margin: 20px 0; }

/* ===== Footer ===== */
.site-footer { background: #0D0D0D; color: #C2C2C2; padding: 44px 0 22px; margin-top: 54px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; margin-bottom: 24px; }
.site-footer h4 { color: #fff; margin-bottom: 10px; font-family: 'Poppins', sans-serif; }
.site-footer a { color: #C2C2C2; }
.site-footer a:hover { color: var(--color-accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 16px; text-align: center; font-size: 0.85rem; color: #7A7A7A; }

/* ===== Forms (generic, shared with admin) ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 0.9rem; }
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
}
.form-control:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15); }
textarea.form-control { min-height: 120px; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-weight: 600; }
.alert-success { background: #DEFBF3; color: #00A87E; }
.alert-error { background: #FFE4E7; color: var(--color-danger); }
.alert-info { background: #EFEBFF; color: var(--color-primary); }

.breadcrumbs { font-size: 0.85rem; color: var(--color-muted); margin-bottom: 16px; }
.category-hero-image { width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; margin-bottom: 16px; }
.pagination { display: flex; gap: 6px; justify-content: center; margin: 30px 0; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: var(--radius-sm); background: var(--color-card); box-shadow: var(--shadow); }
.pagination .current { background: var(--gradient-primary); color: #fff; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--color-muted); }
