/* ==========================================================================
   SweetBox — токены дизайна

   Идея: тёплая, но не приторная палитра "крафтовой коробки" —
   молочно-персиковый фон, ягодный акцент (не оранжево-терракотовый,
   чтобы не сливаться с шаблонными AI-дизайнами), золотистый — как фольга
   на подложках, шалфейный — как штамп "в наличии".
   Сигнатурный приём — пунктирные "линии реза" картонной заготовки,
   срезанный уголок у карточек товара как у крышки коробки.
   ========================================================================== */

:root {
  --bg: #F7ECDD;
  --surface: #FFFFFF;
  --surface-soft: #FBF4EB;

  --ink: #362320;
  --ink-soft: #7A645D;
  --ink-faint: #B4A196;

  --accent: #B2495B;
  --accent-light: #C36074;
  --accent-dark: #8F3548;
  --accent-tint: #F2D9DD;

  --gold: #C98B2E;
  --gold-tint: #F3DFAF;

  --sage: #74815B;
  --sage-tint: #E3E8D6;

  --line: #D8B99A;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 28px;

  --shadow-card: 0 10px 30px -18px rgba(54, 35, 32, 0.35);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--ink-soft); }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* --- Пунктирная "линия реза" — сигнатурный элемент ---------------------- */

.dashline {
  stroke: var(--line);
  stroke-width: 2;
  stroke-dasharray: 5 7;
  stroke-linecap: round;
}

.dashline--full {
  height: 0;
  border-top: 2px dashed var(--line);
  margin-top: 44px;
}

/* --- Topbar --------------------------------------------------------------*/

.topbar {
  background: var(--ink);
  color: var(--surface-soft);
  font-size: 13px;
}

.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 24px;
  gap: 16px;
}

.topbar__phone { font-weight: 600; }
.topbar__phone:hover { color: var(--gold-tint); }
.topbar__left { display: flex; align-items: center; gap: 14px; }
.topbar__about { opacity: .85; }
.topbar__about:hover { opacity: 1; color: var(--gold-tint); }

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

.header {
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  flex-shrink: 0;
}

.logo__mark { color: var(--accent); display: flex; }
.logo em { font-style: normal; color: var(--accent); }

.catalog-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
  cursor: pointer;
}
.catalog-toggle:hover { border-color: var(--accent); color: var(--accent); }
.catalog-toggle__chevron { transition: transform .15s ease; color: var(--ink-faint); }
.catalog-toggle[aria-expanded="true"] .catalog-toggle__chevron { transform: rotate(180deg); }

.catalog-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  z-index: 50;
}
.catalog-panel[hidden] { display: none; }

.catalog-panel__inner { padding: 28px 24px; }

.catalog-panel__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px 28px;
}

.catalog-panel__col-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px dashed var(--line);
}
.catalog-panel__col-title:hover { color: var(--accent); }

.catalog-panel__sub { list-style: none; margin: 0; padding: 0; }
.catalog-panel__sub li { margin-bottom: 2px; }
.catalog-panel__sub a {
  display: block;
  padding: 6px 4px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.catalog-panel__sub a:hover { background: var(--surface-soft); color: var(--accent); }


.search-wrap { position: relative; }

.search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
}
.search-toggle:hover { border-color: var(--accent); color: var(--accent); }
.search-toggle[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }

.search-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 24px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
  padding: 12px;
  z-index: 60;
}
.search-panel[hidden] { display: none; }

.search-panel__input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 14.5px;
  font-family: var(--font-body);
  background: var(--surface-soft);
  color: var(--ink);
}
.search-panel__input:focus { outline: none; border-color: var(--accent); }

.search-results {
  margin-top: 10px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  color: inherit;
}
.search-result:hover { background: var(--surface-soft); }
.search-result__photo {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--surface-soft);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-size: 15px;
}
.search-result__photo img { width: 100%; height: 100%; object-fit: cover; }
.search-result__name {
  font-size: 13.5px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result__price {
  font-size: 13px;
  color: var(--ink-faint);
  white-space: nowrap;
  flex-shrink: 0;
}
.search-empty, .search-hint {
  font-size: 13px;
  color: var(--ink-faint);
  padding: 10px 4px;
}

@media (max-width: 480px) {
  .search-panel { position: fixed; left: 12px; right: 12px; top: 68px; width: auto; max-width: none; }
}

.cart-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--surface-soft);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  margin-left: auto;
}
.cart-pill:hover { background: var(--accent-dark); }
.cart-pill__count {
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

/* --- Hero --------------------------------------------------------------- */

.hero { padding-top: 56px; }

.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.85fr;
  align-items: center;
  gap: 24px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-tint);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(34px, 4.6vw, 54px);
  color: var(--ink);
}

