/* ============================================================
   Arbor — theme.css (core)
   Tokens, reset, typography, buttons, forms, header, footer,
   cart drawer, toasts, product cards, chips, pagination
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --ink: #1c1917;
  --ink-soft: #57534e;
  --ink-mute: #9c948d;
  --line: #e8e4df;
  --line-strong: #d6d0c9;
  --accent: #1f5f4e;
  --accent-strong: #174a3c;
  --accent-soft: #e7f0ec;
  --accent-light: #7fb8a4;
  --footer-bg: #16352c;
  --footer-text: #cfe0d8;
  --footer-muted: #9db8ac;
  --footer-faint: #8ba699;
  --footer-line: rgba(255, 255, 255, .12);
  --banner-grad-end: #24443a;
  --hero-halo: #e9f1ed;
  --amber: #b45309;
  --danger: #b91c1c;
  --star: #d97706;
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, .05);
  --shadow-md: 0 12px 32px -14px rgba(28, 25, 23, .22);
  --shadow-lg: 0 24px 60px -24px rgba(28, 25, 23, .30);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------------- Color palettes (config > settings.html) ---------------- */

body[data-palette="terracotta"] {
  --accent: #b0562f;
  --accent-strong: #8e4325;
  --accent-soft: #f6eae2;
  --accent-light: #d99e7e;
  --footer-bg: #33231b;
  --footer-text: #ecd9d0;
  --footer-muted: #c9ab9e;
  --footer-faint: #a98d80;
  --banner-grad-end: #4a2c1c;
  --hero-halo: #f2e9e2;
}

