/* Takamnza — стилі магазину домашнього текстилю */

:root {
  --bg: #fbf6ee;
  --surface: #fffdf8;
  --surface-warm: #f1e3cf;
  --fg: #201914;
  --fg-2: #4c4037;
  --muted: #7a6d63;
  --meta: #9b5b32;
  --border: #ded2c3;
  --border-soft: #eee4d7;
  --accent: #9b5b32;
  --accent-on: #ffffff;
  --accent-hover: color-mix(in oklab, var(--accent), black 8%);
  --accent-active: color-mix(in oklab, var(--accent), black 14%);
  --success: #4f8a4f;
  --warn: #c9822f;
  --danger: #b33a3a;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: Inter, system-ui, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, monospace;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 17px;
  --text-lg: 20px;
  --text-xl: 28px;
  --text-2xl: 42px;
  --text-3xl: 64px;
  --text-4xl: 88px;
  --leading-body: 1.62;
  --leading-tight: 1;
  --tracking-display: -0.025em;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --section-y-desktop: 112px;
  --section-y-tablet: 80px;
  --section-y-phone: 56px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  --elev-flat: none;
  --elev-ring: 0 0 0 1px var(--border);
  --elev-raised: 0 20px 52px rgba(32, 25, 20, 0.12);
  --focus-ring: 0 0 0 4px rgba(155, 91, 50, 0.24);
  --motion-fast: 150ms;
  --motion-base: 240ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --container-max: 1180px;
  --container-gutter-desktop: 36px;
  --container-gutter-tablet: 24px;
  --container-gutter-phone: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
}

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

a { color: var(--fg); }

.wrap {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-gutter-desktop);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 var(--space-4);
}

h1 { font-size: var(--text-2xl); letter-spacing: var(--tracking-display); }
h2 { font-size: var(--text-xl); letter-spacing: -0.015em; }
h3 { font-size: var(--text-lg); }

p { margin: 0 0 var(--space-4); }

.note { color: var(--muted); font-size: var(--text-sm); }

.section-label {
  display: block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--meta);
  margin-bottom: var(--space-2);
}

/* ---------- шапка ---------- */

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

.header-row {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-4) 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.brand svg { flex: none; }

.brand-name {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.brand-tag {
  display: block;
  font-size: var(--text-xs);
  color: var(--muted);
  letter-spacing: 0.02em;
}

.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.main-nav a {
  text-decoration: none;
  color: var(--fg-2);
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
  transition: color var(--motion-fast) var(--ease-standard);
}

.main-nav a:hover { color: var(--fg); }
.main-nav a.current { color: var(--fg); border-bottom-color: var(--accent); }

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--accent);
  color: var(--accent-on);
  text-decoration: none;
  font-size: 15px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  transition: background var(--motion-fast) var(--ease-standard);
}

.cart-link:hover { background: var(--accent-hover); }
.cart-link:active { background: var(--accent-active); }

.cart-count {
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-pill);
  font-size: 13px;
  padding: 0 6px;
}

.menu-btn {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 15px;
  color: var(--fg);
  cursor: pointer;
}

/* ---------- банер головної ---------- */

.main-banner {
  background: var(--surface-warm);
  overflow: hidden;
}

.banner-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-12);
  align-items: center;
  padding: 72px 0;
}

.banner-text h1 { font-size: clamp(34px, 4vw, var(--text-2xl)); max-width: 14ch; }

.banner-text .lead {
  font-size: var(--text-lg);
  color: var(--fg-2);
  max-width: 44ch;
}

.banner-photo img {
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-raised);
  width: 100%;
  height: auto;
}

.banner-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-6);
}

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 13px 26px;
  min-height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard);
}

.btn-main {
  background: var(--accent);
  color: var(--accent-on);
  box-shadow: 0 6px 18px rgba(155, 91, 50, 0.28);
}

.btn-main:hover { background: var(--accent-hover); }
.btn-main:active { background: var(--accent-active); }

.btn-quiet {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}

.btn-quiet:hover { border-color: var(--fg-2); }

.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ---------- секції ---------- */

