/* =========================================================
   dreamsclothing — спільні стилі магазину
   ========================================================= */

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

:root {
  --cream: #FAF7F2;
  --cream-dark: #F3EDE4;
  --brown: #5C3D2E;
  --brown-light: #8B6F5E;
  --brown-dark: #3A2519;
  --gold: #C4A265;
  --text: #2C1810;
  --text-light: #6B5A50;
  --white: #FFFFFF;
  --border: #E5DDD4;
  --success: #4A7C59;
  --sale: #C43333;
  --star: #D4A844;
  --radius: 10px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  line-height: 1.2;
  color: var(--brown-dark);
}

a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
}

/* ===== ШАПКА ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--brown-dark);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 20px;
  font-weight: 600;
  flex-shrink: 0;
}

.brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 23px;
  color: var(--brown-dark);
  letter-spacing: 0.4px;
}

.header-nav {
  display: flex;
  gap: 26px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.header-nav a {
  text-decoration: none;
  color: var(--text-light);
  transition: color 0.2s;
}

.header-nav a:hover,
.header-nav a[aria-current="page"] { color: var(--brown-dark); }

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

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border: 1.5px solid var(--brown);
  border-radius: 30px;
  color: var(--brown);
  background: var(--white);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.header-phone:hover { background: var(--brown); color: var(--white); }

.header-phone svg,
.cart-link svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--brown);
  color: var(--white);
  text-decoration: none;
  transition: background 0.2s;
}

.cart-link:hover { background: var(--brown-dark); }
.cart-link svg { width: 19px; height: 19px; }

.cart-count {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--brown-dark);
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--cream);
}

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

/* ===== КНОПКИ ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 6px;
  padding: 15px 28px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
}

.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

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

.btn-ghost {
  background: transparent;
  color: var(--brown);
  border: 1.5px solid var(--brown);
}

.btn-ghost:hover:not(:disabled) { background: var(--brown); color: var(--white); }
.btn-block { width: 100%; }

/* ===== ЗАГОЛОВОК СТОРІНКИ ===== */
.page-head { padding: 34px 0 18px; }
.page-head h1 { font-size: clamp(32px, 5vw, 48px); }

.page-sub {
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-light);
}

/* ===== ФІЛЬТР КАТЕГОРІЙ ===== */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 26px;
}

.chip {
  padding: 8px 18px;
  border-radius: 30px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.chip:hover { border-color: var(--brown-light); }

.chip[aria-pressed="true"] {
  background: var(--brown);
  border-color: var(--brown);
  color: var(--white);
}

/* ===== СІТКА ТОВАРІВ ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 20px;
  padding-bottom: 60px;
}

.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream-dark);
}

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

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

.badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 11px;
  border-radius: 30px;
  background: var(--white);
  color: var(--brown-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.badge-sale {
  left: auto; right: 12px;
  background: var(--sale);
  color: var(--white);
}

.card-body { padding-top: 12px; }

.card-title {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.card-swatches {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}

.card-swatches span {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
}

.price { font-size: 17px; font-weight: 700; color: var(--brown-dark); }

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

/* ===== СТАНИ ===== */
.state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-light);
  grid-column: 1 / -1;
}

.state h2 { font-size: 30px; margin-bottom: 8px; }

.skeleton {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--cream-dark) 40%, #FBF8F4 50%, var(--cream-dark) 60%);
  background-size: 300% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ===== СТОРІНКА ТОВАРУ ===== */
.breadcrumbs {
  padding: 20px 0 14px;
  font-size: 13px;
  color: var(--text-light);
}

.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding-bottom: 50px;
}

.gallery-main {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream-dark);
}

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

.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.gallery-thumbs::-webkit-scrollbar { display: none; }

.gallery-thumbs button {
  flex: 0 0 72px;
  aspect-ratio: 3 / 4;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: var(--cream-dark);
  opacity: 0.7;
  transition: all 0.2s;
}

.gallery-thumbs button[aria-current="true"] { border-color: var(--brown); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-info { position: sticky; top: 92px; }
/* Назва товару — жирна й велика; опис одразу під нею */
.product-info h1 { font-size: clamp(30px, 3.6vw, 42px); font-weight: 700; line-height: 1.12; letter-spacing: -0.2px; }

.product-price {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 20px;
  flex-wrap: wrap;
}

.product-price .price { font-size: 26px; }
.product-price .price-old { font-size: 18px; }

.sale-pill {
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--sale);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.option-label {
  display: block;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 10px;
  font-weight: 500;
}

.option-label b { color: var(--text); text-transform: none; letter-spacing: 0; font-weight: 600; }
.option-group { margin-bottom: 22px; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }

.swatch {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px var(--border);
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--brown); }

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

