/* =====================================================================
   Happy Sleep — main.css
   tokens · reset · layout · header · footer · buttons · cards · drawer
   ===================================================================== */
:root {
  --teal: #009997;
  --teal-d: #007b79;
  --teal-dd: #004d4b;
  --teal-l: #d8efee;
  --mint: #e4f1f1;
  --yellow: #ffc10e;
  --yellow-d: #e3a600;
  --yellow-l: #fff4d1;
  --ink: #26363b;
  --gray: #667378;
  --gray-l: #9aa6aa;
  --line: #e1e8ea;
  --bg: #fafafa;
  --card: #fff;
  --foot: #f2f2f2;
  --pink: #fff0f9;
  --pink-btn: #ff3ea5;
  --danger: #d6344d;
  --ok: #2e9e5b;
  --r: 14px;
  --r-s: 9px;
  --shadow: 0 6px 24px rgba(20, 60, 64, .08);
  --shadow-s: 0 2px 10px rgba(20, 60, 64, .07);
  --wrap: 1320px;
  --gut: clamp(16px, 4vw, 40px);
  --f: 'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --f-hero: 'Montserrat', 'Outfit', system-ui, sans-serif;
  --hdr-h: 124px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 150px; }
body { margin: 0; font-family: var(--f); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; flex-shrink: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(0, 153, 151, .45); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.ico { width: 22px; height: 22px; }
.ico-s { width: 18px; height: 18px; }

/* ---------- top strip ---------- */
.topbar { background: linear-gradient(90deg, #004d4b, #008a88 50%, #004d4b); color: #e9fbfa; font-size: 13px; letter-spacing: .02em; }
.topbar .wrap { display: flex; align-items: center; justify-content: center; gap: 22px; min-height: 36px; flex-wrap: wrap; padding-top: 4px; padding-bottom: 4px; text-align: center; }
.topbar a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .4); }
.topbar .tb-item { display: inline-flex; align-items: center; gap: 7px; }
.topbar .tb-item svg { width: 15px; height: 15px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: var(--mint); border-bottom: 1px solid rgba(0, 120, 118, .08); transition: box-shadow .25s; }
.site-header.is-stuck { box-shadow: 0 6px 20px rgba(0, 70, 70, .12); }
.hd-row { display: flex; align-items: center; gap: 16px; padding-top: 6px; padding-bottom: 6px; min-height: 76px; }
.logo { display: block; flex-shrink: 0; }
.logo img { height: 52px; width: auto; }
.hd-burger { display: none; }
.search { position: relative; flex: 1; max-width: 700px; margin-left: 24px; }
.search input { width: 100%; height: 46px; padding: 0 18px 0 48px; border: 1px solid rgba(0, 0, 0, .2); border-radius: 999px; background: #fff; font-size: 16px; font-weight: 300; outline: none; transition: border-color .2s, box-shadow .2s; }
.search input::placeholder { color: var(--gray-l); }
.search input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(0, 153, 151, .12); }
.search > svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 21px; height: 21px; color: var(--gray); pointer-events: none; }
.search-pop { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #fff; border-radius: var(--r); box-shadow: 0 16px 40px rgba(0, 40, 40, .18); overflow: hidden; z-index: 70; border: 1px solid var(--line); }
.sp-item { display: flex; gap: 12px; align-items: center; padding: 10px 14px; }
.sp-item:hover, .sp-item.is-active { background: var(--mint); }
.sp-item img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: #fff; }
.sp-item b { font-weight: 600; display: block; line-height: 1.2; }
.sp-item small { color: var(--gray); }
.sp-item .sp-price { margin-left: auto; color: var(--teal-d); font-weight: 600; white-space: nowrap; }
.sp-empty, .sp-all { display: block; padding: 12px 16px; color: var(--gray); font-size: 14px; }
.sp-all { color: var(--teal-d); font-weight: 600; border-top: 1px solid var(--line); }

.hd-heart { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--teal); color: #fff; transition: background .2s, transform .2s; }
.hd-heart:hover { background: var(--teal-d); transform: translateY(-1px); }
.pill { display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 20px; border-radius: 999px; font-size: 17px; font-weight: 300; color: #fff; white-space: nowrap; transition: background .2s, transform .2s; }
.pill:hover { transform: translateY(-1px); }
.pill-teal { background: var(--teal); }
.pill-teal:hover { background: var(--teal-d); }
.pill-black { background: #000; font-weight: 400; position: relative; }
.pill-black:hover { background: #222; }
.badge { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--yellow); color: #3a2c00; font-size: 12px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.badge:empty, .badge[data-n="0"] { display: none; }

.main-nav { background: transparent; }
.main-nav .wrap { display: flex; justify-content: center; gap: clamp(20px, 4.2vw, 78px); padding-top: 2px; padding-bottom: 12px; }
.main-nav a { position: relative; font-size: 16px; font-weight: 300; color: var(--ink); padding: 4px 0; }
.main-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.main-nav a:hover::after, .main-nav a.is-active::after { transform: scaleX(1); }
.main-nav a.is-active { color: var(--teal-dd); font-weight: 500; }
.main-nav .nav-ready::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); margin-right: 8px; vertical-align: 1px; }

/* mobile menu */
.menu-drawer { position: fixed; inset: 0 auto 0 0; width: min(86vw, 340px); background: #fff; z-index: 120; transform: translateX(-102%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; box-shadow: var(--shadow); }
.menu-drawer.is-open { transform: none; }
.menu-drawer .md-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--mint); }
.menu-drawer nav { padding: 10px 8px; overflow: auto; flex: 1; }
.menu-drawer nav a { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px; font-size: 18px; border-bottom: 1px solid var(--line); font-weight: 300; }
.menu-drawer .md-foot { padding: 16px 18px; background: var(--foot); display: grid; gap: 10px; font-size: 15px; }
.overlay { position: fixed; inset: 0; background: rgba(8, 40, 42, .45); z-index: 110; opacity: 0; pointer-events: none; transition: opacity .3s; backdrop-filter: blur(2px); }
.overlay.is-open { opacity: 1; pointer-events: auto; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 50px; padding: 0 28px; border-radius: 999px; font-weight: 500; font-size: 17px; letter-spacing: .01em; transition: transform .18s, background .2s, box-shadow .2s, color .2s; white-space: nowrap; border: 2px solid transparent; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-yellow { background: var(--yellow); color: #3a2c00; box-shadow: 0 8px 20px rgba(255, 193, 14, .35); }
.btn-yellow:hover { background: #ffcd3a; }
.btn-teal { background: var(--teal); color: #fff; box-shadow: 0 8px 20px rgba(0, 153, 151, .28); }
.btn-teal:hover { background: var(--teal-d); }
.btn-dark { background: #111; color: #fff; }
.btn-dark:hover { background: #2a2a2a; }
.btn-line { border-color: var(--teal); color: var(--teal-d); background: transparent; }
.btn-line:hover { background: var(--teal); color: #fff; }
.btn-ghost { color: var(--teal-d); }
.btn-sm { height: 40px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; transition: background .2s; }
.icon-btn:hover { background: rgba(0, 0, 0, .06); }
.link { color: var(--teal-d); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- section heads ---------- */
.sec { padding: clamp(40px, 6vw, 84px) 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.sec-title { font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; color: #5d666a; letter-spacing: .005em; }
.sec-sub { color: var(--gray); font-weight: 300; margin-top: 4px; }
.sec-link { color: var(--teal-d); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.sec-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- product card ---------- */
.grid-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 30px; }
.card { position: relative; background: #fff; border-radius: var(--r); box-shadow: var(--shadow-s); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media { position: relative; display: block; aspect-ratio: 1 / 1.02; background: #fff; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.card-media img.fit-contain { object-fit: contain; padding: 14px; }
.card:hover .card-media img { transform: scale(1.04); }
.card-tag { position: absolute; left: 12px; top: 12px; padding: 4px 12px; border-radius: 999px; background: var(--yellow); color: #3a2c00; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.card-tag.t-sale { background: #fff; color: var(--teal-d); box-shadow: var(--shadow-s); }
.card-tag.t-ready { background: var(--teal); color: #fff; }
.heart { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--gray); background: rgba(255, 255, 255, .9); transition: color .2s, transform .2s, background .2s; z-index: 2; }
.heart:hover { color: var(--teal); transform: scale(1.1); }
.heart svg { width: 20px; height: 20px; }
.heart.is-on { color: #e8335a; }
.heart.is-on svg path { fill: currentColor; }
.card-body { padding: 14px 18px 18px; display: grid; gap: 1px; }
.card-name { font-weight: 700; font-size: 18px; color: #5d666a; line-height: 1.25; }
.card-name:hover { color: var(--teal-d); }
.card-cat { color: var(--gray); font-weight: 300; font-size: 15px; }
.card-price { margin-top: 6px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; color: var(--teal); font-size: 20px; font-weight: 400; }
.card-price .from { font-size: 13px; color: var(--gray); text-transform: uppercase; letter-spacing: .06em; }
.card-price s { color: var(--gray-l); font-size: 15px; }
.card-cta { margin-top: 10px; font-size: 14px; color: var(--teal-d); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; opacity: 0; transform: translateY(4px); transition: .25s; }
.card:hover .card-cta, .card:focus-within .card-cta { opacity: 1; transform: none; }
@media (hover: none) { .card-cta { opacity: 1; transform: none; } }

/* ---------- breadcrumbs / page head ---------- */
.crumbs { font-size: 14px; color: var(--gray); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 18px 0 8px; }
.crumbs a:hover { color: var(--teal-d); text-decoration: underline; }
.crumbs span.sep { color: var(--gray-l); }
.page-head { padding: 12px 0 26px; }
.page-title { font-size: clamp(28px, 3.4vw, 42px); font-weight: 300; color: var(--teal-dd); line-height: 1.1; }
.page-sub { color: var(--gray); font-weight: 300; margin-top: 8px; max-width: 62ch; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; color: var(--gray); font-weight: 500; }
.input, .select, .textarea { width: 100%; height: 48px; padding: 0 16px; border: 1px solid #cfd8da; border-radius: var(--r-s); background: #fff; outline: none; transition: border-color .2s, box-shadow .2s; }
.textarea { height: auto; padding: 12px 16px; min-height: 110px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(0, 153, 151, .12); }
.input.is-bad { border-color: var(--danger); }
.err { color: var(--danger); font-size: 13px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--teal); margin: 1px 0 0; flex-shrink: 0; }

/* ---------- drawer (mini cart) ---------- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(100vw, 440px); background: #fff; z-index: 120; transform: translateX(102%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0, 0, 0, .15); }
.drawer.is-open { transform: none; }
.dr-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.dr-head h2 { font-size: 22px; font-weight: 500; color: var(--teal-dd); }
.dr-body { flex: 1; overflow: auto; padding: 8px 22px; }
.dr-foot { border-top: 1px solid var(--line); padding: 18px 22px 22px; display: grid; gap: 12px; background: #fcfdfd; }
.dr-empty { text-align: center; padding: 60px 10px; color: var(--gray); display: grid; gap: 14px; justify-items: center; }
.mc-line { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.mc-line img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; background: #f4f4f4; }
.mc-line .mc-name { font-weight: 600; line-height: 1.2; }
.mc-line .mc-opts { font-size: 13px; color: var(--gray); margin-top: 3px; line-height: 1.4; }
.mc-line .mc-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.mc-price { font-weight: 600; color: var(--teal-dd); }
.qty { display: inline-flex; align-items: center; border: 1px solid #cfd8da; border-radius: 999px; background: #fff; }
.qty button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--teal-d); }
.qty button:hover { background: var(--mint); }
.qty button[disabled] { opacity: .35; pointer-events: none; }
.qty span { min-width: 26px; text-align: center; font-weight: 500; }
.rm { color: var(--gray); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.rm:hover { color: var(--danger); }
.sum-row { display: flex; justify-content: space-between; gap: 12px; }
.sum-row.lg { font-size: 20px; font-weight: 600; color: var(--teal-dd); }
.sum-row small { color: var(--gray); }

/* ---------- toast ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: grid; gap: 10px; justify-items: center; width: min(92vw, 460px); pointer-events: none; }
.toast { background: #12292b; color: #fff; padding: 13px 18px; border-radius: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); display: flex; gap: 14px; align-items: center; font-size: 15px; animation: tin .3s cubic-bezier(.2, .8, .2, 1); pointer-events: auto; }
.toast a, .toast button { color: var(--yellow); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.toast.out { animation: tout .25s forwards; }
@keyframes tin { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes tout { to { opacity: 0; transform: translateY(8px); } }

/* ---------- cookie ---------- */
.cookie { position: fixed; left: 20px; bottom: 20px; z-index: 150; width: min(92vw, 400px); background: #fff; border-radius: var(--r); box-shadow: 0 14px 44px rgba(0, 0, 0, .2); padding: 18px 20px; display: grid; gap: 12px; font-size: 14px; color: var(--gray); }
.cookie b { color: var(--ink); font-size: 16px; }
.cookie .row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer { position: relative; margin-top: 90px; background: linear-gradient(to bottom, transparent 0, transparent 60px, var(--foot) 60px); }
.ft-newsletter { background: var(--teal); color: #fff; }
.ft-newsletter .wrap { display: flex; gap: 30px; align-items: center; justify-content: space-between; padding-top: 26px; padding-bottom: 26px; flex-wrap: wrap; }
.ft-newsletter h3 { font-size: 22px; font-weight: 500; }
.ft-newsletter p { font-weight: 300; opacity: .9; }
.ft-newsletter form { display: flex; gap: 8px; flex: 1; max-width: 480px; min-width: 260px; }
.nl-box { flex: 1; max-width: 520px; min-width: 260px; }
.nl-box form { display: flex; gap: 8px; max-width: none; flex: none; }
.nl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nl-consent { margin-top: 8px; font-size: 12.5px; line-height: 1.4; opacity: .92; }
.nl-consent a { text-decoration: underline; text-underline-offset: 2px; }
.nl-consent.bad { background: #fff; color: #b3261e; border-radius: 8px; padding: 6px 10px; opacity: 1; }
.ft-newsletter input { flex: 1; height: 48px; border-radius: 999px; border: 0; padding: 0 20px; outline: none; }
.ft-main { position: relative; background: var(--foot); }
.ft-moon { position: absolute; left: clamp(0px, 3vw, 60px); top: -54px; width: clamp(200px, 22vw, 320px); filter: drop-shadow(0 10px 14px rgba(180, 140, 40, .22)); pointer-events: none; }
.ft-cols { display: grid; grid-template-columns: minmax(180px, 1.1fr) repeat(4, 1fr); gap: 36px; padding-top: 66px; padding-bottom: 54px; }
.ft-cols h4 { font-size: 16px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #6e7a7f; margin-bottom: 14px; }
.ft-cols li { margin-bottom: 8px; }
.ft-cols a { color: #7a868a; font-weight: 300; font-size: 17px; transition: color .15s; }
.ft-cols a:hover { color: var(--teal-d); }
.ft-contact { display: grid; gap: 6px; font-size: 15px; color: #7a868a; font-weight: 300; align-content: start; }
.ft-bottom { border-top: 1px solid #e3e3e3; background: var(--foot); }
.ft-bottom .wrap { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding-top: 18px; padding-bottom: 18px; font-size: 14px; color: #8a9599; flex-wrap: wrap; }
.pay-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-chip { background: #fff; border: 1px solid #e0e0e0; border-radius: 7px; padding: 4px 10px; font-size: 12px; font-weight: 700; color: #5c676b; letter-spacing: .03em; }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } * { animation-duration: .01ms !important; } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .grid-products { grid-template-columns: repeat(3, 1fr); }
  .ft-cols { grid-template-columns: repeat(2, 1fr); padding-top: 120px; }
  .ft-cols > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  :root { --hdr-h: 64px; }
  .hd-burger { display: grid; }
  .hd-row { flex-wrap: wrap; gap: 8px; min-height: 0; padding-top: 8px; padding-bottom: 8px; }
  .logo img { height: 42px; }
  .logo { margin-right: auto; }
  .search { order: 5; flex: 0 0 100%; max-width: none; margin: 0 0 4px; }
  .search input { height: 42px; }
  .hd-login span { display: none; }
  .hd-login { padding: 0; width: 44px; justify-content: center; }
  .main-nav { display: none; }
  .pill-black { padding: 0 14px; font-size: 15px; }
  .topbar .tb-hide-m { display: none; }
}
@media (max-width: 520px) {
  .hd-row { gap: 6px; }
  .logo img { height: 38px; }
  .pill-black { width: 44px; padding: 0; justify-content: center; }
  .pill-black #hdCartTotal { display: none; }
  .pill-black .badge { top: -4px; right: -4px; }
}
@media (max-width: 700px) {
  .grid-products { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-body { padding: 10px 12px 14px; }
  .card-name { font-size: 16px; }
  .card-price { font-size: 17px; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .ft-cols { grid-template-columns: 1fr 1fr; gap: 26px 18px; }
  .ft-moon { width: 150px; top: -34px; }
  .ft-cols { padding-top: 100px; }
  .btn { height: 48px; padding: 0 22px; }
  .cookie { left: 10px; right: 10px; bottom: 10px; width: auto; }
}
