/* ═══════════════════════════════════════════════════════════
   КЛУБОК ТЕПЛА — мягкий ателье-стиль
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Nunito:wght@300;400;500;600&display=swap');

:root {
  --paper:       #fff9f4;
  --surface:     #f5ebe0;
  --surface-2:   #eadfce;
  --line-soft:   #ddd0c2;
  --ink:         #3d342c;
  --accent:      #b8734f;
  --accent-dark: #9a5c3a;
  --accent-soft: #e8b49a;
  --green:       #5f8a6d;
  --text-muted:  #6d635a;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Nunito', system-ui, sans-serif;

  --nav-h: 72px;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 4px 18px rgba(61, 52, 44, 0.07);
  --shadow-hover: 0 8px 24px rgba(61, 52, 44, 0.1);
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  /* алиасы для inline-стилей страниц */
  --cream:      var(--paper);
  --warm:       var(--surface);
  --sand:       var(--surface-2);
  --terracotta: var(--accent);
  --clay:       var(--accent-dark);
  --forest:     var(--green);
  --charcoal:   var(--ink);
  --muted:      var(--text-muted);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Навигация ──────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 5vw;
  gap: 1.5rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--accent-dark);
  white-space: nowrap;
}

.nav__logo img,
.logo-img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent-soft);
  flex: 0 0 auto;
}
.logo-img--sm { width: 34px; height: 34px; }

.nav__logo-placeholder {
  width: 42px; height: 42px;
  background: var(--surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin-left: auto;
}

.nav__links a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink);
  transition: color var(--transition);
  position: relative;
  padding: 4px 0;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.nav__links a:hover,
.nav__links a.active { color: var(--accent); }
.nav__links a:hover::after,
.nav__links a.active::after { transform: scaleX(1); }

/* Старая отдельная кнопка корзины — не показывать */
.nav > a.nav__cart,
.nav > .nav__cart {
  display: none !important;
}

.nav__cart-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav__cart-count {
  background: var(--accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.nav__cart-count.visible { display: inline-flex; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 4px;
}
.nav__burger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Кнопки ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  border-radius: var(--radius-pill);
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: white;
}
.btn--primary:hover {
  background: var(--accent-dark);
}

.btn--outline {
  background: white;
  color: var(--ink);
  border: 1.5px solid var(--line-soft);
}
.btn--outline:hover {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.hero .btn--outline {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.75);
}
.hero .btn--outline:hover {
  background: white;
  color: var(--accent-dark);
  border-color: white;
}

/* ── Шапка внутренних страниц ───────────────────────────── */
.page-head {
  background: var(--ink);
  border-bottom: 1px solid rgba(255, 249, 244, 0.08);
  text-align: left;
}

.page-head__inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 28px 5vw 24px;
  text-align: left;
}

.page-head__main {
  text-align: left;
  flex: 1 1 auto;
  min-width: 0;
}

.page-head__eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin: 0 0 6px;
  text-align: left;
}

.page-head__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 400;
  color: var(--paper);
  margin: 0 0 6px;
  line-height: 1.15;
  text-align: left;
}

.page-head__sub {
  font-size: 0.9rem;
  color: rgba(255, 249, 244, 0.72);
  margin: 0;
  max-width: 640px;
  line-height: 1.55;
  text-align: left;
}

.btn--ghost {
  background: white;
  color: var(--accent-dark);
  border: 1.5px solid white;
  padding: 10px 20px;
  font-size: 0.78rem;
}
.btn--ghost:hover {
  background: var(--surface);
  color: var(--ink);
}

.btn--forest {
  background: var(--green);
  color: white;
}
.btn--forest:hover {
  background: #5f7d6b;
  transform: translateY(-2px);
}

/* ── Секции ─────────────────────────────────────────────── */
.section { padding: 88px 5vw; }

.section__header {
  text-align: center;
  margin-bottom: 52px;
}

.section__eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--ink);
}

.section__subtitle {
  margin-top: 14px;
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Карточка товара ────────────────────────────────────── */
.product-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.product-card__img {
  aspect-ratio: 3/4;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.product-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  image-orientation: from-image;
}
.product-card:hover .product-card__img img { transform: scale(1.05); }

.product-card__img-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--surface-2);
}