body[data-palette="ocean"] {
  --accent: #20657c;
  --accent-strong: #174c5e;
  --accent-soft: #e4eef2;
  --accent-light: #7fb0c4;
  --footer-bg: #1d3b47;
  --footer-text: #cfe3e8;
  --footer-muted: #9dbdc7;
  --footer-faint: #8ba8b1;
  --banner-grad-end: #22434e;
  --hero-halo: #e8eff1;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
s { color: var(--ink-mute); font-weight: 400; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { width: min(1200px, 100% - 48px); margin-inline: auto; }
.section { padding-block: 64px; }
.min-h-main { min-height: 55vh; }
.muted { color: var(--ink-mute); }
.mt-8 { margin-top: 28px; }

.icon { width: 20px; height: 20px; flex: none; }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link { position: fixed; top: -60px; left: 16px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 12px; }

/* ---------------- Rich text (pages, articles, descriptions) ---------------- */

.rich-text p { font-size: 16.5px; line-height: 1.85; color: #3f3a36; margin: 18px 0; }
.rich-text h2 { font-size: 24px; margin: 36px 0 12px; }
.rich-text h3 { font-size: 19px; margin: 28px 0 10px; }
.rich-text ul, .rich-text ol { margin: 18px 0; padding-left: 22px; }
.rich-text li { font-size: 16px; line-height: 1.7; color: #3f3a36; margin-bottom: 9px; }
.rich-text a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.rich-text img { border-radius: 14px; }
.rich-text strong { color: var(--ink); }
.rich-text blockquote { margin: 30px 0; padding: 6px 0 6px 24px; border-left: 3px solid var(--accent); font-size: 19px; font-weight: 500; line-height: 1.55; color: var(--ink); }

/* ---------------- Buttons ---------------- */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 24px; border-radius: 999px; font-size: 15px; font-weight: 600; line-height: 1; border: 1.5px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease; white-space: nowrap; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn .icon { width: 17px; height: 17px; }

.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 41px; height: 41px; border-radius: 50%; color: var(--ink); transition: background .15s ease; }
.icon-btn:hover { background: rgba(28, 25, 23, .06); }

.account-wrap { position: relative; }
.account-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 70;
  width: 250px; max-width: calc(100vw - 32px); padding: 8px;
  display: none; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.account-menu.open { display: block; animation: pop .16s ease; }
.account-menu a {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px;
  border-radius: var(--radius-sm); color: var(--ink); font-size: 14px; font-weight: 500;
  text-decoration: none; transition: background .12s;
}
.account-menu a:hover { background: var(--bg); }
.account-menu a:focus-visible, [data-account-menu-toggle]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.account-menu .icon { width: 17px; height: 17px; flex: none; color: var(--ink-mute); }
.account-menu-user { display: flex; flex-direction: column; padding: 10px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.account-menu-user strong { overflow: hidden; font-size: 14.5px; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-user span { overflow: hidden; color: var(--ink-mute); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-sep { height: 1px; margin: 6px 4px; background: var(--line); }

/* ---------------- Forms ---------------- */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13.5px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; font-size: 15px; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { min-height: 110px; resize: vertical; font-family: inherit; }
.field input.invalid, input.invalid { border-color: var(--danger); }
.field input.invalid:focus { box-shadow: 0 0 0 3px #fee2e2; }
.field-error { display: none; font-size: 12.5px; color: var(--danger); }
.field-error.show { display: block; }

.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--accent); }

select { appearance: none; -webkit-appearance: none; }

.form-alert { border-radius: 12px; padding: 12px 16px; font-size: 14px; font-weight: 500; margin-bottom: 18px; }
.form-alert.success { background: #ecfdf5; color: #047857; }
.form-alert.error { background: #fef2f2; color: var(--danger); }

/* ---------------- Header ---------------- */

.topbar { background: var(--ink); color: #f5f0ea; text-align: center; font-size: 12.5px; letter-spacing: .02em; padding: 9px 16px; }

.site-header { position: sticky; top: 0; z-index: 60; background: rgba(250, 249, 247, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }

.header-inner { display: flex; align-items: center; gap: 28px; height: 68px; }

.logo { display: inline-flex; align-items: center; gap: 8px; font-size: 23px; font-weight: 800; letter-spacing: -0.03em; }
.logo-icon { display: inline-flex; }
.logo-icon svg { width: 23px; height: 23px; color: var(--accent); }
.logo-img { max-height: 44px; width: auto; }
.logo-light { color: #fff; }
.logo-light .logo-icon svg { color: var(--accent-light); }

.main-nav { display: flex; gap: 30px; }
.nav-link { font-size: 14.5px; font-weight: 500; color: var(--ink-soft); padding: 6px 0; position: relative; transition: color .15s; background: none; border: 0; cursor: pointer; }
.nav-link:hover { color: var(--ink); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.header-actions .icon { stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.cart-count { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; display: none; align-items: center; justify-content: center; line-height: 1; }
.cart-count.show { display: inline-flex; }

.menu-btn { display: none; }

/* ---------------- Header search ---------------- */

.header-search { position: relative; }
.search-form { position: relative; display: flex; align-items: center; width: 200px; transition: width .25s ease; }
.header-search .search-form:focus-within { width: 270px; }
.search-glyph { position: absolute; left: 12px; display: inline-flex; color: var(--ink-mute); pointer-events: none; }
.search-glyph .icon { width: 16px; height: 16px; }
.search-input { width: 100%; padding: 9px 34px 9px 35px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: #fff; font: inherit; font-size: 13.5px; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.search-input::placeholder { color: var(--ink-mute); }
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-input::-webkit-search-cancel-button, .search-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search-clear { position: absolute; right: 5px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-mute); transition: background .12s, color .12s; }
.search-clear:hover { color: var(--ink); background: var(--bg); }
.search-clear .icon { width: 13px; height: 13px; }
.search-suggest { position: absolute; top: calc(100% + 12px); right: 0; width: 348px; max-width: calc(100vw - 32px); max-height: min(430px, 72vh); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s ease, transform .18s ease, visibility .18s; z-index: 80; }
.search-suggest::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.search-suggest.open { opacity: 1; visibility: visible; transform: none; }
.sg-label { padding: 9px 10px 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-mute); }
.sg-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; transition: background .12s ease; }
.sg-item:hover, .sg-item.active { background: var(--accent-soft); }
.sg-media { flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; color: var(--accent-strong); background: var(--hero-halo); }
.sg-media img { width: 100%; height: 100%; object-fit: cover; }
.sg-media .icon { width: 22px; height: 22px; }
.sg-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sg-text strong { font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-text > span { font-size: 11.5px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-price { flex: none; font-size: 13px; font-weight: 700; color: var(--ink); }
.sg-go { flex: none; color: var(--ink-mute); }
.sg-go .icon { width: 15px; height: 15px; }
.sg-none { padding: 13px 10px; font-size: 13px; color: var(--ink-soft); }
.sg-all { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; padding: 11px 12px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; font-size: 13px; font-weight: 600; color: var(--accent-strong); transition: background .12s ease; }
.sg-all:hover, .sg-all.active { background: var(--accent-soft); }
.sg-all .icon { width: 15px; height: 15px; flex: none; }
.sg-item:focus-visible, .sg-all:focus-visible, .search-clear:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-suggest mark { background: var(--accent-soft); color: var(--accent-strong); border-radius: 3px; padding: 0 1px; }
@media (prefers-reduced-motion: reduce) {
  .search-form, .search-input, .search-clear, .search-suggest, .sg-item, .sg-all { transition: none; }
}

.search-form-mobile { display: flex; align-items: center; position: relative; width: 100%; margin: 12px 0 6px; }
.search-form-mobile .search-input { padding: 12px 16px 12px 38px; font-size: 15px; border-radius: 12px; background: var(--bg); }
.search-form-mobile .search-glyph .icon { width: 17px; height: 17px; }

/* ---------------- Shop dropdown (categories) ---------------- */

.nav-item { position: relative; }
.nav-dropdown-toggle { display: inline-flex; align-items: center; gap: 5px; }
.nav-dropdown-toggle .icon { width: 15px; height: 15px; color: var(--ink-mute); transition: transform .2s ease; }
.nav-item.open .nav-dropdown-toggle .icon { transform: rotate(180deg); }

.dropdown-panel {
  position: absolute; left: -18px; top: calc(100% + 14px); width: 330px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 10px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 70;
}
.dropdown-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.nav-item.open .dropdown-panel { opacity: 1; visibility: visible; transform: none; }

.menu-level-1, .menu-level-2 { list-style: none; margin: 0; padding: 0; }
.menu-item { position: relative; }
.menu-row { display: flex; align-items: center; border-radius: var(--radius-sm); transition: background .12s ease; }
.menu-item:hover > .menu-row, .menu-item.open > .menu-row { background: var(--bg); }
.menu-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--radius-sm); }
.menu-art { width: 40px; height: 40px; border-radius: 11px; flex: none; overflow: hidden; background: var(--accent-soft); display: grid; place-items: center; color: #4b453f; }
.menu-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.menu-art .icon { width: 20px; height: 20px; }
.menu-link-label { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.menu-link-label strong { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.menu-link-label span { font-size: 11.5px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-count { flex: none; font-size: 11.5px; font-weight: 600; color: var(--ink-mute); background: var(--bg); border: 1px solid var(--line); padding: 1px 8px; border-radius: 999px; }

.submenu-toggle { width: 34px; height: 34px; margin-right: 6px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-mute); flex: none; transition: background .15s ease, color .15s ease; }
.submenu-toggle:hover { background: var(--accent-soft); color: var(--accent-strong); }
.submenu-toggle .icon { width: 15px; height: 15px; transition: transform .2s ease; }
.menu-item.open .submenu-toggle .icon { transform: rotate(90deg); }

.menu-level-2 {
  position: absolute; left: calc(100% - 12px); top: -10px; width: 235px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateX(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 71;
}
.menu-level-2::before { content: ""; position: absolute; top: 0; bottom: 0; left: -12px; width: 12px; }
.menu-item.open > .menu-level-2 { opacity: 1; visibility: visible; transform: none; }
.menu-level-2 a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--ink-soft); transition: background .12s ease, color .12s ease; }
.menu-level-2 a:hover { background: var(--bg); color: var(--ink); }
.menu-viewall { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 6px; }
.menu-viewall a { color: var(--accent-strong); font-weight: 600; font-size: 13.5px; }
.menu-viewall a:hover { background: transparent; color: var(--accent-strong); text-decoration: underline; }

.menu-cta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 11px 14px; border-radius: var(--radius-sm); background: var(--bg); font-size: 14px; font-weight: 600; color: var(--ink); transition: background .15s ease, color .15s ease; }
.menu-cta:hover { background: var(--accent-soft); color: var(--accent-strong); }
.menu-cta .icon { width: 16px; height: 16px; }

@media (max-width: 1100px) {
  .dropdown-panel { width: 300px; }
  .menu-level-2 { width: 210px; }
}

.mobile-nav { display: none; padding: 6px 24px 18px; border-top: 1px solid var(--line); background: var(--bg); }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; width: 100%; text-align: left; padding: 13px 4px; font-size: 15.5px; font-weight: 500; border-bottom: 1px solid var(--line); }
.mobile-nav .mobile-nav-sep { height: 8px; }

/* mobile nav accordion (two levels via native <details>) */
.m-nav-group > summary, .m-nav-sub > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
.m-nav-group > summary::-webkit-details-marker, .m-nav-sub > summary::-webkit-details-marker { display: none; }
.m-nav-group > summary { padding: 13px 4px; font-size: 15.5px; font-weight: 500; border-bottom: 1px solid var(--line); }
.m-nav-sub > summary { padding: 11px 8px; font-size: 14.5px; border-top: 1px dashed var(--line-strong); }
.m-nav-summary-right { display: inline-flex; align-items: center; gap: 10px; }
.m-nav-group > summary .icon, .m-nav-sub > summary .icon { width: 16px; height: 16px; color: var(--ink-mute); transition: transform .2s ease; }
.m-nav-group[open] > summary .icon, .m-nav-sub[open] > summary .icon { transform: rotate(180deg); }
.m-nav-panel { padding: 4px 0 10px 12px; }
.mobile-nav .m-nav-panel a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px; font-size: 14.5px; font-weight: 500; border-bottom: 0; border-radius: 9px; transition: background .12s ease; }
.mobile-nav .m-nav-panel a:hover { background: rgba(28, 25, 23, .05); }
.m-nav-sub .m-nav-panel { padding-left: 20px; }

/* ---------------- Cart drawer ---------------- */

.drawer-overlay { position: fixed; inset: 0; background: rgba(28, 25, 23, .45); opacity: 0; pointer-events: none; transition: opacity .3s ease; z-index: 79; }
.drawer-overlay.show { opacity: 1; pointer-events: auto; }

.cart-drawer { position: fixed; top: 0; right: 0; height: 100dvh; width: min(430px, 94vw); background: #fff; z-index: 80; display: flex; flex-direction: column; transform: translateX(105%); transition: transform .38s cubic-bezier(.22, 1, .3, 1); box-shadow: var(--shadow-lg); }
.cart-drawer.open { transform: translateX(0); }

.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 18px; }

.drawer-body { flex: 1; overflow-y: auto; padding: 4px 24px; }

.cart-item { display: flex; gap: 14px; align-items: center; padding-block: 18px; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.ci-media { width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; background: var(--accent-soft); flex: none; }
.ci-media img { width: 100%; height: 100%; object-fit: cover; }
.ci-info { flex: 1; min-width: 0; }
.ci-name { font-weight: 600; font-size: 14.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-name:hover { color: var(--accent); }
.ci-price { font-size: 13px; }
.ci-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ci-right strong { font-size: 14.5px; }

.cart-empty { text-align: center; padding: 64px 12px; display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--ink-mute); }
.cart-empty .icon { width: 40px; height: 40px; }
.cart-empty p { font-size: 15px; color: var(--ink-soft); }

.drawer-foot { border-top: 1px solid var(--line); padding: 18px 24px 22px; }
.subtotal { display: flex; justify-content: space-between; align-items: baseline; font-size: 15.5px; margin-bottom: 4px; }
.subtotal strong { font-size: 19px; letter-spacing: -0.02em; }
.drawer-note { font-size: 12.5px; color: var(--ink-mute); margin-bottom: 14px; }
.drawer-actions { display: flex; flex-direction: column; gap: 10px; }

/* ---------------- Toasts ---------------- */

#toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: 92vw; }
.toast { display: flex; align-items: center; gap: 9px; background: var(--ink); color: #f5f0ea; padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: toast-in .25s ease; transition: opacity .3s, transform .3s; max-width: 92vw; }
.toast .icon { width: 16px; height: 16px; color: #8fd0b8; }
.toast.hide { opacity: 0; transform: translateY(8px); }

@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------------- Footer ---------------- */

.site-footer { background: var(--footer-bg); color: var(--footer-text); margin-top: 72px; }

.footer-news { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding-block: 48px; border-bottom: 1px solid var(--footer-line); }
.footer-news h3 { color: #fff; font-size: 21px; margin-bottom: 6px; }
.footer-news p { font-size: 14px; color: var(--footer-muted); max-width: 420px; }
.footer-news form { display: flex; gap: 10px; flex: 1; max-width: 430px; min-width: 270px; }
.footer-news input[type="email"] { flex: 1; background: rgba(255, 255, 255, .08); border: 1.5px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: 12px 20px; color: #fff; font-size: 14.5px; }
.footer-news input::placeholder { color: var(--footer-faint); }
.footer-news input:focus { outline: none; border-color: var(--accent-light); }
.newsletter-success { color: var(--accent-light); font-size: 14.5px; font-weight: 600; }

.footer-grid { display: grid; grid-template-columns: 2fr repeat(var(--footer-cols, 3), 1fr); gap: 36px; padding-block: 52px; }
.footer-grid.no-aside { grid-template-columns: 1fr; }
.footer-brand p { font-size: 14px; color: var(--footer-muted); margin: 14px 0 18px; max-width: 300px; }
.socials { display: flex; gap: 8px; }
.icon-btn-light { color: var(--footer-text); border: 1px solid rgba(255, 255, 255, .16); }
.icon-btn-light:hover { background: rgba(255, 255, 255, .08); }

.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--footer-faint); margin: 0 0 14px; }
.footer-col a { display: block; font-size: 14.5px; padding: 5px 0; color: var(--footer-text); transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-col a.lang-link.active { color: #fff; font-weight: 600; }

.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-block: 22px; border-top: 1px solid var(--footer-line); font-size: 13px; color: var(--footer-faint); }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a:hover { color: #fff; }

/* ---------------- Product cards ---------------- */

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }

.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.product-media { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--accent-soft); color: #4b453f; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card:hover .product-media img { transform: scale(1.05); }

.media-link { position: absolute; inset: 0; z-index: 1; }

.product-badges { position: absolute; top: 12px; left: 12px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.badge { display: inline-flex; padding: 5px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.badge-new { background: var(--accent); color: #fff; }
.badge-sale { background: var(--amber); color: #fff; }
.badge-soldout { background: var(--ink); color: #fff; }

.quick-add { position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-md); opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease, background .15s, color .15s; }
.quick-add:hover { background: var(--accent); color: #fff; }
.quick-add .icon { width: 16px; height: 16px; }
.product-card:hover .quick-add, .quick-add:focus-visible { opacity: 1; transform: translateY(0); }
@media (hover: none) { .quick-add { opacity: 1; transform: none; } }

.product-info { padding: 14px 16px 18px; }
.product-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.product-name { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.product-name a:hover { color: var(--accent); }
.price { font-weight: 700; font-size: 15px; white-space: nowrap; }
.price s { font-size: 12.5px; margin-left: 6px; }
.product-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 7px; }
.product-cat { font-size: 11px; font-weight: 600; letter-spacing: .07em; color: var(--ink-mute); text-transform: uppercase; }
.product-rating { display: flex; justify-content: flex-end; align-items: center; }
.product-rating .rating-text { margin-left: 5px; }

/* ---------------- Stars ---------------- */

.stars { display: inline-flex; gap: 1.5px; }
.star { width: 14px; height: 14px; fill: var(--star); }
.star.off { fill: var(--line-strong); }
.rating-text { font-size: 13px; color: var(--ink-soft); }
.rating-message { background: var(--accent-soft); color: var(--accent-strong); border-radius: 12px; padding: 11px 15px; font-size: 14px; font-weight: 500; margin: 0 0 14px; }
.order-stock-notice { background: var(--accent-soft); color: var(--accent-strong); border-radius: 12px; padding: 12px 16px; margin: 0 0 20px; }
.order-stock-notice p { margin: 0; font-weight: 600; }
.order-stock-notice ul { margin: 8px 0 0; padding-left: 20px; }

/* ---------------- Chips ---------------- */

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: #fff; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); transition: border-color .15s, background .15s, color .15s; }
button.chip:hover, a.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-static { padding: 5px 12px; font-size: 12px; background: var(--accent-soft); border-color: transparent; color: var(--accent-strong); }
.chip-mini { padding: 4px 11px; font-size: 11.5px; background: var(--accent-soft); border-color: transparent; color: var(--accent-strong); }

/* ---------------- Pagination ---------------- */

.pagination { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 44px; }
.page-btn { min-width: 42px; height: 42px; padding: 0 6px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: #fff; font-size: 14.5px; font-weight: 600; color: var(--ink-soft); display: inline-flex; align-items: center; justify-content: center; transition: border-color .15s, background .15s, color .15s; }
.page-btn:hover:not(.active) { border-color: var(--ink); color: var(--ink); }
.page-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.page-btn[aria-disabled="true"] { opacity: .35; cursor: default; }
.page-btn .icon { width: 17px; height: 17px; }

/* ---------------- Breadcrumbs ---------------- */

.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--ink-mute); padding-block: 26px 0; }
.breadcrumb a:hover { color: var(--ink); }
.crumb-sep { color: var(--line-strong); }
.crumb-here { color: var(--ink); font-weight: 500; }

/* ---------------- Empty states ---------------- */

.empty-state { text-align: center; padding: 56px 20px; color: var(--ink-mute); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty-state .icon { width: 36px; height: 36px; }
.empty-state p { font-size: 15px; color: var(--ink-soft); }

/* ---------------- FAQ (native details) ---------------- */

.faq { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 22px; margin-bottom: 12px; }
.faq[open] { border-color: var(--accent); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 15px 0; font-size: 15.5px; font-weight: 600; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--ink-mute); border-bottom: 2px solid var(--ink-mute); transform: rotate(45deg); transition: transform .2s; flex: none; margin-top: -4px; }
.faq[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.faq p { font-size: 14.5px; color: var(--ink-soft); padding-bottom: 18px; }

/* ---------------- Responsive (core) ---------------- */

@media (max-width: 860px) {
  .main-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .header-search { display: none; }
  .header-inner { gap: 14px; height: 62px; }
  .section { padding-block: 48px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .container { width: min(1200px, 100% - 32px); }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .product-info { padding: 12px 13px 15px; }
  .product-name { font-size: 14px; }
  .topbar { font-size: 11px; padding: 8px 12px; }
  .footer-news { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Theme sections (editable in the v2 template editor) */
/* The header wrapper must not create a box: .site-header is sticky against <body>. */
.tiendy-section-header { display: contents; }
.text-section { text-align: center; max-width: 760px; }
.text-section--left { text-align: left; }
.text-section h2 { margin-bottom: 16px; }
.text-section__text { color: var(--ink-soft); margin-bottom: 24px; }
.text-section__text p + p { margin-top: 12px; }
.image-with-text { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.image-with-text--reverse .image-with-text__media { order: 2; }
.image-with-text__media img, .image-with-text__placeholder { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); }
.image-with-text__placeholder { background: var(--line); }
.image-with-text__copy h2 { margin: 8px 0 16px; }
.image-with-text__text { color: var(--ink-soft); margin-bottom: 24px; }
@media (max-width: 860px) {
  .image-with-text { grid-template-columns: 1fr; gap: 24px; }
  .image-with-text--reverse .image-with-text__media { order: 0; }
}