.hero h1 .accent {
  color: var(--accent);
  font-style: italic;
}

.hero__lead {
  max-width: 46ch;
  font-size: 16.5px;
  margin-top: 18px;
}

.hero__cta { display: flex; gap: 14px; margin-top: 8px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14.5px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn--primary { background: var(--accent-light); color: #fff; }
.btn--primary:hover { background: var(--accent); }

.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--surface-soft); }

.hero__art { display: flex; justify-content: center; }
.box-illustration { width: 100%; max-width: 360px; color: var(--ink); }

/* --- Features ------------------------------------------------------------*/

.features { padding: 48px 0 8px; }

.features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature {
  background: var(--surface);
  border-radius: var(--radius-m);
  padding: 24px;
  border: 1px solid var(--line);
}
.feature svg { color: var(--accent); margin-bottom: 12px; }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { font-size: 14px; margin: 0; }

/* --- Catalog / product grid ---------------------------------------------*/

.catalog { padding: 64px 0 90px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 26px;
  border-bottom: 2px dashed var(--line);
  padding-bottom: 16px;
}
.section-head h2 { font-size: 28px; margin: 0; }
.section-head__note {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-faint);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

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

.product-card__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  /* срезанный уголок — как крышка коробки */
  clip-path: polygon(0 0, 100% 0, 100% 100%, 28px 100%, 0 calc(100% - 28px));
}

.product-card__ph-icon { width: 46%; color: var(--ink-faint); }

.product-card__photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__media-link { display: block; }
.product-card__name-link { display: block; color: inherit; }
.product-card__name-link:hover .product-card__name { color: var(--accent); }

.tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: 999px;
}
.tag--new { background: var(--gold-tint); color: #7A5A16; }

.product-card__body { padding: 16px 18px 18px; }

.product-card__name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14.5px;
  margin: 0 0 4px;
  line-height: 1.35;
}

.product-card__pack {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--sage);
  background: var(--sage-tint);
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
}

.product-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.price-old {
  color: var(--ink-faint);
  font-size: 12.5px;
  margin-right: 6px;
}
.price-now {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
}

.btn-add {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: var(--surface-soft);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn-add:hover { background: var(--accent); transform: scale(1.06); }

.qty-stepper--card {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  height: 36px;
}
.qty-stepper--card .qty-stepper__btn {
  width: 30px;
  height: 36px;
  border: none;
  background: var(--surface-soft);
  font-size: 15px;
  cursor: pointer;
  color: var(--ink);
}
.qty-stepper--card .qty-stepper__btn:hover { background: var(--accent-tint); color: var(--accent-dark); }
.qty-stepper--card .qty-stepper__value {
  min-width: 30px;
  height: 36px;
  padding: 0 4px;
  font-size: 12.5px;
}

/* --- Placeholder page ---------------------------------------------------*/

.placeholder-page { padding: 90px 0; text-align: center; }
.placeholder-page h1 { font-size: 32px; }

/* --- Info pages (условия, доставка, о компании) --------------------------*/

.info-page { padding: 56px 0 90px; }
.info-page__inner { max-width: 720px; }
.info-page h1 { font-size: 36px; }
.info-page__lead { font-size: 17px; max-width: 56ch; }
.info-page__para { font-size: 15.5px; max-width: 62ch; }

.info-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  font-size: 14.5px;
}
.info-list li svg { color: var(--sage); flex-shrink: 0; margin-top: 2px; }

.info-page__note {
  margin-top: 32px;
  padding: 12px 16px;
  background: var(--gold-tint);
  color: #7A5A16;
  border-radius: var(--radius-s);
  font-family: var(--font-mono);
  font-size: 12.5px;
  display: inline-block;
}

/* --- Category page: breadcrumb, sidebar, product listing -----------------*/

.category-page { padding: 28px 0 90px; }

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 28px;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb__sep { color: var(--line); }
.breadcrumb__current { color: var(--ink-soft); font-weight: 600; }

.category-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}

.category-sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 18px;
  position: sticky;
  top: 90px;
}
.category-sidebar__title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-faint);
  margin: 0 0 12px;
}

.category-tree { list-style: none; margin: 0; padding: 0; }
.category-tree__group { margin-bottom: 4px; }
.category-tree__group > a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
}
.category-tree__group > a:hover { background: var(--surface-soft); }
.category-tree__group.is-active > a { color: var(--accent); }