.product-card__badge {
  position: absolute;
  z-index: 2;
  top: 12px; left: 12px;
  background: var(--accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

.product-card__body { padding: 20px; }

.product-card__category {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.product-card__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.3;
}

.product-card__desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.55;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-card__price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-dark);
}

.product-card__price span:not(.product-card__price-old):not(.product-card__price-new):not(.product-card__discount-pct):not(.product-card__price-cur) {
  font-size: 0.8rem;
  font-family: var(--font-body);
  color: var(--text-muted);
}

.product-card__price--sale { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.product-card__price--sale .product-card__price-old {
  text-decoration: line-through;
  opacity: 0.55;
  font-size: 0.85em;
  color: var(--text-muted);
}
.product-card__price--sale .product-card__price-new { color: var(--accent); }
.product-card__discount-pct {
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  background: var(--accent);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}
.product-card__badge--sale { background: #c45c5c; }

.product-card__add {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(74, 66, 57, 0.08);
}
.product-card__add:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.08);
}

/* ── Формы / заказы ─────────────────────────────────────── */
.manage-booking,
.order-management {
  background: white;
  border-radius: 24px;
  padding: 36px;
  margin-top: 44px;
  box-shadow: var(--shadow-soft);
}
.manage-booking__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.4vw, 2.4rem);
  font-weight: 400;
  margin-bottom: 10px;
}
.manage-booking__sub {
  max-width: 720px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.form-row { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.form-group {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 115, 79, 0.18);
}

.form-error { min-height: 18px; color: var(--accent); font-size: 0.82rem; }
.api-error {
  display: none;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 500;
}
.api-error.show { display: block; }

.manage-booking-empty {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  text-align: center;
}
.manage-booking-card,
.order-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px;
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.manage-booking-card__label,
.order-card__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.manage-booking-card__field,
.order-card__field { font-weight: 600; }
.manage-booking-card__top,
.order-card__top,
.manage-booking-card__footer,
.order-card__footer {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}
.order-card__details {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.order-card__items { white-space: pre-wrap; margin: 0; font-size: 0.9rem; }

/* ── Футер ──────────────────────────────────────────────── */
.footer {
  background: var(--ink);
  color: rgba(250, 247, 242, 0.75);
  padding: 64px 5vw 32px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 44px;
  margin-bottom: 44px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--paper);
  margin-bottom: 14px;
}
.footer__tagline {
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: 280px;
}
.footer__heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
  margin-bottom: 16px;
}
.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer__links a {
  font-size: 0.88rem;
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--accent); }

.footer__contact p { font-size: 0.88rem; margin-bottom: 8px; line-height: 1.6; }

.footer__social {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.footer__social a {
  width: 38px; height: 38px;
  border: 1px solid rgba(250, 247, 242, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--transition);
}
.footer__social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(201, 136, 107, 0.15);
}

.footer__bottom {
  border-top: 1px solid rgba(250, 247, 242, 0.1);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
}

/* ── Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  max-width: min(92vw, 360px);
  background: var(--ink);
  color: var(--paper);
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-hover);
  transform: translateY(1rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.4s ease, opacity 0.35s ease, visibility 0s linear 0.4s;
}
.toast.is-visible,
.toast.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.4s ease, opacity 0.35s ease, visibility 0s;
}
.toast__icon { color: var(--accent); flex-shrink: 0; }

/* ── Адаптив ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .form-row { flex-direction: column; }
}

@media (max-width: 640px) {
  .nav__links {
    display: none;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    background: rgba(250, 247, 242, 0.97);
    padding: 20px 5vw;
    border-bottom: 1px solid var(--line-soft);
    gap: 1rem;
  }
  .nav__links.open { display: flex; }
  .nav__burger { display: flex; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .toast, .product-card, .btn { transition: none; }
  .product-card:hover { transform: none; }
}

/* ── Переопределения inline-страниц ─────────────────────── */
.catalog-controls {
  background: var(--paper) !important;
  border-bottom: 1px solid var(--line-soft) !important;
}
