/* =========================================================
   ჭურჭლის სახლი — premium storefront stylesheet (design only)
   Palette: Ivory #F6F2EA · Linen #EEE7DA · Champagne #D9C7A3 · Bronze #9C7A45 · Charcoal #1F1D1A
   Fonts (Noto Sans/Serif Georgian) are loaded from index.html and admin.html.
   ========================================================= */

:root {
  --ivory: #f6f2ea;
  --linen: #eee7da;
  --card: #fbf8f2;
  --white: #ffffff;
  --champagne: #d9c7a3;
  --bronze: #9c7a45;
  --bronze-dark: #7d6034;
  --charcoal: #1f1d1a;
  --text: #34302a;
  --muted: #6f675a;
  --line: #e2d9c7;
  --line-strong: #cfc4af;

  --radius: 2px;
  --shadow-md: 0 18px 40px rgba(31, 29, 26, 0.10);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --sans: "Noto Sans Georgian", "FiraGO", "Inter", "Segoe UI", system-ui, sans-serif;
  --serif: "Noto Serif Georgian", "Playfair Display", Georgia, serif;

  /* legacy names kept so nothing else breaks */
  --bg: var(--ivory);
  --panel: var(--card);
  --panel-light: var(--linen);
  --surface-1: var(--card);
  --surface-2: var(--white);
  --surface-3: var(--charcoal);
  --violet: var(--bronze);
  --pink: var(--bronze);
  --orange: var(--bronze);
  --teal: var(--bronze);
  --yellow: var(--charcoal);
  --gold: var(--bronze);
  --gold-light: var(--champagne);
  --border: var(--line);
  --gradient: var(--charcoal);
  --gradient-soft: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }

button, input, select, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
svg { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--charcoal);
  color: var(--ivory);
  font-size: 14px;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 82px;
  padding: 12px 7%;
  background: rgba(246, 242, 234, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(150%) blur(14px);
}

.brand { display: inline-flex; align-items: center; gap: 13px; flex-shrink: 0; }
.brand-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent url("./favicon.svg") center / contain no-repeat;
  color: transparent;
  font-size: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { color: var(--charcoal); font-family: var(--serif); font-size: 18px; font-weight: 600; }
.brand-text small { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }

.nav { display: flex; align-items: center; justify-content: center; gap: 34px; }
.nav a { position: relative; padding: 6px 0; color: var(--text); font-size: 14px; font-weight: 500; transition: color 0.25s; }
.nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--bronze);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav a:hover { color: var(--charcoal); }
.nav a:hover::after { transform: scaleX(1); }

.admin-entry-button {
  padding: 6px 0 !important;
  color: var(--muted) !important;
  font-size: 12.5px !important;
  font-weight: 400 !important;
}
.admin-entry-button:hover { color: white; }

.cart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid var(--charcoal);
  border-radius: var(--radius);
  background: transparent;
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
  transition: background 0.25s, color 0.25s;
}
.cart-button:hover { background: var(--charcoal); color: var(--ivory); }
.cart-icon { display: inline-flex; width: 20px; height: 20px; color: inherit; }
.cart-icon svg { width: 100%; height: 100%; }

.menu-toggle { display: none; padding: 8px; border: 0; background: transparent; color: var(--charcoal); font-size: 25px; line-height: 1; }