.block { padding: var(--section-y-desktop) 0 0; }
.block:last-of-type { padding-bottom: var(--section-y-desktop); }

.block-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.block-head p { max-width: 52ch; color: var(--fg-2); margin: 0; }

/* ---------- картки кімнат ---------- */

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.room-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--elev-ring);
}

.room-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform var(--motion-base) var(--ease-standard);
}

.room-card:hover img { transform: scale(1.03); }

.room-card figcaption {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-4);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--fg);
  box-shadow: 0 8px 22px rgba(32, 25, 20, 0.18);
}

/* ---------- товари ---------- */

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.catalog-grid { grid-template-columns: repeat(3, 1fr); }

.product-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--motion-base) var(--ease-standard);
}

.product-card:hover { box-shadow: var(--elev-raised); }

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.product-body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.product-kind {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.product-name {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.25;
  margin: 0;
}

.product-desc {
  font-size: var(--text-sm);
  color: var(--muted);
  margin: 0;
  flex: 1;
}

.product-buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.price {
  font-size: var(--text-lg);
  font-weight: 600;
  white-space: nowrap;
}

.price small { font-size: var(--text-sm); font-weight: 400; color: var(--muted); }

.add-btn {
  border: 1px solid var(--accent);
  background: var(--surface);
  color: var(--accent);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  padding: 10px 16px;
  min-height: 44px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}

.add-btn:hover { background: var(--accent); color: var(--accent-on); }
.add-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.add-btn.added { background: var(--success); border-color: var(--success); color: #fff; }

/* ---------- фільтр каталогу ---------- */

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.filter-row button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg-2);
  font-size: var(--text-sm);
  padding: 9px 16px;
  min-height: 40px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color var(--motion-fast) var(--ease-standard);
}

.filter-row button:hover { border-color: var(--fg-2); }

.filter-row button.on {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--surface);
}

/* ---------- комплект «Дім» ---------- */

.bundle-band {
  background: var(--surface-warm);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

.bundle-band img { width: 100%; height: 100%; object-fit: cover; }

.bundle-info { padding: var(--space-12); align-self: center; }

.bundle-list { margin: 0 0 var(--space-6); padding-left: 20px; color: var(--fg-2); }
.bundle-list li { margin-bottom: var(--space-2); }

.old-price { text-decoration: line-through; color: var(--muted); font-weight: 400; margin-right: var(--space-2); }

/* ---------- переваги ---------- */

.perks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.perk {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}

.perk h3 { font-size: 18px; margin-bottom: var(--space-2); }
.perk p { color: var(--muted); font-size: var(--text-sm); margin: 0; }

/* ---------- кошик ---------- */

.cart-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-12);
  align-items: start;
}

.cart-items { display: flex; flex-direction: column; gap: var(--space-4); }