.size-btn {
  min-width: 54px;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.size-btn:hover { border-color: var(--brown-light); }

.size-btn[aria-pressed="true"] {
  background: var(--brown);
  border-color: var(--brown);
  color: var(--white);
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--brown);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.buy-row {
  display: flex;
  gap: 10px;
  margin: 8px 0 12px;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--white);
}

.qty button {
  width: 38px; height: 48px;
  border: none;
  background: none;
  font-size: 18px;
  color: var(--brown);
  cursor: pointer;
}

.qty output { min-width: 26px; text-align: center; font-weight: 600; }

.buy-row .btn { flex: 1; }

.form-error {
  color: var(--sale);
  font-size: 13px;
  margin: -8px 0 14px;
  min-height: 1em;
}

/* Кнопки покупки на сторінці товару — округлі, як «таблетки» */
.btn-pill {
  border-radius: 40px;
  padding: 16px 20px;
  font-size: 15px;
  text-transform: none;
  letter-spacing: 0.2px;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

.btn-quick {
  width: 100%;
  background: transparent;
  color: var(--brown);
  border: 1.5px solid var(--brown);
}

.btn-quick:hover { background: var(--brown); color: var(--white); }

.quick-note {
  margin: 10px 0 18px;
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
}

.perks-row {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 16px 10px;
  border-radius: var(--radius);
  background: var(--cream-dark);
  text-align: center;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--text);
}

.perks-row li { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.perks-row svg { width: 26px; height: 26px; fill: var(--brown); }
.nowrap { white-space: nowrap; }

.quick-summary {
  margin: -6px 0 16px;
  font-size: 14px;
  color: var(--text-light);
}

.quick-box { max-width: 440px; }

/* Зірки: п'ять символів, зафарбованих на --rating із 5 (4.8 → 96%) */
.stars {
  display: inline-block;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 2px;
  background: linear-gradient(90deg, var(--star) calc(var(--rating) / 5 * 100%), #DDD3C8 0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stars::before { content: '★★★★★'; }

.rating-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
}

.rating-line b { font-weight: 600; }
.rating-count { color: var(--text-light); text-decoration: underline; text-underline-offset: 3px; }

#reviews { scroll-margin-top: 70px; }

.product-desc {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.75;
  white-space: pre-line;
}

/* ===== СЕКЦІЇ НИЖЧЕ ТОВАРУ ===== */
.section { padding: 44px 0; border-top: 1px solid var(--border); }
.section h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 20px; }

.spec-list {
  max-width: 760px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.spec-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.spec-row:last-child { border-bottom: none; }
.spec-row dt { font-size: 13px; font-weight: 500; color: var(--text-light); }
.spec-row dd { font-size: 14px; color: var(--text); }

/* «Матеріали»: фото тканини, текст, плитки з головним і рядки складу */
.materials-photo {
  width: 100%;
  max-width: 860px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 22px;
  background: var(--cream-dark);
}

.materials-text {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-light);
  white-space: pre-line;
}

.mat-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 760px;
  margin-bottom: 18px;
}

.mat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  text-align: center;
}

.mat-tile b {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(19px, 4.8vw, 30px);
  font-weight: 600;
  line-height: 1.05;
  color: var(--brown);
  overflow-wrap: break-word;
}

.mat-tile span { margin-top: 6px; font-size: 12.5px; color: var(--text-light); }

/* «Особливості»: фото й текст поруч, фото чергується ліворуч/праворуч */
.feature-list { display: grid; gap: 30px; max-width: 860px; }

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}

.feature.no-photo { grid-template-columns: 1fr; }
.feature:nth-child(even) img { order: 2; }

.feature img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--cream-dark);
}

.feature h3 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; margin-bottom: 8px; }
.feature p { font-size: 15px; line-height: 1.6; color: var(--text-light); }

.table-scroll { overflow-x: auto; max-width: 760px; }

.size-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}

.size-table th, .size-table td {
  padding: 13px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.size-table th {
  font-size: 11.5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-light);
  background: var(--cream-dark);
}

.size-table td:first-child {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 600;
  font-style: italic;
  color: var(--brown-dark);
}

.video-box {
  max-width: 380px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(60, 30, 15, 0.1);
}

.video-box video { width: 100%; display: block; }

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

.review {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.review img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 14px;
}

