/* ═══════════════════════════════════════════════════════════
   AnnaVase — витрина магазина
   Палитра: пудровый, кремовый, пыльная роза, золото
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #fffaf7;
  --surface: #ffffff;
  --blush: #f9e9e6;
  --blush-soft: #fdf4f1;
  --rose: #c4787f;
  --rose-dark: #a55c66;
  --rose-soft: #e7b6ba;
  --plum: #3d2b31;
  --ink: #3a2c30;
  --muted: #8d757b;
  --gold: #c3a478;
  --line: #f1e2de;
  --shadow-sm: 0 6px 18px rgba(158, 108, 118, 0.08);
  --shadow: 0 20px 45px rgba(158, 108, 118, 0.14);
  --radius: 24px;
  --radius-sm: 16px;
  --font-serif: 'Playfair Display', 'Times New Roman', Georgia, serif;
  --font-sans: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

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

body.no-scroll {
  overflow: hidden;
}

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

[hidden] {
  display: none !important;
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--rose-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ── Кнопки ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 12px 26px rgba(196, 120, 127, 0.28);
}

.btn-primary:hover {
  background: var(--rose-dark);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.btn-ghost {
  background: transparent;
  border-color: var(--rose-soft);
  color: var(--rose-dark);
}

.btn-ghost:hover {
  background: var(--blush);
}

.btn-full {
  width: 100%;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--blush-soft);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  transition: background 0.18s ease, color 0.18s ease;
}

.icon-button:hover {
  background: var(--blush);
  color: var(--rose-dark);
}

/* ── Шапка ───────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 250, 247, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(241, 226, 222, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.logo {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--plum);
  line-height: 1;
}

.logo span {
  color: var(--rose);
}

.logo--light {
  color: #fff;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  position: relative;
  padding: 6px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--rose);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.main-nav a:hover {
  color: var(--rose-dark);
}

.main-nav a:hover::after {
  transform: scaleX(1);
}

.cart-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-left: 4px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--plum);
  transition: border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.cart-button:hover {
  border-color: var(--rose-soft);
  color: var(--rose-dark);
  box-shadow: var(--shadow-sm);
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cart-count.is-empty {
  opacity: 0;
  transform: scale(0.6);
}

/* ── Первый экран ────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 480px at 88% 8%, rgba(231, 182, 186, 0.35), transparent 65%),
    radial-gradient(700px 420px at 6% 92%, rgba(249, 233, 230, 0.9), transparent 70%),
    linear-gradient(170deg, #fdf3ef 0%, var(--bg) 62%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 56px;
  padding: 72px 0 88px;
}

.hero-text h1 {
  font-size: clamp(38px, 5vw, 64px);
  letter-spacing: 0.005em;
}

.hero-lead {
  max-width: 440px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-points li::before {
  content: '✿';
  color: var(--rose-soft);
  font-size: 12px;
}

.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 460px;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}

.hero-blob--one {
  width: 340px;
  height: 340px;
  top: 20px;
  right: 10px;
  background: linear-gradient(140deg, rgba(231, 182, 186, 0.55), rgba(249, 233, 230, 0.2));
}

.hero-blob--two {
  width: 190px;
  height: 190px;
  bottom: 10px;
  left: 10px;
  background: linear-gradient(140deg, rgba(195, 164, 120, 0.28), rgba(249, 233, 230, 0.15));
}

.hero-frame {
  position: relative;
  width: min(400px, 86%);
  aspect-ratio: 4 / 5;
  border-radius: 220px 220px 32px 32px;
  overflow: hidden;
  background: linear-gradient(165deg, #f6ddd9, #fdf4f1 70%);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-note {
  position: absolute;
  right: -6px;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.hero-note-mark {
  color: var(--rose);
  font-size: 20px;
}

/* ── Каталог ─────────────────────────────────────────────── */
.catalog {
  padding: 84px 0 40px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 38px;
}

.section-head h2 {
  font-size: clamp(30px, 3.4vw, 44px);
}