/* ---------- Shared type + buttons ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 14px; color: var(--bronze-dark); font-size: 13.5px; font-weight: 500; }
.gold-line { width: 40px; height: 1px; display: inline-block; flex-shrink: 0; background: var(--bronze); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; }
h1 em, h2 em { background: none; color: inherit; -webkit-text-fill-color: currentColor; font-style: normal; font-weight: inherit; }

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 30px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 500;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}
.button-gold { background: var(--charcoal); color: var(--ivory); }
.button-gold:hover { background: var(--bronze-dark); }
.button-outline { border-color: var(--charcoal); background: transparent; color: var(--charcoal); }
.button-outline:hover { background: var(--charcoal); color: var(--ivory); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 4px;
  border: 0;
  border-bottom: 1px solid var(--bronze);
  background: transparent;
  color: var(--charcoal);
  font-size: 14.5px;
  font-weight: 500;
}
.text-link span { font-size: 18px; transition: transform 0.3s var(--ease); }
.text-link:hover span { transform: translateX(5px); }

/* ---------- Hero (editorial split) ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: stretch;
  min-height: min(760px, calc(100vh - 82px));
  background: var(--ivory);
}
.hero-content { align-self: center; max-width: 720px; padding: 90px 5% 90px 0; margin-left: max(8vw, calc((100vw - 1300px) / 2)); }
.hero h1 {
  margin: 24px 0;
  color: var(--charcoal);
  font-size: clamp(36px, 4.6vw, 62px);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.hero-content > p { max-width: 500px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-note { display: flex; align-items: center; gap: 14px; margin-top: 48px; color: var(--muted); font-size: 13.5px; }

.hero-media { position: relative; margin: 0; padding: 56px 8% 56px 0; display: flex; }
.hero-media img { position: relative; z-index: 1; width: 100%; height: 100%; min-height: 520px; object-fit: cover; border-radius: var(--radius); }
.hero-media::after {
  content: "";
  position: absolute;
  top: 76px;
  right: calc(8% - 20px);
  bottom: 36px;
  left: 20px;
  border: 1px solid var(--bronze);
}
.hero-caption {
  position: absolute;
  z-index: 2;
  bottom: 56px;
  left: 0;
  padding: 11px 20px;
  background: var(--ivory);
  color: var(--charcoal);
  font-size: 13px;
  letter-spacing: 0.04em;
}

@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.hero-content > * { animation: riseIn 0.9s var(--ease) both; }
.hero-content > *:nth-child(2) { animation-delay: 0.08s; }
.hero-content > *:nth-child(3) { animation-delay: 0.16s; }
.hero-content > *:nth-child(4) { animation-delay: 0.24s; }
.hero-content > *:nth-child(5) { animation-delay: 0.32s; }
.hero-media img { animation: fadeIn 1.2s var(--ease) both; }

/* ---------- Benefits ---------- */
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); padding: 30px 8%; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); }
.benefit { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 8px 16px; border-right: 1px solid var(--line); }
.benefit:last-child { border-right: 0; }
.benefit-icon { display: inline-flex; width: 28px; height: 28px; color: var(--bronze); }
.benefit-icon svg { width: 100%; height: 100%; }
.benefit div { display: flex; flex-direction: column; }
.benefit strong { color: var(--charcoal); font-size: 15px; font-weight: 600; }
.benefit small { margin-top: 2px; color: var(--muted); font-size: 13px; }

/* ---------- Categories ---------- */
.categories { padding: 80px 8% 0; background: var(--ivory); }
.categories-title { margin: 0 0 24px; color: var(--charcoal); font-size: 22px; }
.category-list { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.category-list li { border-right: 1px solid var(--line); }
.category-list li:last-child { border-right: 0; }
.category-list a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  height: 100%;
  padding: 28px 22px;
  color: var(--charcoal);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  transition: background 0.3s;
}
.category-list svg { width: 34px; height: 34px; color: var(--bronze); transition: transform 0.4s var(--ease); }
.category-list a:hover { background: var(--linen); }
.category-list a:hover svg { transform: translateY(-3px); }

/* ---------- Sections ---------- */
.section { padding: 100px 8%; }
.collection { background: var(--ivory); }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 40px; padding-bottom: 26px; border-bottom: 1px solid var(--line-strong); }
.section-heading h2 { margin: 14px 0; color: var(--charcoal); font-size: clamp(30px, 3.6vw, 46px); line-height: 1.25; letter-spacing: -0.01em; }
.section-heading p { margin: 0; max-width: 520px; color: var(--muted); font-size: 15.5px; line-height: 1.9; }
.collection-count { padding-bottom: 8px; color: var(--muted); font-size: 13.5px; white-space: nowrap; }

