/* Two themes: .t-shop (tab 1: playful, turquoise) and .t-fashion (tab 2: editorial, purple). */
:root, .t-shop {
  --bg: #f4fdfb;
  --surface: #ffffff;
  --band: #dff7f2;
  --ink: #12332f;
  --muted: #557570;
  --line: #c9ece5;
  --brand: #0d9488;
  --brand-ink: #ffffff;
  --accent: #ff8a3d;
  --radius: 22px;
  --btn-radius: 999px;
  --shadow: 0 2px 0 rgba(13, 148, 136, .10), 0 10px 26px rgba(13, 148, 136, .12);
  --font-head: Fredoka, "Trebuchet MS", sans-serif;
  --font-body: Nunito, system-ui, sans-serif;
  --head-weight: 600;
  --switch-bg: #0b5f58;
  color-scheme: light;
}
.t-fashion {
  --bg: #fcfaff;
  --surface: #ffffff;
  --band: #f3eefc;
  --ink: #1d1530;
  --muted: #6c6380;
  --line: #e6def5;
  --brand: #6d28d9;
  --brand-ink: #ffffff;
  --accent: #c026d3;
  --radius: 4px;
  --btn-radius: 2px;
  --shadow: none;
  --font-head: "Playfair Display", Georgia, serif;
  --font-body: Inter, system-ui, sans-serif;
  --head-weight: 500;
  --switch-bg: #3b1278;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .t-shop {
    --bg: #0c1f1d; --surface: #12302c; --band: #0f2825; --ink: #e6fbf7; --muted: #9cc4bd;
    --line: #1e4540; --brand: #2dd4bf; --brand-ink: #062320; --accent: #ffa463; --switch-bg: #06312d; color-scheme: dark;
  }
  :root:not([data-theme="light"]) .t-fashion {
    --bg: #130d1f; --surface: #1c142d; --band: #191127; --ink: #f1ecfb; --muted: #b0a6c6;
    --line: #2f2447; --brand: #a78bfa; --brand-ink: #130d1f; --accent: #e879f9; --switch-bg: #0c0716; color-scheme: dark;
  }
}
:root[data-theme="dark"] .t-shop {
  --bg: #0c1f1d; --surface: #12302c; --band: #0f2825; --ink: #e6fbf7; --muted: #9cc4bd;
  --line: #1e4540; --brand: #2dd4bf; --brand-ink: #062320; --accent: #ffa463; --switch-bg: #06312d; color-scheme: dark;
}
:root[data-theme="dark"] .t-fashion {
  --bg: #130d1f; --surface: #1c142d; --band: #191127; --ink: #f1ecfb; --muted: #b0a6c6;
  --line: #2f2447; --brand: #a78bfa; --brand-ink: #130d1f; --accent: #e879f9; --switch-bg: #0c0716; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font-body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; font-weight: var(--head-weight); }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.section { padding: 56px 16px; }
.band { background: var(--band); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 600; color: var(--brand); margin: 0 0 .6em; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.fine { font-size: .82rem; color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 99; background: var(--surface); padding: 8px 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: var(--brand-ink); border: 0; border-radius: var(--btn-radius); padding: 12px 22px; font: 600 .95rem var(--font-body); cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn-sm { padding: 8px 14px; font-size: .82rem; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-block { width: 100%; margin-top: 10px; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { font: 700 1.6rem var(--font-head); color: var(--brand); text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--ink); }
.nav { display: flex; gap: 18px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .94rem; }
.nav a:hover { color: var(--brand); }
.search { margin-left: auto; }
.search input { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 14px; width: 190px; font: inherit; font-size: .9rem; }
.cart-link { text-decoration: none; color: var(--ink); font-weight: 600; white-space: nowrap; }
.cart-count { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-size: .75rem; text-align: center; }
@media (max-width: 860px) {
  .top-in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px 16px; }
  .nav { order: 3; width: 100%; overflow-x: auto; gap: 16px; }
  .search { margin-left: auto; }
  .search input { width: 130px; }
}

/* Hero */
.hero { padding: 48px 0 24px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
.hero h1 em { font-style: normal; color: var(--brand); }
.pills { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.pills li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .85rem; font-weight: 500; }
.hero-alt { color: var(--muted); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 28px; } }

/* Finder */
.finder { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.drop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; border: 2px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); border-radius: var(--radius); padding: 30px 16px; cursor: pointer; background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.drop.over { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); }
.drop span:last-child { font-size: .85rem; color: var(--muted); }
.drop-icon { font-size: 1.8rem; color: var(--brand); }
.finder-out:empty { display: none; }
.finder-out { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.preview { width: 100%; max-height: 220px; object-fit: contain; border-radius: 12px; background: var(--band); }
.found { margin-top: 16px; }
.found h3 { font-size: 1.1rem; margin-bottom: .2em; }
.found p { margin: 0 0 8px; color: var(--muted); font-size: .9rem; }
.mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.mini a { display: block; background: var(--band); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--ink); font-size: .82rem; }
.mini a span { display: block; padding: 6px 8px; }
.mini b { color: var(--brand); }
.tag { display: inline-block; font-size: .7rem; font-weight: 600; background: var(--accent); color: #fff; border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { color: #b3261e; }

/* Grids */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.section-head a { font-weight: 600; text-decoration: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.tile:hover, .card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile-name { display: block; font: 700 1.1rem var(--font-head); padding: 12px 14px 2px; }
.tile-blurb { display: block; padding: 0 14px 14px; font-size: .85rem; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin: 20px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.card-body { padding: 12px 14px 14px; }
.card-title { display: block; color: var(--ink); font-weight: 600; text-decoration: none; margin-bottom: 8px; }
.card-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.price { font-weight: 700; }

.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.steps li { background: var(--surface); border-radius: var(--radius); padding: 22px; counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 700; margin-bottom: 12px; }
.steps strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: .92rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.ticks { padding-left: 0; list-style: none; }
.ticks li { padding-left: 26px; position: relative; margin: 6px 0; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

/* Chat */
.chat { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; height: 460px; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: .93rem; }
.msg.bot { background: var(--band); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--brand); color: var(--brand-ink); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg .mini { margin-top: 10px; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; font: inherit; background: var(--bg); color: var(--ink); }

.guide-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.guide { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--ink); }
.guide strong { display: block; font-family: var(--font-head); font-size: 1.15rem; margin-bottom: 6px; }
.guide span { color: var(--muted); font-size: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; text-decoration: none; color: var(--ink); font-size: .9rem; }
.chip:hover { border-color: var(--brand); color: var(--brand); }

.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin: 10px 0 0; }

/* Category / product */
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.cta { margin-top: 32px; background: var(--band); border-radius: var(--radius); padding: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.guide-link { margin-top: 8px; }
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.pdp-img { border-radius: 22px; border: 1px solid var(--line); width: 100%; }
.pdp-price { font-size: 1.6rem; font-weight: 700; margin: 0 0 12px; }
.swatches { display: flex; gap: 8px; margin: 14px 0; }
.swatches span { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); }
.buy { display: flex; gap: 12px; align-items: center; margin: 18px 0; }
.buy input { width: 70px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--surface); color: var(--ink); }
.specs { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .92rem; }
.specs th, .specs td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); }
.specs th { color: var(--muted); font-weight: 500; width: 40%; }
@media (max-width: 760px) { .pdp { grid-template-columns: 1fr; gap: 20px; } }

.prose h2 { margin-top: 1.6em; }
.prose li { margin: 6px 0; }

/* Cart */
.line { display: grid; grid-template-columns: 80px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line img { border-radius: 10px; }
.line input { width: 60px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.line button { background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; font: inherit; font-size: .85rem; }
.total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 700; margin: 20px 0; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: .9rem; z-index: 50; }

/* Footer */
.foot { background: var(--band); margin-top: 40px; padding: 48px 0 20px; border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr 1fr; gap: 28px; }
.foot h3 { font: 600 .8rem var(--font-body); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.foot a:not(.logo) { display: block; color: var(--ink); text-decoration: none; font-size: .92rem; margin: 6px 0; }
.foot p { color: var(--muted); font-size: .92rem; }
.legal { font-size: .8rem; color: var(--muted); margin-top: 28px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* Section switch (two tabs) */
.switch { background: var(--switch-bg); }
.switch-in { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-top: 6px; }
.tab { display: flex; flex-direction: column; align-items: center; padding: 10px 12px 9px; border-radius: 12px 12px 0 0; text-decoration: none; color: var(--bg); opacity: .7; text-align: center; line-height: 1.25; }
.tab b { font-size: .98rem; }
.tab small { font-size: .74rem; opacity: .85; }
.tab:hover { opacity: 1; background: rgba(255, 255, 255, .06); }
.tab.on { background: var(--bg); color: var(--ink); opacity: 1; }
.tab.on b { color: var(--brand); }
.logo-sub { font: italic 500 .95rem var(--font-head); color: var(--muted); margin-left: 6px; }
.head-cta { margin-left: auto; }
@media (max-width: 520px) { .tab small { display: none; } .tab b { font-size: .88rem; } }

/* Fashion */
.hero-fashion h1 em { color: var(--accent); }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.features div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.features strong { display: block; font-family: var(--font-head); font-size: 1.15rem; margin-bottom: 6px; }
.features span { color: var(--muted); font-size: .92rem; }
.piece { background: var(--band); border-radius: 14px; padding: 14px; margin-top: 12px; }
.piece h3 { font-size: 1.05rem; margin: 0 0 4px; }
.piece p { margin: 0 0 8px; color: var(--muted); font-size: .88rem; }
.shops { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; align-items: center; }
.shops b { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 4px; }
.shops a { font-size: .8rem; padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.shops a:hover { border-color: var(--brand); color: var(--brand); }
.shops.cheap a { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }

/* Dupe finder */
.accent { font-style: normal; color: var(--accent); }
.dupe { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); margin-top: 20px; }
.dupe-form { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; }
.dupe-form input, .dupe-form select, .dupe-filters input, .dupe-filters select { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font: inherit; background: var(--bg); color: var(--ink); min-width: 0; }
.dupe-form input { font-size: 1.02rem; }
@media (max-width: 700px) { .dupe-form { grid-template-columns: 1fr 1fr; } .dupe-form input { grid-column: 1 / -1; } }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }
.dupe-filters { display: flex; flex-wrap: wrap; gap: 14px; margin: 14px 0 4px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.dupe-filters label { display: flex; align-items: center; gap: 8px; }
.dupe-filters input { width: 100px; padding: 8px 10px; }
.dupe-filters select { padding: 8px 10px; }
.loading { margin-top: 18px; }
.orig { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; margin: 20px 0 16px; padding: 14px; background: var(--band); border-radius: 16px; }
.orig img, .orig .ph { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; }
.orig h3 { margin: 0 0 4px; font-size: 1.1rem; }
.ph { display: grid; place-items: center; width: 100%; aspect-ratio: 1; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 22%, var(--band)), color-mix(in srgb, var(--accent) 22%, var(--band))); color: var(--brand); font: 700 2.4rem var(--font-head); }
.dmeta { color: var(--muted); font-size: .85rem; margin: 0 0 6px; }
.dupe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.more-h { margin: 24px 0 12px; }
.dcard { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.dcard.best { display: grid; grid-template-columns: minmax(200px, 340px) 1fr; border: 2px solid var(--accent); box-shadow: var(--shadow); }
@media (max-width: 700px) { .dcard.best { grid-template-columns: 1fr; } }
.dimg { position: relative; background: var(--band); }
.dimg img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.save { position: absolute; left: 10px; top: 10px; background: var(--accent); color: #fff; font-weight: 700; font-size: 1rem; padding: 4px 10px; border-radius: 999px; }
.best .save { font-size: 1.3rem; padding: 6px 14px; }
.heart { position: absolute; right: 10px; top: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface); color: var(--muted); font-size: 1.15rem; cursor: pointer; box-shadow: var(--shadow); }
.heart.on { color: #e0245e; }
.dbody { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.dbody h3 { font-size: 1.02rem; margin: 0 0 4px; font-family: var(--font-body); font-weight: 600; line-height: 1.35; }
.best .dbody h3 { font-family: var(--font-head); font-size: 1.4rem; }
.dprice { margin: 0 0 8px; }
.dprice b { font-size: 1.15rem; }
.dprice s { color: var(--muted); margin-left: 4px; }
.saving { color: var(--accent); font-weight: 600; font-size: .85rem; margin-left: 6px; }
.dwhy { color: var(--muted); font-size: .86rem; margin: 0 0 12px; }
.dbody .btn { margin-top: auto; }
[data-saved] { margin-top: 20px; }

/* Tab-specific touches */
.tab.on { background: var(--bg); }
.tab.on b { color: var(--brand); }
.t-shop .btn { box-shadow: 0 3px 0 color-mix(in srgb, var(--brand) 60%, #000); }
.t-shop .btn:active { transform: translateY(2px); box-shadow: none; }
.t-shop .tile, .t-shop .card { border-width: 2px; }
.t-shop .hero { background: radial-gradient(1200px 400px at 85% 0%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%); }
.t-fashion .nav a { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }
.t-fashion h1 { letter-spacing: -.01em; }
.t-fashion .hero { background: linear-gradient(180deg, var(--band), var(--bg)); }
.t-fashion .finder, .t-fashion .chat, .t-fashion .dupe { border-color: var(--ink); }
.t-fashion .eyebrow { color: var(--accent); }
.t-fashion .chip, .t-fashion .pills li { border-radius: 2px; }

/* Affiliate UI */
.tier { font-weight: 700; color: var(--accent); letter-spacing: .05em; }
.disclose { font-size: .8rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 10px; }
.h-specs { font-size: 1.1rem; margin-top: 18px; }
figure { margin: 0; }
.amazon-btn { margin: 4px 0 10px; }
.alt-link { display: block; text-align: center; font-size: .8rem; margin-top: 8px; color: var(--muted); }
.mini-card { background: var(--band); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.mini .mini-card > a:first-child { background: none; border-radius: 0; }
.mini-buy { display: block; margin: 0 8px 8px; padding: 6px 8px; text-align: center; font-size: .75rem; font-weight: 600; border-radius: var(--btn-radius); background: var(--brand); color: var(--brand-ink) !important; text-decoration: none; }
.legal a { display: inline !important; color: var(--muted) !important; text-decoration: underline !important; }
.dimg .ph { aspect-ratio: 4 / 3; }
@media (max-width: 700px) { .dcard.best .dimg .ph, .dcard.best .dimg img { aspect-ratio: 16 / 9; } }