.section-note {
  max-width: 340px;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.catalog-root {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.catalog-loading,
.catalog-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 240px;
  padding: 40px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.catalog-empty-icon {
  font-size: 32px;
  color: var(--rose-soft);
}

.catalog-empty-hint {
  font-size: 13px;
  color: var(--muted);
}

.spinner {
  width: 26px;
  height: 26px;
  border: 2px solid var(--blush);
  border-top-color: var(--rose);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.category-block {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.category-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.category-title h3 {
  font-size: 27px;
}

.category-title p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.carousel-nav {
  display: flex;
  gap: 8px;
}

.carousel-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--plum);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.carousel-arrow:hover:not(:disabled) {
  background: var(--rose);
  border-color: var(--rose);
  color: #fff;
}

.carousel-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.carousel {
  margin: 0 -6px;
}

.carousel-track {
  display: flex;
  gap: 22px;
  padding: 8px 6px 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

/* ── Карточка товара ─────────────────────────────────────── */
.product-card {
  display: flex;
  flex: 0 0 clamp(232px, 25.5vw, 286px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(241, 226, 222, 0.9);
  border-radius: var(--radius);
  background: var(--surface);
  scroll-snap-align: start;
  box-shadow: 0 2px 0 rgba(158, 108, 118, 0.02);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--rose-soft);
  box-shadow: var(--shadow);
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(160deg, var(--blush), var(--blush-soft));
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.04);
}

.product-media-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--rose-soft);
  font-size: 44px;
}

.badge {
  position: absolute;
  top: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-sale {
  left: 14px;
  background: var(--plum);
  color: #fff;
}

.badge-out {
  right: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 18px 20px;
}

.product-body h4 {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

.product-desc {
  display: -webkit-box;
  margin-top: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.price {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price-current {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.price-old {
  color: var(--muted);
  font-size: 12px;
  text-decoration: line-through;
}

.btn-add {
  padding: 10px 16px;
  border: 1px solid var(--rose-soft);
  border-radius: 999px;
  background: var(--blush-soft);
  color: var(--rose-dark);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-add:hover:not(:disabled) {
  background: var(--rose);
  border-color: var(--rose);
  color: #fff;
}

.btn-add:disabled {
  border-color: var(--line);
  background: var(--blush-soft);
  color: var(--muted);
  cursor: not-allowed;
}

.product-card.is-out .product-media img {
  opacity: 0.55;
  filter: grayscale(0.35);
}

/* Ссылки открытия карточки */
.product-media--button {
  display: block;
  padding: 0;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.product-title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease;
}

.product-title-link:hover {
  color: var(--rose-dark);
}

.product-quick-view {
  position: absolute;
  left: 50%;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--plum);
  box-shadow: var(--shadow-sm);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.product-card:hover .product-quick-view,
.product-media--button:focus-visible .product-quick-view {
  opacity: 1;
  transform: translate(-50%, 0);
}

.product-photos-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(61, 43, 49, 0.55);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.product-card:hover .product-photos-count {
  opacity: 0;
}

@media (hover: none) {
  .product-quick-view {
    display: none;
  }
}

/* ── Преимущества ────────────────────────────────────────── */
.perks {
  padding: 26px 0 20px;
}

.perks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.perk {
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, #fff, var(--blush-soft));
}

.perk-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--blush);
  color: var(--rose-dark);
}

.perk h3 {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
}

.perk p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ── О магазине ──────────────────────────────────────────── */
.about {
  padding: 80px 0 90px;
}

.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 48px;
}

.about-text h2 {
  font-size: clamp(30px, 3.4vw, 44px);
}

.about-text p {
  max-width: 480px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14.5px;
}

.about-card {
  padding: 44px 40px;
  border-radius: var(--radius);
  background:
    radial-gradient(320px 220px at 90% 0%, rgba(255, 255, 255, 0.35), transparent 70%),
    linear-gradient(155deg, var(--rose), #b06a72);
  color: #fff;
  box-shadow: var(--shadow);
}

.about-quote {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.2vw, 26px);
  font-style: italic;
  line-height: 1.45;
}

.about-sign {
  display: block;
  margin-top: 26px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* ── Подвал ──────────────────────────────────────────────── */
.site-footer {
  padding: 54px 0 40px;
  background: var(--plum);
  color: rgba(255, 250, 247, 0.72);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  align-items: start;
  gap: 32px;
}

.footer-brand p {
  max-width: 280px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}

.footer-links a {
  width: fit-content;
  transition: color 0.18s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  grid-column: 1 / -1;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 250, 247, 0.14);
  font-size: 11.5px;
  line-height: 1.65;
  opacity: 0.7;
}

/* ── Корзина ─────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(61, 43, 49, 0.42);
  backdrop-filter: blur(3px);
  animation: fade-in 0.2s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 110;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  height: 100%;
  background: var(--bg);
  box-shadow: -20px 0 60px rgba(61, 43, 49, 0.18);
  transform: translateX(102%);
  transition: transform 0.32s cubic-bezier(0.22, 0.8, 0.3, 1);
  visibility: hidden;
}

.cart-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 26px;
  border-bottom: 1px solid var(--line);
}

.cart-head h2 {
  font-size: 24px;
}

.cart-body {
  flex: 1;
  padding: 20px 26px;
  overflow-y: auto;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 100%;
  min-height: 260px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.cart-empty-icon {
  font-size: 40px;
  color: var(--rose-soft);
}

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

.cart-item:first-child {
  padding-top: 4px;
}

.cart-item-media {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 74px;
  width: 74px;
  height: 92px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--blush);
  color: var(--rose-soft);
  font-size: 24px;
}

.cart-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.cart-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.cart-item-top h4 {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.cart-item-remove {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  padding: 0 2px;
  transition: color 0.18s ease;
}

.cart-item-remove:hover {
  color: var(--rose-dark);
}

.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.qty-control button {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--plum);
  font-size: 15px;
  line-height: 1;
  transition: background 0.15s ease;
}

.qty-control button:hover:not(:disabled) {
  background: var(--blush);
}

.qty-control button:disabled {
  opacity: 0.3;
  cursor: default;
}

.qty-control span {
  min-width: 22px;
  font-size: 13px;
  text-align: center;
}

.cart-foot {
  padding: 20px 26px 26px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.cart-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--muted);
}

.cart-total-row strong {
  color: var(--ink);
  font-size: 20px;
}

.cart-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
}

/* ── Модальные окна ──────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(61, 43, 49, 0.45);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100dvh - 48px);
  padding: 38px 36px 30px;
  overflow-y: auto;
  border-radius: 28px;
  background: var(--bg);
  box-shadow: 0 30px 80px rgba(61, 43, 49, 0.3);
  transform: translateY(14px);
  transition: transform 0.25s ease;
}

.modal.is-open .modal-card {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 6;
}

.modal-card h2 {
  margin-top: 4px;
  font-size: clamp(26px, 3vw, 34px);
}

.modal-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13.5px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field--wide {
  grid-column: 1 / -1;
}

.field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.field em {
  font-style: normal;
  font-weight: 400;
  opacity: 0.75;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-size: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #c3b0b3;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--rose-soft);
  box-shadow: 0 0 0 4px rgba(231, 182, 186, 0.22);
}

.field textarea {
  resize: vertical;
  min-height: 82px;
}

.form-error {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fdecec;
  color: #b1454f;
  font-size: 13px;
}

.modal-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
  text-align: center;
}

.modal-note--demo {
  padding: 8px 12px;
  border-radius: 10px;
  background: #fdf3e2;
  color: #8a6a35;
}

.checkout-legal {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
  text-align: center;
}

.modal .btn-full {
  margin-top: 20px;
}

/* ── Промокод и итоги в оформлении ───────────────────────── */
.promo-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}

.promo-input-row {
  display: flex;
  gap: 8px;
}

.promo-input-row input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.promo-input-row .btn {
  padding: 12px 20px;
  font-size: 13px;
}

.promo-feedback {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.5;
}

.promo-feedback.is-error {
  color: #b1454f;
}

.promo-feedback.is-success {
  color: #2f7a4b;
}

.checkout-totals {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--blush-soft);
}

.checkout-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.checkout-total-row strong {
  color: var(--ink);
  font-size: 14px;
}

.checkout-total-row--discount strong {
  color: var(--rose-dark);
}

.checkout-total-row--grand {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.checkout-total-row--grand strong {
  font-size: 19px;
}

/* ── Всплывающая карточка товара ─────────────────────────── */
.product-modal-card {
  display: flex;
  flex-direction: column;
  width: min(940px, 100%);
  max-height: calc(100dvh - 48px);
  padding: 0;
  overflow: hidden;
}

.product-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  grid-template-rows: minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  max-height: calc(100dvh - 48px);
}

.product-modal-media {
  position: relative;
  display: flex;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(160deg, var(--blush), var(--blush-soft));
}

.product-gallery {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

.product-gallery-main {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.product-gallery-main > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.55);
}

.product-gallery-thumb {
  width: 54px;
  height: 66px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

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

.product-gallery-thumb:hover {
  transform: translateY(-1px);
}

.product-gallery-thumb.is-active {
  border-color: var(--rose);
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--plum);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.18s ease;
}

.gallery-arrow:hover {
  background: #fff;
}

.gallery-arrow--prev {
  left: 12px;
}

.gallery-arrow--next {
  right: 12px;
}

.gallery-counter {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 2;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(61, 43, 49, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transform: translateX(-50%);
}

.product-modal-info {
  min-height: 0;
  padding: 44px 40px 34px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.product-modal-info h2 {
  margin-top: 2px;
  font-size: clamp(26px, 3vw, 36px);
}

.product-modal-short {
  margin-top: 12px;
  color: var(--plum);
  font-family: var(--font-serif);
  font-size: 17px;
  font-style: italic;
  line-height: 1.5;
}

.product-modal-desc {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.product-modal-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 22px;
}

.product-modal-price .price-current {
  font-size: 24px;
}

.product-modal-stock {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
}

.modal .product-modal-close {
  margin-top: 10px;
}

.product-share {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.product-share-title {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.share-btn:hover {
  border-color: var(--rose-soft);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blush);
  color: var(--rose-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
}

.share-btn--vk .share-icon {
  background: #0077ff;
  color: #fff;
}

.share-btn--max .share-icon {
  background: linear-gradient(135deg, #8a5cff, #3b82f6);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.share-btn--tg .share-icon {
  background: #229ed9;
  color: #fff;
}

.share-btn--copy .share-icon {
  font-size: 14px;
  font-weight: 600;
}

/* ── Тост ────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 130;
  max-width: min(480px, calc(100% - 32px));
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--plum);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 13.5px;
  text-align: center;
  transform: translate(-50%, 14px);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ── Адаптив ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-inner {
    gap: 36px;
    padding: 56px 0 70px;
  }

  .hero-art {
    min-height: 400px;
  }

  .about-inner {
    gap: 32px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-text {
    max-width: 560px;
  }

  .hero-art {
    order: -1;
    min-height: 340px;
  }

  .hero-frame {
    width: min(320px, 70%);
  }

  .hero-note {
    right: 8%;
    bottom: 6px;
  }

  .perks-grid {
    grid-template-columns: 1fr;
  }

  .about-inner {
    grid-template-columns: 1fr;
  }

  .section-note {
    display: none;
  }

  .product-card {
    flex-basis: 240px;
  }
}

@media (max-width: 760px) {
  .product-modal-card {
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 24px);
    overflow: hidden;
  }

  /* Крестик закреплён в углу карточки и не уезжает при прокрутке содержимого. */
  .product-modal-card .modal-close {
    top: 10px;
    right: 10px;
    z-index: 6;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
  }

  #product-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .product-modal-grid {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .product-modal-media {
    min-height: 0;
    max-height: 46dvh;
  }

  .product-gallery-main {
    min-height: 180px;
  }

  .product-gallery-thumbs {
    padding: 10px;
  }

  .product-gallery-thumb {
    width: 46px;
    height: 56px;
  }

  .product-modal-info {
    padding: 28px 24px 26px;
    overflow: visible;
  }
}

@media (max-height: 700px) and (min-width: 761px) {
  .product-modal-info {
    padding: 28px 32px 24px;
  }

  .product-gallery-thumbs {
    padding: 8px;
  }

  .product-gallery-thumb {
    width: 44px;
    height: 54px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 32px, 1200px);
  }

  .header-inner {
    gap: 14px;
    min-height: 66px;
  }

  .logo {
    font-size: 24px;
  }

  .main-nav {
    gap: 18px;
  }

  .main-nav a {
    font-size: 13px;
  }

  .hero-inner {
    padding: 34px 0 52px;
  }

  .hero-text h1 {
    font-size: clamp(32px, 9vw, 44px);
  }

  .hero-art {
    min-height: 280px;
  }

  .hero-frame {
    width: min(260px, 76%);
  }

  .hero-blob--one {
    width: 240px;
    height: 240px;
  }

  .hero-note {
    display: none;
  }

  .catalog {
    padding-top: 56px;
  }

  .category-title h3 {
    font-size: 23px;
  }

  .carousel-track {
    gap: 14px;
  }

  .product-card {
    flex-basis: 76vw;
  }

  .about {
    padding: 56px 0 64px;
  }

  .about-card {
    padding: 32px 26px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .modal {
    padding: 12px;
    align-items: flex-end;
  }

  .modal-card {
    padding: 30px 22px 24px;
    border-radius: 24px 24px 18px 18px;
    max-height: calc(100dvh - 24px);
  }

  .product-modal-card {
    padding: 0;
    border-radius: 24px 24px 18px 18px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .cart-head,
  .cart-body,
  .cart-foot {
    padding-left: 20px;
    padding-right: 20px;
  }

  .toast {
    bottom: 16px;
  }
}
