/* ============================================================
   Freya · components — header, footer, divider, section head,
   product card, placeholder, buttons, breadcrumb
   ============================================================ */

/* ── SVG sprite helpers ─────────────────────────────────── */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.mark {
  display: block;
  flex: none;
  width: var(--size, 96px);
  height: var(--size, 96px);
  color: var(--cherry);
}
.mark--brass { color: var(--brass); }

.ornament { display: block; width: 100%; height: 14px; }

/* декоративний великий знак на тлі секції */
.bg-mark {
  position: absolute;
  pointer-events: none;
  opacity: .08;
}

/* ── Topbar + header ────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px var(--gutter);
  border-bottom: 1px solid rgba(var(--ivory-rgb), .06);
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .28em; text-transform: uppercase; color: var(--muted);
}

.site-header {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 30px var(--gutter);
}
.site-nav {
  display: flex; gap: 40px;
  font-family: var(--font-display); font-size: 12px;
  letter-spacing: .3em; text-transform: uppercase;
}
.site-nav a {
  color: var(--muted);
  border-bottom: 1px solid transparent; padding-bottom: 4px;
  transition: color .15s, border-color .15s;
}
.site-nav a.is-active, .site-nav a:hover { color: var(--ivory); border-bottom-color: var(--cherry); }

.brand { display: flex; align-items: center; justify-content: center; gap: 18px; }
.wordmark {
  font-family: var(--font-display); font-weight: 500;
  font-size: 32px; letter-spacing: .5em; line-height: 1; color: var(--ivory);
}

.site-actions {
  display: flex; justify-content: flex-end; gap: 28px;
  font-family: var(--font-display); font-size: 12px;
  letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
}
.site-actions .cart { color: var(--ivory); display: flex; align-items: center; gap: 8px; }
.cart-count { background: var(--cherry); color: var(--ivory); padding: 2px 8px; font-size: 10px; }

/* ── Divider (орнаментна стрічка) ───────────────────────── */
.divider { padding: 0 var(--gutter); }
.divider .ornament { opacity: var(--opacity, .7); }
.divider--medallion { display: flex; align-items: center; justify-content: center; gap: 24px; }
.divider--medallion .ornament { flex: 1; width: auto; }

/* ── Section head ───────────────────────────────────────── */
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; margin-bottom: 44px;
}
.section-head--center { flex-direction: column; align-items: center; text-align: center; }
.section-head .kicker { margin-bottom: 14px; }
.section-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 56px; letter-spacing: .18em; line-height: 1;
  text-transform: uppercase; color: var(--ivory);
}
.section-sub {
  font-family: var(--font-serif); font-style: italic;
  font-size: 22px; color: var(--muted); margin-top: 14px;
}

/* ── Links & buttons ────────────────────────────────────── */
.link-underline {
  display: inline-block;
  font-family: var(--font-display); font-size: 11px;
  letter-spacing: .3em; text-transform: uppercase; color: var(--ivory);
  border-bottom: 1px solid var(--cherry); padding-bottom: 4px;
  white-space: nowrap;
}
.link-cherry {
  font-family: var(--font-display); font-size: 10px;
  letter-spacing: .32em; text-transform: uppercase; color: var(--cherry);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 18px 36px;
  background: var(--cherry); color: var(--ivory); border: 1px solid var(--cherry);
  font-family: var(--font-display); font-size: 12px;
  letter-spacing: .32em; text-transform: uppercase;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--burgundy); border-color: var(--burgundy); }
.btn--ghost { background: transparent; border-color: rgba(var(--brass-rgb), .4); }
.btn--ghost:hover { background: transparent; border-color: var(--brass); }
.btn--outline { background: transparent; border-color: rgba(var(--ivory-rgb), .13); color: var(--muted); }
.btn--outline:hover { background: transparent; border-color: rgba(var(--ivory-rgb), .4); color: var(--ivory); }
.btn--block { width: 100%; }