.category-tree__sub {
  list-style: none;
  margin: 2px 0 8px;
  padding-left: 14px;
  border-left: 2px dashed var(--line);
}
.category-tree__sub a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.category-tree__sub a:hover { background: var(--surface-soft); color: var(--accent); }
.category-tree__sub li.is-current a {
  color: var(--accent-dark);
  font-weight: 700;
  background: var(--accent-tint);
}

.category-main .section-head h1 { font-size: 26px; margin: 0; }

.subcat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 28px;
}
.subcat-chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
}
.subcat-chip:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 900px) {
  .category-layout { grid-template-columns: 1fr; }
  .category-sidebar { position: static; }
}

/* --- Product detail page -------------------------------------------------*/

.product-detail-page { padding: 28px 0 90px; }

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.product-detail__photo {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-detail__photo img { width: 100%; height: 100%; object-fit: cover; }
.product-detail__ph-icon { width: 40%; color: var(--ink-faint); }
.product-detail__photo .tag { position: absolute; top: 16px; left: 16px; }

.product-detail__info { padding-top: 4px; }
.product-detail__info h1 { font-size: 30px; margin-bottom: 10px; }
.product-detail__pack { margin-bottom: 18px; }

.product-detail__price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 6px 0 20px;
}
.product-detail__price .price-now { font-size: 28px; }
.product-detail__price .price-old { font-size: 15px; }
.product-detail__price-note { font-size: 13px; color: var(--ink-faint); }

.product-detail__description {
  font-size: 15px;
  max-width: 52ch;
  margin-bottom: 22px;
}

.product-detail__stock-warning {
  background: var(--accent-tint);
  color: var(--accent-dark);
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: var(--radius-s);
  margin-bottom: 20px;
  display: inline-block;
}

.product-detail__buy {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.qty-stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.qty-stepper__btn {
  width: 40px; height: 44px;
  border: none;
  background: var(--surface-soft);
  font-size: 18px;
  cursor: pointer;
  color: var(--ink);
}
.qty-stepper__btn:hover { background: var(--accent-tint); color: var(--accent-dark); }
.qty-stepper__value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 44px;
  border-left: 1.5px solid var(--line);
  border-right: 1.5px solid var(--line);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
}

.product-detail__add { padding: 13px 22px; }

.product-detail__note { font-size: 12.5px; color: var(--ink-faint); margin-top: 12px; }

@media (max-width: 800px) {
  .product-detail { grid-template-columns: 1fr; }
  .product-detail__photo { max-width: 420px; margin: 0 auto; }
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 30px;
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 20px;
}
.contact-card svg { color: var(--accent); margin-bottom: 4px; }
.contact-card__label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-faint);
}
.contact-card__value { font-weight: 700; font-size: 15px; }
a.contact-card:hover { border-color: var(--accent); }

@media (max-width: 560px) {
  .contact-grid { grid-template-columns: 1fr; }
}

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

.footer {
  background: var(--ink);
  color: var(--ink-faint);
  margin-top: 40px;
  padding: 52px 0 20px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
}

.logo--footer { color: var(--surface-soft); margin-bottom: 10px; display: inline-block; }
.logo--footer em { color: var(--gold); }

.footer__col p { color: var(--ink-faint); font-size: 13.5px; }
.footer__col h4 {
  color: var(--surface-soft);
  font-family: var(--font-body);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 12px;
}
.footer__col a, .footer__muted {
  display: block;
  font-size: 14px;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.footer__col a:hover { color: var(--gold); }

.footer__legal {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12.5px;
}

/* --- Responsive -----------------------------------------------------------*/

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { order: -1; max-width: 260px; margin: 0 auto; }
  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .catalog-toggle__label { display: none; }
  .catalog-panel__inner { padding: 18px 20px; max-height: 70vh; overflow-y: auto; }
  .catalog-panel__grid { grid-template-columns: 1fr; gap: 20px; }
  .topbar__inner { flex-direction: column; gap: 4px; padding: 8px 16px; text-align: center; }
  .topbar__left { flex-direction: column; gap: 2px; }
  .cart-pill__label { display: none; }

  .header__inner { gap: 8px; padding: 12px 16px; }
  .catalog-toggle { padding: 8px 10px; }
  .cart-pill { padding: 8px 10px; }
  .search-toggle { width: 36px; height: 36px; }
}

@media (max-width: 400px) {
  .logo__text { display: none; }
  .header__inner { gap: 6px; }
}

@media (max-width: 520px) {
  .product-grid { grid-template-columns: 1fr; }
  .features__grid { grid-template-columns: 1fr; }
}

