:root {
  --bg: #ffffff;
  --card-bg: #ffffff;
  --text: #15191c;
  --text-muted: #656b6f;
  --accent: #f3ca52;
  --accent-soft: #fff6d9;
  --border: #dce0e2;
  --radius-lg: 0px;
  --radius-md: 4px;
  --radius-sm: 4px;
  --shadow: none;
  --header-h: 96px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Helvetica Neue", Arial, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

button { font-family: inherit; cursor: pointer; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (max-width: 359px) {
  .container { padding: 0 12px; }
  .grid { gap: 10px; }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  position: relative;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
}
.brand img { width: 90px; height: 90px; object-fit: contain; }

.header-nav { display:flex; align-items:center; gap:24px; height:42px; margin-left:auto; margin-right:44px; }
.header-nav a { position:relative; display:inline-flex; align-items:center; height:42px; font-size:13px; font-weight:750; line-height:1; white-space:nowrap; }
.header-nav a::after { content:""; position:absolute; left:0; right:100%; bottom:-6px; height:3px; background:var(--accent); transition:right .18s ease; }
.header-nav a:hover::after { right:0; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-phone {
  font-size: clamp(18px, 2.3vw, 27px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.045em;
  white-space: nowrap;
}

.header-phone:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 5px; text-underline-offset: -2px; }

.header-telegram,.header-social {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: transform .18s ease;
}
.header-telegram svg {
  display: block;
  transform: translate(-1px, 1px);
}
.header-telegram:hover,.header-social:hover { transform: translateY(-2px); }
.header-instagram { background:var(--text); color:#fff; }

.menu-toggle { display:none; width:39px; height:39px; border:1px solid var(--text); border-radius:50%; background:#fff; padding:10px 9px; flex-direction:column; justify-content:center; gap:4px; }
.menu-toggle span { display:block; width:100%; height:2px; background:var(--text); transition:transform .18s ease,opacity .18s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform:translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity:0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform:translateY(-6px) rotate(-45deg); }
.mobile-menu { position:absolute; top:calc(100% + 1px); left:0; right:0; z-index:40; padding:12px 22px 20px; background:#fff; border-bottom:1px solid var(--border); box-shadow:0 15px 25px rgba(0,0,0,.08); }
.mobile-menu a { display:flex; align-items:center; min-height:48px; border-bottom:1px solid var(--border); font-size:18px; font-weight:750; letter-spacing:-.02em; }
.mobile-menu a:last-child { border-bottom:0; }

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--text);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.cart-count[hidden] { display: none; }

/* Hero */
.hero {
  padding-top: 0;
  padding-bottom: 32px;
  background: #ffffff;
}
.hero-layout { display:grid; grid-template-columns:1fr 1fr; gap:5%; align-items:center; }
.hero-copy { padding:58px 0; }
.hero-overline { display:flex; justify-content:space-between; gap:14px; margin-bottom:28px; color:var(--text); font-size:10px; font-weight:750; letter-spacing:.015em; }

.hero h1 {
  font-family:Inter,"Helvetica Neue",Arial,sans-serif;
  font-weight:800;
  font-size:clamp(48px,5.2vw,82px);
  line-height:.99;
  margin:0 0 25px;
  letter-spacing:-.065em;
}
.hero h1 span { background:linear-gradient(transparent 62%,var(--accent) 62%); }

.hero p {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
  max-width: 570px;
  line-height: 1.55;
}

.eyebrow { display:block; color:var(--accent); font-size:11px; font-weight:700; letter-spacing:.02em; text-transform:uppercase; margin-bottom:20px; }
.hero-actions { display:grid; grid-template-columns:1fr; gap:8px; margin-top:28px; }
.primary-link,.secondary-link { display:grid; grid-template-columns:28px 1fr 20px; align-items:center; gap:13px; min-height:56px; border-radius:0; padding:14px 17px; font-size:15px; }
.primary-link { background:var(--accent); color:var(--text); }
.secondary-link { border:1px solid var(--text); color:var(--text); }
.primary-link small,.secondary-link small { font-size:11px; font-weight:500; }
.primary-link strong,.secondary-link strong { font-weight:700; }
.primary-link span,.secondary-link span { font-size:19px; line-height:1; font-weight:400; }
.hero-visual { position:relative; height:580px; overflow:hidden; background:#F3CA52; }
.hero-visual img { width:100%; height:100%; object-fit:cover; object-position:center 45%; }
.promo-carousel { position:relative; min-height:190px; overflow:hidden; background:#f8ca4f; color:var(--text); }
.promo-track { position:relative; min-height:190px; }
.promo-slide { position:absolute; inset:0; opacity:0; visibility:hidden; transition:opacity .65s ease,visibility .65s ease; background-position:center; background-size:cover; }
.promo-slide.active { position:relative; opacity:1; visibility:visible; }
.promo-slide::before { content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(255,244,198,.98) 0%,rgba(255,222,111,.94) 48%,rgba(255,211,73,.5) 70%,rgba(255,211,73,.15) 100%); }
.promo-birthday { background:#f8ca4f; }
.promo-birthday::before { background:none; }
.promo-profiteroles { background:#f8ca4f; }
.promo-profiteroles::before { background:none; }
.promo-slide-inner { position:relative; z-index:1; min-height:190px; display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:26px; padding-top:28px; padding-bottom:36px; }
.promo-badge { width:96px; height:96px; display:grid; place-items:center; border-radius:50%; background:#fff; box-shadow:0 12px 32px rgba(64,39,0,.14); color:var(--text); font-size:31px; font-weight:850; letter-spacing:-.06em; transform:rotate(-5deg); }
.promo-gift { font-size:42px; transform:rotate(4deg); }
.promo-kicker { display:block; margin-bottom:6px; font-size:11px; font-weight:850; text-transform:uppercase; letter-spacing:.08em; }
.promo-copy strong { display:block; max-width:620px; font-size:clamp(27px,3vw,42px); line-height:1.02; letter-spacing:-.055em; }
.promo-copy p { max-width:590px; margin:9px 0 0; color:#4e4635; font-size:14px; line-height:1.45; }
.promo-slide a { display:flex; align-items:center; gap:18px; min-height:54px; padding:13px 18px; border:2px solid var(--text); background:rgba(255,255,255,.9); font-size:14px; font-weight:800; white-space:nowrap; box-shadow:5px 5px 0 var(--text); }
.promo-slide a:hover { transform:translate(-2px,-2px); box-shadow:7px 7px 0 var(--text); }
.promo-controls { position:absolute; z-index:3; left:50%; bottom:12px; display:flex; gap:7px; padding:6px 8px; border-radius:999px; background:rgba(255,255,255,.82); transform:translateX(-50%); }
.promo-controls button { width:8px; height:8px; padding:0; border:0; border-radius:50%; background:#8c7a50; transition:width .25s,background .25s; }
.promo-controls button.active { width:25px; border-radius:999px; background:var(--text); }
.text-link { color:var(--accent); font-size:14px; font-weight:700; }
.ready-section { padding-top:54px; padding-bottom:70px; scroll-margin-top:80px; }
.section-heading h2,.constructor-heading h2 { margin:0 0 12px; font-size:clamp(25px,3vw,36px); letter-spacing:-.03em; }
.section-intro,.constructor-heading p { color:var(--text-muted); line-height:1.5; margin:0 0 20px; max-width:650px; }
.ready-section .section-heading h2 { font-size:clamp(42px,5vw,68px); font-weight:800; letter-spacing:-.065em; line-height:1; margin-bottom:16px; }
.ready-section .section-heading h2 span { background:linear-gradient(transparent 62%,var(--accent) 62%); }
.ready-section .section-intro { margin-bottom:34px; }
.ready-grid { display:grid; gap:0; counter-reset:ready-box; }
.ready-box { position:relative; display:grid; grid-template-columns:minmax(0,48%) minmax(0,1fr); gap:5%; align-items:stretch; padding:30px 0; border-top:1px solid var(--border); background:var(--bg); counter-increment:ready-box; }
.ready-box::before { content:counter(ready-box, decimal-leading-zero); position:absolute; top:46px; left:16px; z-index:1; display:grid; place-items:center; width:48px; height:48px; background:var(--accent); color:var(--text); font-size:12px; font-weight:750; }
.ready-box > img,.ready-box > picture,.ready-box > .ready-box-gallery { width:100%; aspect-ratio:1; align-self:start; background:#f7f5f0; }
.ready-box > picture { display:block; }
.ready-box > picture img { width:100%; height:100%; object-fit:contain; }
.ready-box > img { height:auto; object-fit:contain; }
.ready-box > img.ready-box-cover-image { object-fit:cover; }
.ready-box.ready-box-landscape > img { aspect-ratio:4 / 3; display:block; }
.ready-box-gallery { position:relative; overflow:hidden; }
.ready-box > .ready-box-gallery.ready-box-gallery-portrait { aspect-ratio:2 / 3; }
.ready-box-gallery-track { display:flex; width:100%; height:100%; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; scroll-behavior:smooth; }
.ready-box-gallery-track::-webkit-scrollbar { display:none; }
.ready-box-gallery-track picture { flex:0 0 100%; width:100%; height:100%; scroll-snap-align:start; }
.ready-box-gallery-track img { display:block; width:100%; height:100%; object-fit:contain; }
.ready-box-gallery-cover .ready-box-gallery-track img { object-fit:cover; }
.gallery-arrow { position:absolute; top:50%; z-index:2; width:42px; height:42px; border:0; border-radius:50%; background:rgba(255,255,255,.74); color:var(--text); font-size:20px; box-shadow:0 4px 16px rgba(0,0,0,.1); transform:translateY(-50%); cursor:pointer; }
.gallery-arrow-prev { left:14px; }
.gallery-arrow-next { right:14px; }
.gallery-dots { position:absolute; left:50%; bottom:14px; z-index:2; display:flex; gap:7px; padding:7px 9px; border-radius:999px; background:rgba(255,255,255,.88); transform:translateX(-50%); }
.gallery-dots span { width:7px; height:7px; border-radius:50%; background:#aaa; transition:background .2s,transform .2s; }
.gallery-dots span.active { background:var(--text); transform:scale(1.15); }
.ready-box-content { display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; min-width:0; padding:20px 0; }
.ready-box-kicker { color:var(--text); font-size:11px; font-weight:750; letter-spacing:.02em; text-transform:uppercase; }
.ready-box-weight { display:inline-block; padding:4px 7px 3px; background:var(--accent); line-height:1; }
.ready-box h3 { max-width:100%; margin:18px 0 19px; font-size:clamp(32px,3.8vw,52px); line-height:1.03; letter-spacing:-.065em; font-weight:800; }
.ready-box h3 span { background:linear-gradient(transparent 62%,var(--accent) 62%); box-decoration-break:clone; -webkit-box-decoration-break:clone; }
.ready-box p { margin:0 0 10px; line-height:1.5; }
.ready-box ul { margin:0 0 16px; padding-left:19px; line-height:1.55; }
.ready-box li + li { margin-top:4px; }
.ready-box-note { color:var(--text-muted); font-size:14px; }
.ready-box-order { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:auto; padding-top:14px; width:100%; border-top:1px solid var(--border); }
.ready-box-price { display:flex; align-items:center; gap:15px; }
.ready-box-price strong { display:inline-block; min-width:88px; padding:10px 13px; background:var(--accent); font-size:25px; line-height:1; letter-spacing:-.05em; white-space:nowrap; }
.ready-box-price strong.price-pending { font-size:16px; letter-spacing:0; }
.ready-box-price span { color:var(--text-muted); font-size:12px; line-height:1.3; }
.ready-box-action { flex:0 0 auto; }
.ready-box-action .add-btn { min-height:45px; border-radius:999px; padding:11px 20px; background:var(--text); }
.ready-box-action .qty-stepper { border-radius:999px; }
.constructor-heading { padding-top:24px; scroll-margin-top:80px; }
.demo-notice { border:1px solid #eddfc9; background:#fff7e9; border-radius:12px; padding:12px 14px; font-size:13px; color:#795522; }

/* How it works */
.how-it-works { padding-top:46px; padding-bottom:54px; }
.how-it-works { scroll-margin-top:calc(var(--header-h) + 18px); }
.how-panel { color:var(--text); }
.how-heading { margin-bottom:30px; }
.how-heading h2 { margin:0; font-size:clamp(25px,3vw,34px); line-height:1.15; letter-spacing:-.04em; }
.steps { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border-top:1px solid var(--border); }
.step { position:relative; padding:27px 30px 0 0; }
.step::before { content:''; position:absolute; top:-5px; left:0; width:9px; height:9px; border-radius:50%; background:var(--accent); }
.step-num { display:inline-block; padding:5px 7px; background:var(--accent); font-size:25px; font-weight:750; line-height:1; color:var(--text); margin-bottom:13px; }
.step-text { display:flex; flex-direction:column; gap:6px; }
.step-text strong { font-size:17px; font-weight:750; letter-spacing:-.025em; }
.step-text span { font-size:14px; color:var(--text-muted); line-height:1.45; }

.faq-section { padding-top:48px; padding-bottom:70px; scroll-margin-top:calc(var(--header-h) + 18px); }
.faq-heading h2 { margin:0 0 30px; font-size:clamp(34px,4.5vw,58px); line-height:1; letter-spacing:-.055em; }
.faq-list { border-top:1px solid var(--border); }
.faq-list details { border-bottom:1px solid var(--border); }
.faq-list summary { position:relative; cursor:pointer; list-style:none; padding:22px 54px 22px 0; font-size:18px; font-weight:750; letter-spacing:-.025em; }
.faq-list summary::-webkit-details-marker { display:none; }
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--accent);
  background-image: linear-gradient(var(--text), var(--text)), linear-gradient(var(--text), var(--text));
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 2px, 2px 12px;
  transform: translateY(-50%);
}
.faq-list details[open] summary::after { background-size: 12px 2px, 0 2px; }
.faq-list details p { max-width:760px; margin:-4px 0 22px; color:var(--text-muted); line-height:1.55; font-size:15px; }
.faq-list details p a { color:var(--text); font-weight:750; text-decoration-color:var(--accent); text-decoration-thickness:2px; text-underline-offset:3px; }

@media(max-width:680px) {
  :root { --header-h: 112px; }
  .brand img { width: 68px; height: 68px; }
  .site-header .container { align-items:flex-start; gap:8px; }
  .header-nav { display:none; }
  .header-actions { gap:6px; margin-left:auto; padding-top:15px; }
  .header-phone {
    position:absolute;
    left:22px;
    right:22px;
    bottom:10px;
    display:block;
    text-align:center;
    font-size:18px;
    letter-spacing:-.025em;
  }
  .header-telegram,.header-social,.icon-btn,.menu-toggle { width:37px; height:37px; }
  .menu-toggle { display:flex; }
  .container { padding-left:22px; padding-right:22px; }
  .hero-layout { display:block; }
  .hero { padding-bottom:30px; }
  .hero-copy { padding:30px 0 23px; }
  .hero-overline { margin-bottom:25px; font-size:9px; }
  .hero h1 { font-size:clamp(39px,10.6vw,54px); letter-spacing:-.067em; margin-bottom:18px; }
  .hero p { font-size:14px; max-width:390px; line-height:1.48; }
  .hero-actions { margin-top:21px; }
  .primary-link,.secondary-link { min-height:54px; }
  .hero-visual { height:390px; margin-left:-22px; margin-right:-22px; }
  .promo-carousel,.promo-track { min-height:350px; }
  .promo-slide::before { background:linear-gradient(180deg,rgba(255,242,192,.94) 0%,rgba(255,218,100,.94) 62%,rgba(255,206,61,.78) 100%); }
  .promo-birthday::before,.promo-profiteroles::before { background:none; }
  .promo-slide-inner { min-height:350px; grid-template-columns:72px 1fr; align-content:center; gap:14px 15px; padding-top:26px; padding-bottom:48px; }
  .promo-badge { width:72px; height:72px; font-size:24px; }
  .promo-gift { font-size:32px; }
  .promo-copy strong { font-size:27px; }
  .promo-copy p { font-size:13px; line-height:1.4; }
  .promo-slide a { grid-column:1 / -1; justify-content:space-between; min-height:49px; box-shadow:4px 4px 0 var(--text); }
  .ready-section { padding-top:34px; padding-bottom:42px; }
  .ready-section .section-heading h2 { font-size:clamp(39px,10.6vw,54px); }
  .ready-section .section-intro { margin-bottom:22px; }
  .ready-box { display:flex; flex-direction:column; align-items:stretch; gap:0; padding:20px 0 26px; }
  .ready-box::before { top:34px; left:14px; }
  .ready-box > img,.ready-box > picture,.ready-box > .ready-box-gallery { height:auto; min-height:0; }
  .ready-box-content { padding:22px 0 0; }
  .ready-box h3 { font-size:clamp(32px,8.3vw,42px); margin:13px 0 15px; }
  .ready-box-order { margin-top:12px; }
  .how-it-works { padding-top:32px; padding-bottom:38px; }
  .how-heading { margin-bottom:25px; }
  .how-heading h2 { font-size:27px; }
  .steps { grid-template-columns:1fr; gap:0; border-top:0; border-left:1px solid var(--border); margin-left:4px; }
  .step { padding:0 0 26px 24px; }
  .step:last-child { padding-bottom:0; }
  .step::before { top:5px; left:-5px; }
  .step-num { font-size:26px; margin-bottom:7px; }
  .step-text strong { font-size:17px; }
  .step-text span { font-size:13px; }
  .faq-section { padding-top:38px; padding-bottom:48px; }
  .faq-heading h2 { margin-bottom:22px; font-size:36px; }
  .faq-list summary { padding:19px 48px 19px 0; font-size:16px; line-height:1.3; }
  .faq-list details p { font-size:14px; }
}

/* Category nav */
.category-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  background: var(--bg);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.category-nav-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.category-nav-scroll::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  padding: 10px 16px;
  min-height: 38px;
  display: flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.chip.active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

/* Category sections */
.category-section {
  padding: 26px 0 6px;
  scroll-margin-top: calc(var(--header-h) + 64px);
}

.category-section h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 29px;
  margin: 0 0 14px;
  letter-spacing: -0.04em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 980px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

/* Card */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card-photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--accent-soft);
}

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  min-height: 2.6em;
}

.card-weight {
  font-size: 12.5px;
  color: var(--text-muted);
}

.card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.card-composition {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  opacity: 0.85;
}

.quantity-rule { font-size:11px; font-weight:700; line-height:1.3; color:var(--accent); }
.card-footer small { display:block; margin-top:3px; color:var(--text-muted); font-size:12px; white-space:nowrap; }
.card-price-block { min-width:0; }
.card-simple .card-footer { flex-direction:column; align-items:stretch; }
.card-simple .card-action,.card-simple .card-action .add-btn,.card-simple .card-action .qty-stepper { width:100%; }
.card-simple .card-action .qty-stepper { justify-content:space-between; }

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
}

.card-price {
  font-weight: 800;
  font-size: 15px;
  line-height:1.15;
  letter-spacing:-.025em;
  white-space:nowrap;
}

.add-btn {
  border: none;
  background: var(--text);
  color: #fff;
  border-radius: 999px;
  padding: 9px 18px;
  min-height: 36px;
  font-size: 13px;
  font-weight: 700;
}

.add-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--text);
  border-radius: 999px;
  padding: 3px;
}

.qty-stepper button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.qty-stepper span {
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  min-width: 14px;
  text-align: center;
}

/* Footer */
.site-footer {
  margin-top: 40px;
  padding: 24px 0 40px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

/* Overlay (cart / checkout) */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  visibility: hidden;
}

.overlay.open { visibility: visible; }

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.overlay.open .overlay-backdrop { opacity: 1; }

.overlay-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  box-shadow: -10px 0 30px rgba(0,0,0,0.08);
}

.overlay.open .overlay-panel { transform: translateX(0); }

.overlay-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.overlay-header h3 { margin: 0; font-size: 17px; }

.overlay-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-size: 16px;
  flex: 0 0 auto;
}

.overlay-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

.overlay-footer {
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 10px;
  font-size: 14px;
}

.cart-line {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.cart-line img {
  width: 88px;
  height: auto;
  min-height: 88px;
  align-self: stretch;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex: 0 0 auto;
}

.cart-line-info {
  flex: 1;
  min-width: 0;
}

.cart-line-name {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
}

.cart-line-price {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.cart-line-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.cart-line-controls .qty-stepper {
  background: var(--text);
}

.cart-line-controls .qty-stepper button {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.cart-line-controls .qty-stepper span { color: #fff; }

.remove-btn {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: underline;
  padding: 0;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.cart-total-row span:first-child { font-size: 14px; color: var(--text-muted); }
.cart-total-row span:last-child { font-size: 19px; font-weight: 800; }

.primary-btn {
  width: 100%;
  border: none;
  background: var(--text);
  color: #fff;
  border-radius: 999px;
  padding: 13px;
  font-size: 14.5px;
  font-weight: 700;
}

.primary-btn:disabled {
  opacity: 0.5;
}

.secondary-btn {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  border-radius: 999px;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  margin-top: 8px;
}

/* Checkout form */
.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 14px;
  background: var(--card-bg);
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
}
.field select:focus, .field textarea:focus { outline:none; border-color:var(--accent); }

.field-error {
  font-size: 12px;
  color: #b91c1c;
  margin-top: 4px;
  display: none;
}

.field.invalid input, .field.invalid select { border-color: #b91c1c; }
.field.invalid .field-error { display: block; }

.order-summary {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.order-summary > div:not(.summary-gift) { padding: 3px 0; }

/* Birthday discount checkbox */
.checkbox-birthday {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--accent);
  cursor: pointer;
}
.checkbox-birthday input[type="checkbox"] {
  margin-top: 2px;
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  accent-color: var(--text);
}
.checkbox-birthday-text { font-size: 13.5px; }
.checkbox-birthday-text strong { display: block; font-weight: 700; }
.checkbox-birthday-text small { display: block; margin-top: 2px; color: var(--text-muted); font-weight: 400; font-size: 12px; line-height: 1.4; }

/* Free-gift highlight (cart + checkout summary) — uses the real box-profiteroles-mini card/photo */
.cart-line-gift {
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--accent);
  overflow: hidden;
  box-sizing: border-box;
}
.cart-gift-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; row-gap: 4px; }
.cart-gift-tag {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}
.cart-gift-strike { text-decoration: line-through; color: rgba(21, 25, 28, .55); margin-right: 6px; }

.summary-discount strong { color: #1f7a3f; }
.summary-gift {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  padding: 12px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--accent);
  overflow: hidden;
  box-sizing: border-box;
}
.summary-gift img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.summary-gift-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 0%; }
.summary-gift-text strong { font-size: 12.5px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.summary-gift-text span:not(.cart-gift-tag) { font-size: 11.5px; color: var(--text-muted); }

.form-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}

.promo-note {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0 0 10px;
}

/* Success view */
.success-view {
  text-align: center;
  padding: 50px 10px;
}

.success-view .icon {
  font-size: 42px;
  margin-bottom: 14px;
}

.success-view h3 { margin: 0 0 8px; }
.success-view p { color: var(--text-muted); font-size: 14px; margin: 0 0 20px; }

[hidden] { display: none !important; }

/* Scroll-to-top button */
.scroll-top-btn {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(21, 25, 28, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  z-index: 40;
}
.scroll-top-btn.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top-btn:hover { transform: translateY(-2px); }
@media (max-width: 680px) {
  .scroll-top-btn { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); width: 40px; height: 40px; }
}