/* ---------- Catalog tools ---------- */
.catalog-tools { display: grid; grid-template-columns: minmax(180px, 1fr) 230px 220px; gap: 12px; margin-bottom: 36px; }
.search-box,
.catalog-tools select {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.search-box:focus-within,
.catalog-tools select:focus { border-color: var(--charcoal); box-shadow: 0 0 0 3px rgba(156, 122, 69, 0.2); outline: none; }
.search-box > span { display: inline-flex; width: 20px; height: 20px; color: var(--bronze); }
.search-box > span svg { width: 100%; height: 100%; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14.5px; }
.search-box input::placeholder { color: #a39b8b; }
.catalog-tools select { width: 100%; min-width: 0; font-size: 14px; }
.catalog-tools select option { background: var(--white); color: var(--text); }

/* ---------- Products (cards are rendered by script.js) ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }

.product-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color 0.3s, box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.product-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-3px); }

.product-image { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--linen); }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.product-card:hover .product-image img { transform: scale(1.045); }

.product-tag { position: absolute; top: 14px; left: 14px; padding: 5px 12px; border-radius: var(--radius); background: rgba(246, 242, 234, 0.94); color: var(--charcoal); font-size: 12px; font-weight: 500; }

.product-info { padding: 22px; }
.product-category { color: var(--bronze-dark); font-size: 12.5px; font-weight: 500; }
.product-info h3 { margin: 6px 0; color: var(--charcoal); font-size: 18px; line-height: 1.45; }
.product-description { min-height: 46px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.product-price { color: var(--charcoal); font-size: 20px; font-weight: 600; }
.product-size { color: var(--muted); font-size: 13px; }

.add-button {
  width: 100%;
  min-height: 46px;
  margin-top: 16px;
  border: 1px solid var(--charcoal);
  border-radius: var(--radius);
  background: transparent;
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.25s, color 0.25s;
}
.add-button:hover { background: var(--charcoal); color: var(--ivory); }

.empty-state { padding: 80px 15px; text-align: center; }
.empty-state > span { display: inline-flex; width: 40px; height: 40px; color: var(--bronze); }
.empty-state > span svg { width: 100%; height: 100%; }
.empty-state h3 { margin: 12px 0 6px; color: var(--charcoal); font-size: 24px; }
.empty-state p { color: var(--muted); font-size: 14.5px; }

/* ---------- About ---------- */
.editorial { display: grid; grid-template-columns: 0.9fr 1fr; align-items: start; gap: 8%; padding: 110px 10%; background: var(--linen); }
.editorial h2 { margin: 18px 0 0; color: var(--charcoal); font-size: clamp(30px, 3.6vw, 46px); line-height: 1.3; letter-spacing: -0.01em; }
.editorial-content { padding-top: 34px; }
.editorial-content p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.95; }
.editorial-content p + p { margin-top: 18px; }
.editorial-content .editorial-quote {
  margin-top: 32px;
  padding-left: 22px;
  border-left: 2px solid var(--bronze);
  color: var(--charcoal);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.6;
}
.editorial-content .text-link { margin-top: 34px; }

/* ---------- Contact ---------- */
.visit-section { position: relative; min-height: 480px; overflow: hidden; padding: 90px 10%; background: var(--charcoal); color: var(--ivory); }
.visit-content { max-width: 500px; }
.visit-content .eyebrow { color: var(--champagne); }
.visit-content .gold-line { background: var(--champagne); }
.visit-content h2 { margin: 18px 0; color: var(--ivory); font-size: clamp(30px, 3.6vw, 46px); line-height: 1.3; letter-spacing: -0.01em; }
.visit-content > p { margin: 0; max-width: 400px; color: #b9af9c; font-size: 15.5px; line-height: 1.9; }
.visit-details { display: grid; gap: 22px; margin: 34px 0; }
.visit-details > div { display: flex; align-items: flex-start; gap: 16px; }
.visit-details > div > span { display: inline-flex; width: 24px; height: 24px; margin-top: 2px; color: var(--champagne); }
.visit-details > div > span svg { width: 100%; height: 100%; }
.visit-details div div { display: flex; flex-direction: column; }
.visit-details strong { color: var(--ivory); font-size: 15px; font-weight: 500; }
.visit-details small { color: #a79d8a; font-size: 13.5px; }
.visit-details small a { transition: color 0.2s; }
.visit-details small a:hover { color: var(--champagne); }

.visit-section .button-outline { border-color: rgba(246, 242, 234, 0.5); color: var(--ivory); }
.visit-section .button-outline:hover { background: var(--ivory); border-color: var(--ivory); color: var(--charcoal); }
.visit-section .button-facebook:hover { border-color: #1877f2; background: #1877f2; color: #fff; }

.visit-decoration { position: absolute; top: 50%; right: 7%; transform: translateY(-50%); width: min(380px, 34vw); aspect-ratio: 1; display: grid; place-items: center; pointer-events: none; }
.ornament { position: absolute; inset: 17%; border: 1px solid rgba(217, 199, 163, 0.22); transform: rotate(45deg); }
.ornament-two { inset: 31%; border-color: rgba(217, 199, 163, 0.45); transform: none; }
.ornament-center { position: relative; width: 108px; height: 108px; display: grid; place-items: center; border: 1px solid var(--champagne); }
.ornament-center img { width: 56%; height: auto; }

/* ---------- Footer ---------- */
.footer { padding: 64px 8% 24px; background: #161512; color: #a79d8a; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; padding-bottom: 44px; }
.footer .brand-text strong { color: var(--ivory); }
.footer .brand-text small { color: #8d8472; }
.footer-brand p { max-width: 300px; margin: 20px 0 0; font-size: 14px; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 14px; }
.footer-col h3 { margin: 0 0 8px; color: var(--ivory); font-size: 16px; }
.footer-col a { transition: color 0.2s; }
.footer-col a:hover { color: var(--champagne); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 20px; border-top: 1px solid rgba(246, 242, 234, 0.12); color: #8d8472; font-size: 13px; }
.footer-social { display: inline-flex; gap: 22px; }
.footer-social a { transition: color 0.2s; }
.footer-social a:hover { color: var(--champagne); }

/* ---------- Cart drawer ---------- */
.drawer-backdrop,
.modal-backdrop { position: fixed; z-index: 39; inset: 0; background: rgba(22, 21, 18, 0.55); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
.drawer-backdrop.active,
.modal-backdrop.active { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed;
  z-index: 40;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, 100%);
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--ivory);
  color: var(--text);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 60px rgba(31, 29, 26, 0.16);
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
}
.cart-drawer.active { transform: translateX(0); }

.drawer-header,
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 20px; border-bottom: 1px solid var(--line-strong); }
.drawer-header h2,
.modal-header h2 { margin: 5px 0 0; color: var(--charcoal); font-size: 24px; }
.drawer-header h2 span { color: var(--muted); font-family: var(--sans); font-size: 14px; font-weight: 400; }

.icon-button {
  width: 40px;
  height: 40px;
  padding: 0 0 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--charcoal);
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.3s var(--ease);
}
.icon-button:hover { border-color: var(--charcoal); background: var(--charcoal); color: var(--ivory); transform: rotate(90deg); }

.cart-items { flex: 1; overflow-y: auto; padding: 15px 0; }
.cart-empty { padding: 56px 5px; color: var(--muted); font-size: 14.5px; text-align: center; }

.cart-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 76px; height: 92px; border-radius: var(--radius); object-fit: cover; }
.cart-item h3 { margin: 0 0 4px; color: var(--charcoal); font-family: var(--sans); font-size: 14.5px; font-weight: 500; }
.cart-item p { margin: 0; color: var(--text); font-size: 14px; font-weight: 600; }

.quantity-controls { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.quantity-controls button { width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: transparent; color: var(--charcoal); transition: border-color 0.25s, background 0.25s; }
.quantity-controls button:hover { border-color: var(--charcoal); background: var(--linen); }
.quantity-controls span { min-width: 16px; text-align: center; font-size: 14px; font-weight: 500; }

.remove-item { border: 0; background: transparent; color: #a4473b; font-size: 18px; }
.remove-item:hover { color: #7f3128; }

.cart-footer { padding-top: 18px; border-top: 1px solid var(--line-strong); }
.cart-total,
.checkout-summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.cart-total span,
.checkout-summary span { color: var(--muted); font-size: 14px; }
.cart-total strong,
.checkout-summary strong { color: var(--charcoal); font-family: var(--serif); font-size: 24px; font-weight: 600; }
.cart-hint,
.form-note { color: var(--muted); font-size: 13px; line-height: 1.7; }

.full-width { width: 100%; }
.centered { display: flex; justify-content: center; width: 100%; margin-top: 16px; }

/* ---------- Checkout modal ---------- */
.modal-backdrop { z-index: 50; display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.checkout-modal {
  width: min(500px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ivory);
  color: var(--text);
  box-shadow: 0 30px 70px rgba(22, 21, 18, 0.3);
  transform: translateY(14px);
  transition: transform 0.35s var(--ease);
}
.modal-backdrop.active .checkout-modal { transform: translateY(0); }

#checkoutForm { display: grid; gap: 18px; padding-top: 22px; }
#checkoutForm label { display: grid; gap: 7px; color: var(--charcoal); font-size: 13.5px; font-weight: 500; }
#checkoutForm input,
#checkoutForm textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  outline: none;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
#checkoutForm input:focus,
#checkoutForm textarea:focus { border-color: var(--charcoal); box-shadow: 0 0 0 3px rgba(156, 122, 69, 0.22); }
#checkoutForm textarea { resize: vertical; }

.checkout-summary { padding: 16px 0; border-top: 1px solid var(--line-strong); }
.checkout-summary strong { font-size: 22px; }
.form-message { color: var(--bronze-dark); font-size: 13.5px; line-height: 1.7; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  z-index: 70;
  right: 24px;
  bottom: 24px;
  max-width: calc(100% - 48px);
  padding: 14px 20px;
  border-left: 3px solid var(--champagne);
  border-radius: var(--radius);
  background: var(--charcoal);
  color: var(--ivory);
  font-size: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s var(--ease);
  box-shadow: var(--shadow-md);
}
.toast.active { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- Scrollbar ---------- */
* { scrollbar-width: thin; scrollbar-color: #b8ad97 var(--ivory); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--ivory); }
*::-webkit-scrollbar-thumb { border: 2px solid var(--ivory); border-radius: 999px; background: #b8ad97; }
*::-webkit-scrollbar-thumb:hover { background: var(--bronze); }

/* ---------- Large screens ---------- */
@media (min-width: 1500px) {
  .header { padding-right: max(7%, calc((100% - 1400px) / 2)); padding-left: max(7%, calc((100% - 1400px) / 2)); }
  .section,
  .categories,
  .footer { padding-right: max(8%, calc((100% - 1300px) / 2)); padding-left: max(8%, calc((100% - 1300px) / 2)); }
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .header { gap: 14px; padding-right: 4%; padding-left: 4%; }
  .nav { gap: 20px; }
  .nav a { font-size: 13px; }
  .brand-text strong { font-size: 15px; }
  .catalog-tools { grid-template-columns: minmax(150px, 1fr) 200px 190px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-list { grid-template-columns: repeat(3, 1fr); }
  .category-list li:nth-child(3) { border-right: 0; }
  .category-list li:nth-child(n+4) { border-top: 1px solid var(--line); }
  .editorial { gap: 6%; padding-right: 7%; padding-left: 7%; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-content { max-width: none; margin-left: 0; padding: 64px 7% 40px; }
  .hero-media { padding: 0 7% 44px; }
  .hero-media img { min-height: 360px; height: 420px; }
  .hero-media::after { top: 16px; right: calc(7% - 14px); bottom: 30px; left: calc(7% + 14px); }
  .hero-caption { bottom: 44px; left: 7%; }
  .editorial { grid-template-columns: 1fr; gap: 10px; }
  .editorial-content { padding-top: 10px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }

  .visit-section { display: grid; grid-template-columns: 1fr; min-height: 0; }
  .visit-decoration { position: relative; top: auto; right: auto; transform: none; width: 240px; justify-self: center; margin-top: 30px; }
  .ornament-center { width: 84px; height: 84px; }
}

@media (max-width: 800px) {
  .header { flex-wrap: wrap; }
  .menu-toggle { display: block; order: 3; }
  .cart-button { margin-left: auto; }
  .nav { position: absolute; top: 100%; right: 0; left: 0; display: none; align-items: stretch; gap: 0; padding: 8px 5% 16px; border-bottom: 1px solid var(--line); background: var(--ivory); box-shadow: var(--shadow-md); }
  .nav.active { display: flex; flex-direction: column; }
  .nav a { padding: 15px 5px; border-bottom: 1px solid var(--line); font-size: 15px; }
  .nav a::after { display: none; }
  .nav a:last-child { border-bottom: 0; }
  .catalog-tools { grid-template-columns: 1fr 1fr; }
  .search-box { grid-column: 1 / -1; }
}

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
  html { scroll-padding-top: 75px; }

  .header { min-height: 68px; padding: 10px 4%; gap: 9px; flex-wrap: nowrap; align-items: center; }
  .brand { gap: 9px; }
  .brand-icon { width: 36px; height: 36px; }
  .brand-text strong { font-size: 14px; }
  .brand-text small { font-size: 11px; }
  .menu-toggle { display: block; order: 3; flex-shrink: 0; font-size: 24px; }
  .cart-button { display: inline-flex; align-items: center; justify-content: center; flex-direction: row; flex-shrink: 0; gap: 7px; min-height: 42px; padding: 7px 12px; font-size: 13px; line-height: 1; white-space: nowrap; }

  .hero-content { padding: 48px 7% 32px; }
  .hero h1 { font-size: clamp(32px, 9vw, 42px); }
  .hero-content > p { font-size: 15.5px; }
  .hero-note { margin-top: 32px; }
  .hero-media img { min-height: 300px; height: 360px; }

  .benefits { grid-template-columns: 1fr; padding: 10px 7%; }
  .benefit { justify-content: flex-start; padding: 16px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .benefit:last-child { border-bottom: 0; }

  .categories { padding: 56px 5% 0; }
  .category-list { grid-template-columns: repeat(2, 1fr); }
  .category-list li,
  .category-list li:nth-child(3) { border-right: 1px solid var(--line); }
  .category-list li:nth-child(2n) { border-right: 0; }
  .category-list li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .category-list li:last-child { grid-column: 1 / -1; border-right: 0; }
  .category-list a { gap: 14px; padding: 20px 16px; font-size: 14px; }
  .category-list svg { width: 28px; height: 28px; }

  .section { padding: 64px 5%; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; margin-bottom: 26px; padding-bottom: 20px; }
  .section-heading h2,
  .editorial h2,
  .visit-content h2 { font-size: 29px; }
  .section-heading p { font-size: 14.5px; }
  .collection-count { padding: 0; }

  .catalog-tools { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 26px; }
  .search-box { grid-column: 1 / -1; }
  .search-box input { font-size: 16px; }
  .catalog-tools select { padding: 0 10px; font-size: 13px; }

  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .product-tag { top: 8px; left: 8px; padding: 4px 8px; font-size: 11px; }
  .product-info { padding: 14px 12px; }
  .product-info h3 { font-size: 15px; }
  .product-description { min-height: 40px; font-size: 12.5px; }
  .product-price { font-size: 17px; }
  .product-size { font-size: 12px; }
  .product-meta { align-items: flex-start; flex-direction: column; gap: 3px; margin-top: 10px; padding-top: 10px; }
  .add-button { min-height: 44px; margin-top: 12px; font-size: 13px; }

  .editorial { padding: 64px 7%; }
  .editorial-content p { font-size: 15px; }
  .editorial-content .editorial-quote { font-size: 18px; }

  .visit-section { padding: 64px 7%; }
  .visit-decoration { width: 200px; margin-top: 20px; }

  .footer { padding: 44px 5% 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; padding-bottom: 30px; }
  .footer-bottom { flex-direction: column; gap: 10px; font-size: 12px; }

  .cart-drawer { padding: 20px; }
  .checkout-modal { padding: 22px; }
  #checkoutForm input,
  #checkoutForm textarea { font-size: 16px; }
  .drawer-header h2,
  .modal-header h2 { font-size: 22px; }
}

@media (max-width: 380px) {
  .brand-text strong { font-size: 12.5px; }
  .cart-button { gap: 4px; padding: 6px 9px; }
  .menu-toggle { padding: 5px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .catalog-tools { grid-template-columns: 1fr; }
  .search-box { grid-column: auto; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
  }
}

@media (max-width: 800px) {
  .nav .admin-entry-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    margin-top: 14px !important;
    padding: 12px 16px !important;
    border: 1px solid #1f1d1a !important;
    border-radius: 2px !important;
    background: #1f1d1a !important;
    color: #f6f2ea !important;
    font-size: 14.5px !important;
    font-weight: 500 !important;
  }
  .nav .admin-entry-button:hover {
    background: #7d6034 !important;
    border-color: #7d6034 !important;
  }
}

/* ---------- Curtain loading screen ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.loader.is-open { pointer-events: none; }

.loader-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: #1f1d1a;
  transition: transform 1s cubic-bezier(0.77, 0, 0.18, 1);
}
.loader-panel-left  { left: 0;  border-right: 1px solid rgba(184, 152, 92, 0.55); }
.loader-panel-right { right: 0; border-left:  1px solid rgba(184, 152, 92, 0.55); }
.loader.is-open .loader-panel-left  { transform: translateX(-101%); }
.loader.is-open .loader-panel-right { transform: translateX(101%); }

.loader-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  text-align: center;
  transition: opacity 0.4s ease;
}
.loader.is-open .loader-center { opacity: 0; }

.loader-name {
  color: #f6f2ea;
  font-family: "Noto Serif Georgian", Georgia, serif;
  font-size: clamp(26px, 6vw, 40px);
  font-weight: 500;
  animation: loaderRise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.loader-sub {
  color: #d9c7a3;
  font-size: 14px;
  letter-spacing: 0.08em;
  animation: loaderRise 0.9s 0.15s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.loader-bar { position: relative; width: 120px; height: 1px; margin-top: 18px; overflow: hidden; background: rgba(246, 242, 234, 0.2); }
.loader-bar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  background: #b8985c;
  animation: loaderSlide 1.3s ease-in-out infinite;
}

@keyframes loaderRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes loaderSlide { from { left: -40%; } to { left: 100%; } }

@media (prefers-reduced-motion: reduce) {
  .loader { transition: opacity 0.3s; }
  .loader.is-open { opacity: 0; }
  .loader-panel, .loader.is-open .loader-panel-left, .loader.is-open .loader-panel-right { transform: none; transition: none; }
  .loader-name, .loader-sub, .loader-bar::after { animation: none; }
  .loader-bar::after { left: 30%; }
}