/* --- Generic link-button (public pages; admin has its own in admin.css) --*/

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: underline;
}
.link-btn:hover { color: var(--accent); }
.link-btn--danger:hover { color: #b12b2b; }

/* --- Generic form field (checkout) ---------------------------------------*/

.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-faint);
  margin: 16px 0 6px;
}
.field-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 14.5px;
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--ink);
}
.field-input:focus { outline: none; border-color: var(--accent); }

/* --- Cart page -------------------------------------------------------- */

.cart-page { padding: 28px 0 90px; }
.cart-page h1 { font-size: 30px; margin-bottom: 24px; }

.cart-empty {
  text-align: center;
  padding: 60px 0;
}
.cart-empty p { margin-bottom: 18px; }

.cart-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }

.cart-row {
  display: grid;
  grid-template-columns: 64px 1fr auto auto auto;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 12px 16px;
}
.cart-row__photo {
  width: 56px; height: 56px;
  border-radius: 8px;
  background: var(--surface-soft);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.cart-row__photo img { width: 100%; height: 100%; object-fit: cover; }
.cart-row__ph { color: var(--ink-faint); font-size: 20px; }
.cart-row__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-row__name { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.cart-row__name:hover { color: var(--accent); }
.cart-row__price { font-size: 12.5px; color: var(--ink-faint); }
.cart-row__total {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  min-width: 70px;
  text-align: right;
}
.cart-row__remove {
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
}
.cart-row__remove:hover { color: #b12b2b; }

.cart-summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 20px 24px;
  max-width: 420px;
  margin-left: auto;
}
.cart-summary__row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  margin-bottom: 6px;
}
.cart-summary__total { font-family: var(--font-display); font-weight: 600; font-size: 19px; }
.cart-summary__warning {
  background: var(--accent-tint);
  color: var(--accent-dark);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  margin: 10px 0;
}
.cart-summary__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}
.cart-summary__actions .btn.is-disabled {
  opacity: .5;
  pointer-events: none;
}

/* --- Checkout page ------------------------------------------------------ */

.checkout-page { padding: 28px 0 90px; }
.checkout-page h1 { font-size: 30px; margin-bottom: 22px; }

.checkout-errors {
  background: var(--accent-tint);
  color: var(--accent-dark);
  border-radius: var(--radius-s);
  padding: 14px 18px;
  margin-bottom: 22px;
  font-size: 14px;
}
.checkout-errors ul { margin: 0; padding-left: 18px; }

.checkout-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 36px;
  align-items: start;
}

.checkout-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 22px 24px;
  margin-bottom: 20px;
}
.checkout-section h2 { font-size: 17px; margin-bottom: 4px; }

.checkout-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.type-toggle { display: flex; gap: 8px; margin-bottom: 6px; }
.type-toggle__btn {
  flex: 1;
  padding: 10px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
}
.type-toggle__btn.is-active { background: var(--ink); color: var(--surface-soft); border-color: var(--ink); }

.radio-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.radio-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }

.radio-card--payment { gap: 12px; }
.payment-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.payment-badge--alfa { background: #EF3124; color: #fff; }
.payment-badge--tbank { background: #FFDD2D; color: #1A1A1A; }
.payment-badge--invoice { background: var(--surface-soft); color: var(--ink-soft); border: 1.5px solid var(--line); }

.checkout-note { font-size: 12.5px; color: var(--ink-faint); margin-top: 10px; }

.checkout-summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 22px 24px;
  position: sticky;
  top: 90px;
}
.checkout-summary h2 { font-size: 17px; margin-bottom: 12px; }
.checkout-summary__items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.checkout-summary__row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.checkout-summary__row--total {
  border-top: 2px dashed var(--line);
  padding-top: 12px;
  margin-top: 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.checkout-submit { width: 100%; margin-top: 16px; }
.checkout-submit:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 900px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
  .checkout-row { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .cart-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 10px;
  }
  .cart-row__photo { order: 1; }
  .cart-row__body { order: 2; flex: 1 1 auto; min-width: 0; margin-right: 8px; }
  .cart-row__remove { order: 3; flex-shrink: 0; }
  .qty-stepper { order: 4; }
  .cart-row__total { order: 5; margin-left: auto; }
}

/* --- Order success -------------------------------------------------------*/

.order-success-page { padding: 60px 0 100px; }
.order-success {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 40px 32px;
}
.order-success__icon { color: var(--sage); margin-bottom: 12px; }
.order-success h1 { font-size: 24px; }
.order-success__payment {
  background: var(--surface-soft);
  border-radius: var(--radius-s);
  padding: 16px 20px;
  margin: 20px 0;
  text-align: left;
}
.order-success__payment h2 { font-size: 14px; margin-bottom: 8px; }
