/* =========================================================
   NOVEL EXPORT — Storefront design system (base)
   Tokens + layout + reusable components. Module styles live in
   assets/css/shop/*.css (auto-loaded by layouts/shop.php).
   ========================================================= */
:root {
  --lime: #dcfb6f;
  --lime-dark: #b9d94a;
  --ink: #111111;
  --ink-2: #1c1c1c;
  --ink-3: #2a2a2a;
  --paper: #f4f4f2;
  --white: #ffffff;
  --stone: #cfccc6;
  --line: #e3e2de;
  --muted: #6f6d68;
  --success: #1f9d55;
  --danger: #d64545;
  --warning: #d98a00;
  --info: #2b6cb0;

  --display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --logo: 'Tektur', 'Anton', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow: 0 10px 30px rgba(17, 17, 17, .08);
  --shadow-lg: 0 24px 60px rgba(17, 17, 17, .16);
  --container: 1320px;
  --gutter: clamp(16px, 3vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--body); font-size: 15px; line-height: 1.55;
  color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--lime); padding: 8px 14px; z-index: 999; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: .01em; text-transform: uppercase; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-warning { color: var(--warning); }
.text-center { text-align: center; } .text-right { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- spacing / layout utilities ---------- */
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:40px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}.mb-4{margin-bottom:40px}
.section { padding: clamp(32px, 5vw, 72px) 0; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- announcement + header ---------- */
.announce { background: var(--ink); color: var(--lime); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-align: center; padding: 8px 0; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(244, 244, 242, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
/* Header spans the full window width so the menu always fits on one line */
.site-header__inner { display: flex; align-items: center; gap: clamp(12px, 2vw, 32px); height: 72px; max-width: none; }
.icon-btn.site-header__burger { display: none; } /* .icon-btn sets display later, so match its specificity */
.brand-logo { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo__mark { width: auto; height: 44px; }
.brand-logo__word { font-family: var(--logo); font-weight: 900; font-size: 26px; letter-spacing: -.02em; line-height: 1; display: inline-flex; align-items: flex-end; gap: 6px; }
.brand-logo small { font-family: var(--body); font-size: 8px; font-weight: 800; letter-spacing: .2em; margin-bottom: 3px; }
.brand-logo--light { color: var(--stone); }

.main-nav { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.main-nav > a, .main-nav__trigger { padding: 8px 12px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; background: none; border: 0; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.main-nav > a:hover, .main-nav__trigger:hover, .main-nav > a.is-active { background: var(--ink); color: var(--lime); }
.main-nav__dropdown { position: relative; }
.main-nav__menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; display: none; z-index: 60; }
.main-nav__dropdown:hover .main-nav__menu, .main-nav__dropdown:focus-within .main-nav__menu { display: block; }
.main-nav__dropdown::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
.main-nav__menu a { display: block; padding: 8px 12px; border-radius: var(--radius-sm); font-size: 14px; }
.main-nav__menu a:hover { background: var(--paper); }
.main-nav__parent { font-weight: 700; }
.main-nav__child { padding-left: 24px !important; color: var(--muted); }

.header-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: 0 1 auto; min-width: 0; }
.header-search { position: relative; display: flex; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 0 6px 0 16px; width: 300px; flex: 0 1 300px; min-width: 160px; }
.header-search input { border: 0; background: none; outline: none; padding: 9px 0; width: 100%; font-size: 14px; }
.header-search button { background: none; border: 0; padding: 6px; display: grid; place-items: center; }
.header-search__results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 70; max-height: 420px; overflow: auto; min-width: 300px; }

.icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: none; border: 0; transition: background .2s; }
.icon-btn:hover { background: rgba(17, 17, 17, .06); }
.icon-btn__count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--lime); color: var(--ink); font-size: 10px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--paper); }