.chip {
  padding: 10px 20px;
  background: transparent; border: 1px solid rgba(var(--ivory-rgb), .13); color: var(--muted);
  font-family: var(--font-display); font-size: 11px;
  letter-spacing: .28em; text-transform: uppercase; white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.chip:hover { color: var(--ivory); border-color: rgba(var(--ivory-rgb), .4); }
.chip.is-active { background: var(--cherry); border-color: var(--cherry); color: var(--ivory); }

/* ── Placeholder (заглушка зображення) ──────────────────── */
.ph {
  position: relative; width: 100%;
  aspect-ratio: var(--ratio, 4 / 5);
  --ph-a: var(--ph-warm-a); --ph-b: var(--ph-warm-b);
  --ph-accent: var(--cherry-rgb);
  background: repeating-linear-gradient(135deg, var(--ph-a) 0 14px, var(--ph-b) 14px 28px);
  border-top: 1px solid rgba(var(--ph-accent), .2);
  border-bottom: 1px solid rgba(var(--ph-accent), .2);
  overflow: hidden;
}
.ph--cool   { --ph-a: var(--ph-cool-a);   --ph-b: var(--ph-cool-b); }
.ph--deep   { --ph-a: var(--ph-deep-a);   --ph-b: var(--ph-deep-b); }
.ph--cherry { --ph-a: var(--ph-cherry-a); --ph-b: var(--ph-cherry-b); }
.ph--brass  { --ph-accent: var(--brass-rgb); }
.ph-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 0 12px; text-align: center;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .18em; text-transform: uppercase; color: #7a6f63;
}
.ph-caption {
  position: absolute; left: 10px; bottom: 8px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em; color: var(--faint);
}
/* коли з'являться справжні фото */
.ph > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ── Product card ───────────────────────────────────────── */
.product { position: relative; }
.product-media { position: relative; display: block; }
.product-tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--bg); color: var(--ivory); border: 1px solid var(--cherry);
  font-family: var(--font-display); font-size: 9px; letter-spacing: .28em;
  text-transform: uppercase; padding: 5px 10px;
}
.product-fav {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--bg-rgb), .8); border: 1px solid rgba(var(--ivory-rgb), .13);
  color: var(--muted); font-size: 14px; padding: 0;
}
.product-fav.is-active { color: var(--cherry); }
.product-body { margin-top: 14px; }
.product-name {
  display: block;
  font-family: var(--font-serif); font-size: 20px; line-height: 1.2;
  letter-spacing: .005em; color: var(--ivory);
}
.product--lg .product-name { font-size: 26px; }
.product-cat {
  font-family: var(--font-display); font-size: 9px; letter-spacing: .3em;
  color: var(--brass); text-transform: uppercase; margin-top: 4px;
}
.product-meta { margin-top: 8px; display: flex; justify-content: space-between; align-items: baseline; }
.product-price { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: var(--ivory); }
.swatches { display: flex; gap: 4px; }
.swatches i { display: block; width: 9px; height: 9px; border: 1px solid rgba(var(--ivory-rgb), .13); }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-grid--3 { grid-template-columns: repeat(3, 1fr); row-gap: 48px; }

/* ── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb {
  padding: 20px var(--gutter);
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .28em; text-transform: uppercase; color: var(--muted);
}
.breadcrumb .sep { color: var(--faint); }
.breadcrumb [aria-current] { color: var(--ivory); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  padding: 60px var(--gutter) 36px;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 40px;
  color: var(--muted); font-size: 13px; line-height: 2;
}
.footer-about { max-width: 320px; margin-top: 16px; font-family: var(--font-serif); font-style: italic; font-size: 16px; line-height: 1.5; }
.footer-social {
  margin-top: 24px; display: flex; gap: 14px;
  font-family: var(--font-display); font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
}
.footer-social a.is-active { color: var(--ivory); border-bottom: 1px solid var(--cherry); padding-bottom: 3px; }
.footer-col h4 {
  color: var(--ivory); font-family: var(--font-display); font-weight: 400; font-size: 10px;
  letter-spacing: .32em; text-transform: uppercase; margin: 0 0 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col a:hover { color: var(--ivory); }

.legal {
  padding: 20px var(--gutter);
  border-top: 1px solid rgba(var(--ivory-rgb), .06);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .28em; text-transform: uppercase; color: var(--faint);
}
.legal--compact { padding: 40px var(--gutter) 24px; border-top: 0; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .site-footer { grid-template-columns: 1fr 1fr 1fr; }
  .section-title { font-size: 44px; }
}
@media (max-width: 860px) {
  .topbar { display: none; }
  .site-header { grid-template-columns: 1fr auto; padding: 20px var(--gutter); }
  .site-nav { order: 3; grid-column: 1 / -1; margin-top: 16px; gap: 24px; }
  .brand { justify-content: flex-start; }
  .site-actions span:not(.cart) { display: none; }
  .product-grid, .product-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head--center { align-items: center; }
  .section-title { font-size: 34px; letter-spacing: .12em; }
  .site-footer { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .product-grid, .product-grid--3 { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; }
}
