/**
 * Additive stylesheet for the new shop features (cart, checkout, account,
 * returns). Deliberately kept separate from assets/css/app.css so the
 * original theme file is never touched. Reuses the site's existing design
 * tokens (colors, radii, fonts) rather than inventing a new visual language:
 *   olive  #444B28   gold accent #D4AF37   cream bg #FFFAEE
 *   card bg #f9f7f4  body text #45474f     headings: "Playfair Display"
 *   body font: "Poppins"
 */

/* ── Header cart icon + badge ──────────────────────────────────────────── */
.ortodoxo-cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fafafa;
  background: rgba(250, 250, 250, .12);
  transition: background .2s ease;
}
.ortodoxo-cart-btn:hover { background: rgba(212, 175, 55, .35); }
.ortodoxo-cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #D4AF37;
  color: #121010;
  font-size: 11px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.ortodoxo-cart-floater {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ortodoxo-cart-floater .ortodoxo-cart-btn {
  width: 52px;
  height: 52px;
  background: #444B28;
  color: #fafafa;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}
.ortodoxo-cart-floater .ortodoxo-cart-btn:hover { background: #D4AF37; color: #121010; }

/* ── Add-to-cart controls injected into .pricing-table-row ──────────────── */
.pricing-table-row {
  flex-wrap: wrap;
  row-gap: 10px;
}
.pricing-table-cart {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(146, 148, 159, .3);
  border-radius: 999px;
  overflow: hidden;
}
.qty-btn {
  border: none;
  background: rgba(68, 75, 40, .08);
  color: #444B28;
  width: 30px;
  height: 30px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.qty-btn:hover { background: rgba(212, 175, 55, .25); }
.qty-input {
  width: 44px;
  height: 30px;
  border: none;
  text-align: center;
  font-size: 13px;
  color: #45474f;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cus-btn--sm {
  padding: 8px 18px !important;
  font-size: 13px !important;
  border-radius: 999px !important;
}
.add-to-cart-btn.added { background-color: #444B28 !important; }

/* ── Shared shop page shell (cart / checkout / account / order pages) ──── */
.shop-page { padding: 64px 0 96px; background: #FFFAEE; min-height: 60vh; }
.shop-page h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 700;
  color: #121010;
  margin-bottom: 24px;
}
.shop-page h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
  color: #121010;
  margin-bottom: 16px;
}
.shop-nav {
  padding: 20px 0;
  border-bottom: 1px solid rgba(146, 148, 159, .15);
  background: #fff;
}
.shop-empty {
  padding: 48px 24px;
  text-align: center;
  color: #92949F;
  background: #f9f7f4;
  border-radius: 16px;
}

/* ── Cart lines ──────────────────────────────────────────────────────────── */
.cart-lines { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.cart-line {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 14px;
  background: #f9f7f4;
  border: 1px solid rgba(212, 175, 55, .25);
  border-radius: 14px;
  padding: 16px 20px;
}
.cart-line-title { font-weight: 700; color: #444B28; }
.cart-line-sub { font-size: 13px; color: #92949F; }
.cart-line-price { font-weight: 700; color: #121010; min-width: 90px; text-align: right; }
.cart-line-remove {
  border: none; background: none; color: #f87171; cursor: pointer; font-size: 13px;
  text-decoration: underline;
}
.cart-summary {
  background: #f9f7f4;
  border: 1px solid rgba(212, 175, 55, .3);
  border-radius: 16px;
  padding: 24px;
  max-width: 420px;
  margin-left: auto;
}
.cart-summary-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 15px; color: #45474f; }
.cart-summary-total { font-weight: 700; font-size: 20px; color: #121010; border-top: 1px solid rgba(146,148,159,.2); padding-top: 12px; margin-top: 8px; }

/* ── Forms (checkout / account) ─────────────────────────────────────────── */
.ortodoxo-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .ortodoxo-form-grid { grid-template-columns: 1fr; } }
.ortodoxo-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.ortodoxo-field label { font-size: 13px; font-weight: 600; color: #444B28; }
.ortodoxo-input, .ortodoxo-select {
  border-radius: 12px;
  border: 1px solid rgba(146, 148, 159, .35);
  background: #fff;
  padding: 13px 18px;
  color: #45474f;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  width: 100%;
}
.ortodoxo-input:focus, .ortodoxo-select:focus { outline: none; border-color: #D4AF37; }
.ortodoxo-field textarea.ortodoxo-input { min-height: 90px; resize: vertical; }

/* ── Order cards (cuenta.html) ──────────────────────────────────────────── */
.order-card {
  background: #f9f7f4;
  border: 1px solid rgba(212, 175, 55, .25);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 16px;
}
.order-card-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.order-number { font-weight: 700; color: #121010; }
.order-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.order-status--new { background: rgba(146, 148, 159, .18); color: #45474f; }
.order-status--paid { background: rgba(34, 197, 94, .15); color: #22c55e; }
.order-status--processing { background: rgba(212, 175, 55, .2); color: #a3801f; }
.order-status--shipped { background: rgba(59, 130, 246, .15); color: #3b82f6; }
.order-status--delivered { background: rgba(34, 197, 94, .25); color: #16803c; }
.order-status--refunded,
.order-status--cancelled { background: rgba(239, 68, 68, .12); color: #f87171; }
.order-lines { font-size: 13px; color: #666; margin-bottom: 10px; }
.order-lines div { margin-bottom: 2px; }
.order-tracking a { color: #444B28; text-decoration: underline; font-size: 13px; }

/* ── Small helper badges ─────────────────────────────────────────────────── */
.shop-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #a3801f;
  background: rgba(212, 175, 55, .18);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 16px;
}

/* ── Предупреждение для аллергиков (07.10.2026): каталог + корзина ───────── */
.pricing-allergy {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 0 0 16px; padding: 10px 14px;
  background: rgba(212,175,55,.12); border-left: 3px solid #D4AF37; border-radius: 0 8px 8px 0;
  color: #444B28; font-size: 14px; line-height: 1.45;
}
.pricing-allergy::before {
  content: "!"; flex: 0 0 20px; height: 20px; margin-top: 1px; border-radius: 50%;
  background: #444B28; color: #FFFAEE; font: 700 13px/20px "Poppins", sans-serif; text-align: center;
}
.pricing-allergy p { margin: 0; }
.pricing-allergy strong { display: block; margin-bottom: 2px; font-weight: 700; }
.cart-allergy { margin: 16px 0 0; }

/* ── Строка корзины на телефоне (07.10.2026): название отдельной строкой,
      иначе 4 колонки сжимали переключатель количества до половины ─────────── */
@media (max-width: 575px) {
  .cart-line { grid-template-columns: auto 1fr auto; gap: 10px 12px; padding: 14px 16px; }
  .cart-line > :first-child { grid-column: 1 / -1; }
  .cart-line .qty-stepper { flex-shrink: 0; }
  .cart-line-price { min-width: 0; }
}

/* 2026-10-08: значок корзины в шапке на телефоне и планшете (до 1200px) */
.ortodoxo-cart-btn--mobile {
  width: 44px;
  height: 44px;
  margin-right: 12px;
  flex-shrink: 0;
}
@media (min-width: 1200px) {
  .ortodoxo-cart-btn--mobile { display: none; }
}

/* ── Payment method choice (checkout.html) ─────────────────────────────── */
.pay-methods { border: 0; padding: 0; margin: 8px 0 0; }
.pay-methods legend { font-size: 13px; font-weight: 600; color: #444B28; margin-bottom: 8px; }
.pay-option {
  display: flex; align-items: flex-start; gap: 12px;
  border-radius: 12px; border: 1px solid rgba(146, 148, 159, .35); background: #fff;
  padding: 14px 18px; margin-bottom: 8px; cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.pay-option:hover { border-color: rgba(212, 175, 55, .6); }
.pay-option:has(input:checked) { border-color: #D4AF37; background: #fdfaf1; }
.pay-option input { width: 18px; height: 18px; margin-top: 2px; accent-color: #B8962E; flex: 0 0 auto; }
.pay-option input:focus-visible { outline: 2px solid #D4AF37; outline-offset: 2px; }
.pay-option-body { display: flex; flex-direction: column; gap: 2px; }
.pay-option-title { font-size: 15px; font-weight: 600; color: #121010; }
.pay-option-note { font-size: 13px; color: #6b6d75; line-height: 1.4; }
.pay-test-note { font-size: 12px; color: #7A4E00; background: #FFF7E6; border: 1px solid #F0D9A8; border-radius: 8px; padding: 8px 12px; margin: 4px 0 0; }
@media (prefers-reduced-motion: reduce) { .pay-option { transition: none; } }

/* ── Компактная форма оформления (12.10.2026, просьба владельца «слишком
      растянута»). Одна сетка вместо стопки: Имя+Телефон, Город/Провинция/
      Индекс/Зона в строку; на телефоне Город отдельно, Провинция+Индекс
      вместе. Всё ограничено #checkout-form — формы кабинета не трогаем. ──── */
.shop-page--checkout { padding: 40px 0 72px; }
.shop-page--checkout h1 { margin-bottom: 16px; }
.shop-page--checkout .shop-badge { margin-bottom: 10px; }
#checkout-form h2 { margin-bottom: 12px; }
.co-grid {
  display: grid;
  grid-template-columns: 1.3fr 1.1fr .9fr 1.1fr;
  grid-template-areas:
    "name  name  phone phone"
    "email email email email"
    "addr  addr  addr  addr"
    "city  prov  cp    zone";
  column-gap: 12px;
}
.co-name { grid-area: name; } .co-phone { grid-area: phone; }
.co-email { grid-area: email; } .co-addr { grid-area: addr; }
.co-city { grid-area: city; } .co-prov { grid-area: prov; }
.co-cp { grid-area: cp; } .co-zone { grid-area: zone; }
.co-grid > * { min-width: 0; }
#checkout-form .ortodoxo-field { gap: 4px; margin-bottom: 10px; }
#checkout-form .ortodoxo-field label { font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#checkout-form .ortodoxo-input,
#checkout-form .ortodoxo-select { height: 40px; padding: 0 14px; border-radius: 10px; }
#checkout-form .ortodoxo-select { padding-right: 32px; }
#checkout-form .co-check { margin: 2px 0 10px; }
#checkout-form .co-check label { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 13px; cursor: pointer; white-space: normal; }
#checkout-form .co-check input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: #B8962E; }
#checkout-form .pay-methods { margin: 2px 0 0; }
#checkout-form .pay-methods legend { font-size: 12px; margin-bottom: 6px; }
#checkout-form .pay-option { gap: 10px; padding: 9px 14px; margin-bottom: 6px; border-radius: 10px; }
#checkout-form .pay-option input { width: 16px; height: 16px; margin-top: 2px; }
#checkout-form .pay-option-body { gap: 0; }
#checkout-form .pay-option-title { font-size: 14px; line-height: 1.35; }
#checkout-form .pay-option-note { font-size: 12px; line-height: 1.35; }
#checkout-form .pay-test-note { padding: 6px 10px; margin: 0; }
#checkout-form .co-legal { font-size: 12px; line-height: 1.45; color: #92949F; margin: 10px 0 12px; }
@media (max-width: 575px) {
  .shop-page--checkout { padding: 24px 0 56px; }
  .co-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "name  phone"
      "email email"
      "addr  addr"
      "city  city"
      "prov  cp"
      "zone  zone";
    column-gap: 10px;
  }
  /* 16px — иначе iPhone приближает страницу при фокусе в поле */
  #checkout-form .ortodoxo-input,
  #checkout-form .ortodoxo-select { height: 42px; font-size: 16px; padding: 0 12px; }
  #checkout-form .ortodoxo-select { padding-right: 30px; }
}