@media (max-width: 1280px) { .main-nav > a, .main-nav__trigger { padding: 8px 10px; } }
/* Below this width the six menu items no longer fit in one row: switch to the burger menu */
@media (max-width: 1140px) {
  .icon-btn.site-header__burger { display: inline-grid; }
  .site-header__inner { gap: 8px; }
  .main-nav { position: fixed; inset: 72px 0 auto 0; background: var(--paper); flex-direction: column; align-items: stretch; padding: 12px var(--gutter) 24px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); transform: translateY(-120%); transition: transform .35s var(--ease); max-height: calc(100vh - 72px); overflow: auto; }
  .main-nav.is-open { transform: translateY(0); }
  .main-nav > a, .main-nav__trigger { padding: 12px; width: 100%; justify-content: space-between; }
  .main-nav__menu { position: static; display: block; box-shadow: none; background: none; padding: 0 0 0 8px; }
  .header-search { flex-basis: 240px; }
}
@media (max-width: 760px) { .header-search { display: none; } }
@media (max-width: 420px) { .brand-logo__word small { display: none; } .brand-logo__mark { height: 36px; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: var(--radius-pill); border: 1.5px solid transparent; font-weight: 700; font-size: 14px; letter-spacing: .02em; line-height: 1.2; text-transform: uppercase; transition: background .2s, color .2s, border-color .2s, transform .15s; white-space: nowrap; background: var(--white); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-loading { opacity: .6; pointer-events: none; }
.btn--primary { background: var(--ink); color: var(--lime); }
.btn--primary:hover { background: var(--ink-3); color: var(--lime); }
.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: var(--lime-dark); }
.btn--outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--lime); }
.btn--ghost { background: transparent; }
.btn--ghost:hover { background: rgba(17, 17, 17, .06); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--sm { padding: 8px 14px; font-size: 12px; }
.btn--lg { padding: 16px 30px; font-size: 15px; }
.btn--block { width: 100%; }
.link { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

/* ---------- forms ---------- */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.label .req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); outline: none; transition: border-color .2s, box-shadow .2s; font-size: 15px;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(220, 251, 111, .6); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.textarea { min-height: 110px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23111' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.field-error { color: var(--danger); font-size: 13px; margin-top: 5px; }
.help { color: var(--muted); font-size: 13px; margin-top: 5px; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }

/* quantity stepper: <div class="qty"><button data-qty-dec>-</button><input ...><button data-qty-inc>+</button></div> */
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius-pill); background: var(--white); overflow: hidden; }
.qty button { width: 38px; height: 40px; border: 0; background: none; font-size: 18px; font-weight: 700; }
.qty button:hover { background: var(--paper); }
.qty input { width: 44px; text-align: center; border: 0; outline: none; font-weight: 700; -moz-appearance: textfield; background: none; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- alerts, badges ---------- */
.flash-wrap { padding-top: 16px; }
.alert { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 12px; font-size: 14px; font-weight: 500; border: 1px solid; }
.alert--success { background: #eaf7ef; border-color: #b8e2c8; color: #155d34; }
.alert--danger { background: #fdeeee; border-color: #f2c1c1; color: #8e2424; }
.alert--warning { background: #fff6e5; border-color: #f4d9a4; color: #7a4e00; }
.alert--info { background: #eaf2fb; border-color: #bfd6f0; color: #1d4d80; }
.alert__close { background: none; border: 0; font-size: 20px; line-height: 1; opacity: .6; padding: 0 4px; }
.alert ul { padding-left: 18px; list-style: disc; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--line); color: var(--ink); white-space: nowrap; }
.badge--success { background: #dcf3e5; color: #17663a; }
.badge--danger { background: #fbe0e0; color: #9b2222; }
.badge--warning { background: #fdefd2; color: #8a5600; }
.badge--info { background: #dfeaf8; color: #1f4f86; }
.badge--primary { background: var(--ink); color: var(--lime); }
.badge--lime { background: var(--lime); color: var(--ink); }
.badge--muted { background: var(--line); color: var(--muted); }

/* ---------- cards, panels ---------- */
.card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); }
.card__body { padding: 24px; }
.card__head { padding: 18px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card__head h2, .card__head h3 { margin: 0; font-size: 16px; }

/* ---------- page header & breadcrumb ---------- */
.page-head { padding: clamp(24px, 4vw, 48px) 0 clamp(16px, 2vw, 24px); }
.page-head__title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(34px, 6vw, 72px); line-height: .95; margin: 0; }
.page-head__sub { color: var(--muted); margin-top: 10px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb span[aria-current] { color: var(--ink); font-weight: 600; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px; border-bottom: 1px solid var(--line); font-weight: 700; }
.table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }

/* ---------- pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 32px 0 8px; }
.pagination a, .pagination span { min-width: 40px; height: 40px; padding: 0 12px; display: grid; place-items: center; border-radius: var(--radius-pill); border: 1.5px solid var(--line); background: var(--white); font-weight: 700; font-size: 14px; }
.pagination a:hover { border-color: var(--ink); }
.pagination .is-active { background: var(--ink); color: var(--lime); border-color: var(--ink); }
.pagination .is-disabled { opacity: .4; }
.pagination .is-gap { border: 0; background: none; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs__btn { background: none; border: 0; padding: 12px 16px; font-weight: 700; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs__btn.is-active { border-color: var(--ink); }
.tab-panel { display: none; } .tab-panel.is-active { display: block; }

/* ---------- rating stars: <span class="stars" style="--rating: 4.3"></span> ---------- */
.stars { --size: 15px; display: inline-block; font-size: var(--size); line-height: 1; letter-spacing: 2px; position: relative; }
.stars::before { content: '★★★★★'; background: linear-gradient(90deg, #f5b301 calc(var(--rating, 0) / 5 * 100%), #d8d6d0 calc(var(--rating, 0) / 5 * 100%)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: 64px 16px; }
.empty__icon { font-size: 44px; margin-bottom: 8px; }
.empty h3 { font-size: 20px; }
.empty p { color: var(--muted); }

/* ---------- modal / drawer ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(17, 17, 17, .5); }
.modal.is-open { display: flex; }
.modal__box { background: var(--white); border-radius: var(--radius); width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal__head h3 { margin: 0; font-size: 18px; }
.modal__body { padding: 22px; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: var(--white); z-index: 210; transform: translateX(100%); transition: transform .4s var(--ease); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.drawer.is-open { transform: translateX(0); }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(17, 17, 17, .45); z-index: 205; opacity: 0; pointer-events: none; transition: opacity .3s; }
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
body.is-locked { overflow: hidden; }

/* ---------- toast ---------- */
.toast-stack { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); animation: toast-in .35s var(--ease); pointer-events: auto; display: flex; align-items: center; gap: 10px; }
.toast--success::before { content: '✓'; color: var(--lime); font-weight: 800; }
.toast--error { background: var(--danger); }
.toast a { color: var(--lime); text-decoration: underline; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- skeleton / spinner ---------- */
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #bdbbb5; margin-top: 64px; padding: 56px 0 24px; font-size: 14px; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 40px; }
.site-footer h4 { color: var(--white); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer li { margin-bottom: 8px; }
.site-footer a:hover { color: var(--lime); }
.site-footer__brand p { margin: 14px 0; }
.site-footer__contact li { color: var(--stone); }
.newsletter-form { display: flex; gap: 8px; margin: 12px 0 16px; }
.newsletter-form input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: var(--radius-pill); border: 1px solid var(--ink-3); background: var(--ink-2); color: var(--white); outline: none; }
.newsletter-form input:focus { border-color: var(--lime); }
.newsletter-form .btn { background: var(--lime); color: var(--ink); }
.site-footer__social { display: flex; flex-wrap: wrap; gap: 14px; font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .08em; }
.site-footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--ink-3); margin-top: 40px; padding-top: 20px; font-size: 13px; }
.cod-pill { color: var(--lime); font-weight: 700; }
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ---------- error page ---------- */
.error-page { text-align: center; padding: 80px 16px; max-width: 720px; margin: 0 auto; }
.error-page__code { font-family: var(--display); font-size: clamp(90px, 18vw, 180px); line-height: 1; }
.error-page__title { font-size: 26px; }
.error-page__msg { color: var(--muted); }
.error-page__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.error-page__trace { text-align: left; background: var(--ink); color: #eee; padding: 16px; border-radius: var(--radius-sm); font-size: 12px; overflow: auto; margin-top: 32px; }