/* «Як це носять у житті»: стрічка фото, що гортається пальцем */
.life-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.life-head h2 { margin-bottom: 0; }
.life-head span { font-size: 14px; color: var(--text-light); }

.life-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin-right: -20px;
  padding-right: 20px;
}

.life-strip::-webkit-scrollbar { display: none; }

.life-strip img {
  flex: 0 0 auto;
  width: min(62vw, 280px);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--cream-dark);
  scroll-snap-align: start;
}

/* Підсумок відгуків: середня оцінка й розподіл за зірками */
.rv-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  max-width: 620px;
  margin-bottom: 22px;
}

.rv-score { display: flex; flex-direction: column; align-items: center; gap: 8px; }

.rv-score b {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 64px;
  font-weight: 600;
  line-height: 0.9;
  color: var(--brown-dark);
}

.rv-score .stars { font-size: 20px; }
.rv-count { font-size: 13px; color: var(--text-light); }

.rv-bars { display: grid; gap: 8px; }

.rv-bar {
  display: grid;
  grid-template-columns: 12px 14px 1fr 24px;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--text);
}

.rv-bar i { font-style: normal; color: var(--star); }
.rv-bar span:last-child { text-align: right; color: var(--text-light); }
.rv-track { height: 7px; border-radius: 4px; background: var(--cream-dark); overflow: hidden; }
.rv-track div { height: 100%; border-radius: 4px; background: var(--star); }

.rv-filters { margin: 0 0 20px; }
.rv-filters .chip { display: inline-flex; align-items: center; gap: 6px; }
.rv-filters svg { width: 16px; height: 16px; fill: currentColor; }
.review[hidden] { display: none; }

/* «Схожі моделі»: стрічка карток, що гортається пальцем */
.similar-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 250px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.similar-strip::-webkit-scrollbar { display: none; }
.similar-strip .card { scroll-snap-align: start; }

@media (max-width: 640px) {
  .similar-strip { grid-auto-columns: 46%; gap: 12px; }
}

/* Підсумковий блок унизу товару: гарантії й кнопка «Додати до кошика» */
.closing-box {
  max-width: 620px;
  padding: 10px 24px 24px;
  border-radius: 16px;
  background: var(--brown-dark);
  color: var(--white);
}

.closing-perks { list-style: none; margin-bottom: 20px; }

.closing-perks li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.closing-perks li:last-child { border-bottom: none; }

.closing-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.closing-icon svg { width: 22px; height: 22px; fill: var(--brown-dark); }
.closing-perks b { display: block; font-size: 16px; font-weight: 600; }
.closing-perks p { margin-top: 3px; font-size: 13.5px; line-height: 1.45; color: rgba(255, 255, 255, 0.7); }

.closing-btn { width: 100%; background: var(--gold); color: var(--brown-dark); font-weight: 700; }
.closing-btn:hover { background: #D4B47A; }

/* «Залишити свій відгук» */
.rv-empty { margin-bottom: 18px; color: var(--text-light); }

.rv-form-wrap { max-width: 620px; margin-top: 22px; }

.rv-form-wrap summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 20px;
  border-radius: 40px;
  background: var(--cream-dark);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.rv-form-wrap summary::-webkit-details-marker { display: none; }
.rv-form-wrap summary::before { content: '›'; font-size: 20px; line-height: 1; transform: rotate(90deg); transition: transform 0.2s; }
.rv-form-wrap[open] summary::before { transform: rotate(-90deg); }

.rv-form { margin-top: 16px; }
.rv-form textarea { min-height: 110px; resize: vertical; }

.rv-stars-input { display: flex; align-items: center; gap: 4px; margin: 4px 0 12px; font-size: 14px; color: var(--text-light); }
.rv-stars-input span { margin-right: 6px; }

.rv-stars-input button {
  width: 36px; height: 36px;
  border: none;
  background: none;
  font-size: 28px;
  line-height: 1;
  color: #DDD3C8;
  cursor: pointer;
}

.rv-stars-input button.on { color: var(--star); }

.rv-thanks {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #E3F0E6;
  color: #2E5A3A;
  font-size: 14px;
}

.review-stars { margin-bottom: 8px; }
.review p { font-size: 14px; line-height: 1.7; font-style: italic; margin-bottom: 12px; }
.review-author { font-size: 13px; font-weight: 600; }

/* ===== МОДАЛКА ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(30, 15, 10, 0.55);
}

.modal[hidden] { display: none; }

.modal-box {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 86vh;
  overflow: auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
}

.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  border: none;
  border-radius: 50%;
  background: var(--cream);
  font-size: 17px;
  cursor: pointer;
}

.modal-box h3 { font-size: 26px; margin-bottom: 16px; }

/* ===== СПОВІЩЕННЯ «ДОДАНО» ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  transform: translate(-50%, 140%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 18px;
  border-radius: 12px;
  background: var(--brown-dark);
  color: var(--white);
  font-size: 14px;
  box-shadow: 0 12px 34px rgba(30, 15, 10, 0.3);
  transition: transform 0.35s ease;
  max-width: calc(100% - 32px);
}

.toast.show { transform: translate(-50%, 0); }

.toast a {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 6px;
  background: var(--gold);
  color: var(--brown-dark);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
}

/* ===== КОШИК ===== */
.cart-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 60px;
}