.cart-row {
  display: grid;
  grid-template-columns: 88px 1fr auto auto auto;
  gap: var(--space-4);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.cart-row img {
  width: 88px;
  height: 66px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.cart-row .item-name { font-size: 15px; }

.qty-box {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.qty-box button {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 17px;
  color: var(--fg);
  cursor: pointer;
}

.qty-box span { min-width: 28px; text-align: center; font-size: 15px; }

.remove-btn {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: var(--space-2);
}

.remove-btn:hover { color: var(--danger); }

.cart-empty {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-12);
  text-align: center;
  color: var(--muted);
}

.order-box {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  position: sticky;
  top: 96px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 15px;
}

.total-row.final {
  border: none;
  font-size: var(--text-lg);
  font-weight: 600;
  padding-top: var(--space-4);
}

/* ---------- форми ---------- */

.field { margin-bottom: var(--space-5); }

.field label {
  display: block;
  font-size: var(--text-sm);
  color: var(--fg-2);
  margin-bottom: var(--space-2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.pay-options { display: grid; gap: var(--space-2); margin-bottom: var(--space-5); }

.pay-options label {
  display: flex;
  gap: var(--space-3);
  align-items: start;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  cursor: pointer;
  font-size: 15px;
}

.pay-options input { margin-top: 3px; accent-color: var(--accent); }

.pay-options label:has(input:checked) { border-color: var(--accent); background: var(--bg); }

.form-error {
  display: none;
  color: var(--danger);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

/* ---------- сторінки тексту ---------- */

.page-head { padding: 64px 0 0; }
.page-head p { color: var(--fg-2); max-width: 60ch; }

.text-page { max-width: 760px; }
.text-page h2 { margin-top: var(--space-12); }
.text-page ul { color: var(--fg-2); padding-left: 22px; }
.text-page li { margin-bottom: var(--space-2); }

.info-table { width: 100%; border-collapse: collapse; margin: var(--space-6) 0; }

.info-table th,
.info-table td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-soft);
  font-size: 15px;
}

.info-table th {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- FAQ ---------- */

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
}

.faq-item summary {
  cursor: pointer;
  padding: var(--space-5) var(--space-6);
  font-family: var(--font-display);
  font-size: 18px;
  list-style: none;
  position: relative;
  padding-right: 52px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: var(--space-6);
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--meta);
}

.faq-item[open] summary::after { content: "–"; }

.faq-item .faq-body { padding: 0 var(--space-6) var(--space-5); color: var(--fg-2); }

/* ---------- контакти ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}

.contact-card a { color: var(--fg); text-decoration: none; font-size: var(--text-lg); }
.contact-card a:hover { color: var(--accent); }

/* ---------- підвал ---------- */

.site-footer {
  margin-top: var(--space-12);
  background: var(--fg);
  color: #d9cfc4;
  padding: var(--space-12) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-8);
}

.site-footer h3 {
  color: var(--surface);
  font-size: 16px;
  margin-bottom: var(--space-4);
}

.site-footer a { color: #d9cfc4; text-decoration: none; }
.site-footer a:hover { color: var(--surface); }

.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: var(--space-2); font-size: 15px; }

.footer-bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: #a89a8d;
}

/* ---------- cookie ---------- */

.cookie-note {
  position: fixed;
  left: var(--space-4);
  right: var(--space-4);
  bottom: var(--space-4);
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--elev-raised);
  display: none;
  gap: var(--space-4);
  align-items: center;
  z-index: 60;
}

.cookie-note.show { display: flex; }
.cookie-note p { margin: 0; font-size: var(--text-sm); color: var(--fg-2); }

/* ---------- подяка ---------- */

.thanks-box {
  max-width: 640px;
  margin: 96px auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-12);
}

/* ---------- адаптив ---------- */

@media (max-width: 1024px) {
  .wrap { padding: 0 var(--container-gutter-tablet); }
  .block { padding-top: var(--section-y-tablet); }
  .block:last-of-type { padding-bottom: var(--section-y-tablet); }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .perks-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .banner-grid { grid-template-columns: 1fr; padding: 48px 0; gap: var(--space-8); }
  .rooms-grid { grid-template-columns: 1fr; }
  .bundle-band { grid-template-columns: 1fr; }
  .bundle-info { padding: var(--space-8); }
  .cart-layout { grid-template-columns: 1fr; }
  .order-box { position: static; }
  .contact-grid { grid-template-columns: 1fr; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-4) var(--container-gutter-phone);
  }

  .main-nav.open { display: flex; }
  .main-nav a { padding: var(--space-3) 0; font-size: 16px; border-bottom: 1px solid var(--border-soft); }
  .menu-btn { display: inline-flex; }
  .header-row { position: relative; }
  .cart-link { margin-left: auto; }
  .menu-btn { margin-left: 0; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 var(--container-gutter-phone); }
  .block { padding-top: var(--section-y-phone); }
  .block:last-of-type { padding-bottom: var(--section-y-phone); }
  .products-grid, .catalog-grid { grid-template-columns: 1fr; }
  .perks-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .block-head { flex-direction: column; align-items: start; }
  .cart-row { grid-template-columns: 72px 1fr auto; grid-template-rows: auto auto; }
  .cart-row img { grid-row: span 2; width: 72px; height: 54px; }
  .cart-row .qty-box { grid-column: 2; }
  .brand-name { font-size: 22px; }
  h1 { font-size: 32px; }
}