.cart-items { list-style: none; }

.cart-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item img {
  width: 90px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  background: var(--cream-dark);
}

.cart-item h3 {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.cart-item h3 a { text-decoration: none; }
.cart-meta { font-size: 13px; color: var(--text-light); margin: 4px 0 10px; }
.cart-item .qty button { height: 36px; width: 34px; }

.cart-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
}

.remove-btn {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 12.5px;
  text-decoration: underline;
  cursor: pointer;
}

.checkout-box {
  position: sticky;
  top: 92px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.checkout-box h2 { font-size: 26px; margin-bottom: 14px; }

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  margin-bottom: 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.total-row strong { font-size: 22px; color: var(--brown-dark); }

.field { margin-bottom: 12px; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

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

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 16px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-light);
  cursor: pointer;
}

.consent input {
  flex-shrink: 0;
  width: 18px; height: 18px;
  margin-top: 1px;
  accent-color: var(--brown);
}

.consent a { color: var(--brown); }

.note { font-size: 12.5px; color: var(--text-light); margin-top: 12px; text-align: center; }

/* ===== СМУЖКА ГАРАНТІЙ ===== */
.trust {
  background: var(--cream-dark);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.trust-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 30px;
  font-size: 12.5px;
  color: var(--text-light);
}

.trust-items strong { color: var(--brown-dark); font-weight: 600; }

/* ===== ФУТЕР ===== */
.site-footer {
  background: var(--brown-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 44px 0 30px;
  text-align: center;
  font-size: 13px;
}

/* Футер у три колонки (будує app.js) */
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: left;
}

.footer-cols h4 {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 14px;
}

.footer-cols a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.footer-cols a:hover { color: var(--white); }
.footer-cols svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

.footer-bottom {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: left;
}

.footer-bottom div { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 10px; }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--white); }

@media (max-width: 640px) {
  .footer-cols { grid-template-columns: 1fr; gap: 26px; }
}

.site-footer h3 { color: var(--white); font-size: 24px; margin-bottom: 6px; }
.site-footer p { margin-bottom: 4px; }
.site-footer a { color: inherit; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 20px;
}

.footer-links a {
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.footer-links a:hover { color: var(--white); }

/* ===== АДАПТИВ ===== */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .header-nav { display: none; }
  /* minmax(0, 1fr): довгий ряд мініатюр прокручується всередині, а не розпирає сторінку */
  .product-layout,
  .cart-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .product-info,
  .checkout-box { position: static; }
  .reviews-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .product-grid { grid-template-columns: 1fr 1fr; gap: 22px 12px; }
  .card-title { font-size: 13.5px; }
  .price { font-size: 15px; }
  .reviews-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .review { padding: 12px; }
  .review img { aspect-ratio: 4 / 5; margin-bottom: 10px; }
  .review p { font-size: 13px; line-height: 1.55; }
  .review-author { font-size: 12px; }
  .rv-summary { gap: 18px; }
  .rv-score b { font-size: 54px; }
  .spec-row { grid-template-columns: 1fr; gap: 3px; }
  .feature { gap: 16px; }
  .feature h3 { font-size: 21px; }
  .feature p { font-size: 14px; }
  .header-row { height: 60px; }
  .brand-name { font-size: 19px; }
  .brand-mark { width: 32px; height: 32px; font-size: 18px; }
  .header-phone { padding: 7px 11px; font-size: 12.5px; }
  .modal-box { padding: 22px 16px; }
  .size-table th, .size-table td { padding: 10px 7px; font-size: 12.5px; }
}

/* На найвужчих екранах номер телефону не вміщається — лишаємо лише іконку */
@media (max-width: 400px) {
  .header-phone .header-phone-num { display: none; }
  .header-phone { width: 42px; height: 42px; padding: 0; justify-content: center; }
  .page-head h1 { font-size: 30px; }
}
