/* TEED — shared design tokens and base styles */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600&family=Playfair+Display:ital,wght@0,400;0,500;1,400;1,500&family=Montserrat:wght@400;500;600&display=swap');

:root {
  --ivoire: #fdfcfa;
  --sable: #f6f3ee;
  --ink: #1c1917;
  --ink-soft: #6b6459;
  --gold: #c9a96e;
  --gold-deep: #a9895a;
  --blush: #eadad3;
  --noir: #0a0a0a;
  --border: rgba(28, 25, 23, 0.1);
  --border-on-dark: rgba(250, 247, 242, 0.16);

  --font-display: 'Cinzel', serif;
  --font-voice: 'Playfair Display', serif;
  --font-sans: 'Montserrat', sans-serif;

  --container-max: 1360px;
  --gutter: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; }

/* An element marked hidden stays hidden. Without this, any rule that sets
   display (flex, grid...) silently overrides the attribute — which is how the
   cash-on-delivery address fields showed up with card selected. */
[hidden] { display: none !important; }

html { scroll-behavior: auto; }

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

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

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

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

h1, h2, h3 { font-family: var(--font-voice); font-weight: 500; margin: 0; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.wordmark {
  font-family: var(--font-display);
  letter-spacing: 0.16em;
  font-weight: 600;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
}
.logo-mark svg, .logo-mark img { flex-shrink: 0; display: block; }

/* Language switcher — injected into .header-actions by i18n.js. Everything
   inherits the header's colour, so the same markup works on the light pages
   and over the dark film on the home page. */
.lang-switch { position: relative; display: inline-flex; align-items: center; }
.lang-switch::after {
  content: '';
  position: absolute;
  right: 3px;
  top: 50%;
  width: 5px; height: 5px;
  margin-top: -4px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.6;
  pointer-events: none;
}
.lang-switch select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: inherit;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 15px 0 0;
  cursor: pointer;
}
.lang-switch select:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
/* The open dropdown is drawn by the OS, not inside the header, so it needs its
   own colours — inheriting would render light text on light over the film. */
.lang-switch option { color: var(--ink); background: var(--ivoire); }

/* The header is laid out with space-between, which lets the logo butt straight
   into the actions once the row stops fitting. A gap keeps them apart at every
   width, and on a phone the two long text links step aside — both are in the
   nav drawer as well, whereas the cart and the language are not. */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header-actions { display: flex; align-items: center; gap: 18px; font-size: 12px; }
@media (max-width: 600px) {
  .site-header .header-actions { gap: 14px; }
  .site-header .header-actions > [data-i18n="nav.account"],
  .site-header .header-actions > [data-i18n="header.continueShopping"] { display: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.btn:hover { background: var(--ink); color: var(--ivoire); }
.btn.btn-gold { border-color: var(--gold); }
.btn.btn-gold:hover { background: var(--gold); color: var(--noir); }
.btn.btn-on-dark { border-color: var(--border-on-dark); color: var(--ivoire); }
.btn.btn-on-dark:hover { background: var(--ivoire); color: var(--noir); }

/* Product image hover-zoom — used across shop grid, product detail, cross-sell rows */
.zoom-frame {
  position: relative;
  overflow: hidden;
  background: var(--sable);
  border-radius: 4px;
}
.zoom-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.zoom-frame:hover img { transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) {
  .zoom-frame img { transition: none; }
  .zoom-frame:hover img { transform: none; }
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 32px);
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

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

/* Back-to-top button — injected by shop-features.js on every page */
.back-to-top {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--ivoire);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(10,10,10,0.12);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.back-to-top:hover { background: var(--ink); color: var(--ivoire); }
.back-to-top[hidden] { display: none; }

/* Product merchandising badge (Nou / Bestseller / Stoc limitat / Stoc epuizat) */
.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--ivoire);
}
.product-badge.badge-gold { background: var(--gold); color: var(--noir); }
.product-badge.badge-low { background: var(--blush); color: var(--ink); }
.product-badge.badge-out { background: var(--sable); color: var(--ink-soft); border: 1px solid var(--border); }

/* Wishlist heart toggle */
.wishlist-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--ink-soft);
  transition: color 0.2s ease, transform 0.15s ease;
}
.wishlist-btn:hover { transform: scale(1.08); }
.wishlist-btn.active { color: #a3334a; }

/* Quick view */
.quick-view-btn {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 9px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  background: rgba(28,25,23,0.88);
  color: var(--ivoire);
  border: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.product-card:hover .quick-view-btn { opacity: 1; transform: translateY(0); }
@media (max-width: 640px) {
  .quick-view-btn { opacity: 1; transform: none; position: static; margin-top: 6px; background: var(--ink); }
}

.qv-overlay {
  position: fixed; inset: 0; background: rgba(10,10,10,0.5); z-index: 400;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.qv-overlay.open { opacity: 1; pointer-events: auto; }
.qv-modal {
  background: var(--ivoire); max-width: 760px; width: 100%; max-height: 90vh; overflow-y: auto;
  display: grid; grid-template-columns: 1fr 1fr; position: relative;
}
@media (max-width: 640px) { .qv-modal { grid-template-columns: 1fr; } }
.qv-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(255,255,255,0.85); cursor: pointer; font-size: 18px; z-index: 2; }
.qv-image { aspect-ratio: 4/5; background: var(--sable); overflow: hidden; }
.qv-image img { width: 100%; height: 100%; object-fit: cover; }
.qv-body { padding: 28px; display: flex; flex-direction: column; }
.qv-collection { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 6px; }
.qv-title { font-family: var(--font-voice); font-size: 22px; margin-bottom: 10px; }
.qv-price { font-family: var(--font-voice); font-size: 18px; margin-bottom: 16px; }
.qv-stock { font-size: 12px; margin-bottom: 16px; }

/* Trust bar — used near add-to-cart and checkout */
.trust-bar { display: flex; flex-wrap: wrap; gap: 18px; padding: 16px 0; font-size: 12px; color: var(--ink-soft); }
.trust-bar span { display: flex; align-items: center; gap: 7px; }
.trust-bar span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }

/* Stock counter under price on the product page */
.stock-note { font-size: 12px; margin-bottom: 16px; }
.stock-note.low { color: #a3334a; }
.stock-note.ok { color: var(--ink-soft); }

/* Restock alert form (shown when stock is depleted) */
.restock-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.restock-form input[type="email"] { flex: 1; min-width: 180px; padding: 12px 14px; border: 1px solid var(--border); font-family: var(--font-sans); font-size: 13px; background: var(--ivoire); }
.restock-msg { font-size: 12px; margin-top: 8px; color: var(--gold-deep); }

/* FAQ accordion */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; text-align: left; padding: 20px 4px; background: none; border: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: var(--font-voice); font-size: 17px; color: var(--ink); }
.faq-q .faq-caret { font-size: 14px; color: var(--ink-soft); transition: transform 0.2s ease; flex-shrink: 0; }
.faq-item.open .faq-q .faq-caret { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a p { padding: 0 4px 20px; color: var(--ink-soft); font-size: 14px; line-height: 1.8; max-width: 640px; }

/* Quick add on product cards — injected by shop-features.js */
/* Cards in a row are stretched to the tallest one, and the button is pushed
   to the bottom, so every add-to-cart button in a row sits on the same line
   however many lines the name or collection takes. The text above keeps a
   10px gap to it. */
.product-card { display: flex; flex-direction: column; }
.product-card figcaption, .product-card .card-rating { margin-bottom: 10px; }
.quick-add-btn {
  width: 100%;
  margin-top: auto;
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
/* Hover only where there is a real pointer. On a phone :hover sticks to the
   last thing tapped, and this rule outranked the gold "added" state below, so
   the confirmation showed black. */
@media (hover: hover) {
  .quick-add-btn:hover:not(:disabled):not(.added) { background: var(--ink); color: var(--ivoire); }
}
.quick-add-btn.added,
.quick-add-btn.added:hover { background: var(--gold); border-color: var(--gold); color: var(--noir); }
.quick-add-btn:disabled { border-color: var(--border); color: var(--ink-soft); cursor: default; }
/* Two cards per row on a phone leaves ~160px a card: tighten the quick-add
   label so "Adaugă în coș" stays on one line. */
@media (max-width: 640px) {
  .quick-add-btn { font-size: 10px; letter-spacing: 0.04em; padding: 9px 6px; }
}

/* Phone model picker — injected by shop-features.js. A sheet rising from the
   bottom on a phone, a centred dialog on a wider screen. */
.model-sheet { position: fixed; inset: 0; z-index: 600; background: rgba(10,10,10,0.45); display: flex; align-items: flex-end; justify-content: center; }
.model-sheet-panel { position: relative; background: var(--ivoire); width: 100%; max-width: 520px; padding: 26px 20px calc(22px + env(safe-area-inset-bottom, 0px)); max-height: 86vh; overflow-y: auto; }
@media (min-width: 641px) { .model-sheet { align-items: center; } .model-sheet-panel { padding: 30px 28px; } }
.model-sheet-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: none; background: none; font-size: 22px; cursor: pointer; color: var(--ink-soft); }
.model-sheet-eyebrow { margin: 0 34px 4px 0; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-deep); }
.model-sheet-title { font-size: 22px; margin: 0 0 16px; }
.model-sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.model-option { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 13px 14px; border: 1px solid var(--border); background: var(--ivoire); font-family: var(--font-sans); font-size: 14px; color: var(--ink); text-align: left; cursor: pointer; }
.model-option small { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-deep); }
.model-option.is-last { border-color: var(--gold); }
@media (hover: hover) { .model-option:hover { border-color: var(--ink); } }
.model-option:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Site search — trigger in the header and overlay, both from shop-features.js */
.search-trigger { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: none; background: none; color: inherit; cursor: pointer; }
.search-overlay { position: fixed; inset: 0; z-index: 550; background: rgba(10,10,10,0.45); display: flex; justify-content: center; align-items: flex-start; }
.search-panel { width: 100%; max-width: 640px; max-height: 100%; overflow-y: auto; background: var(--ivoire); padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 22px; }
@media (min-width: 641px) { .search-overlay { padding-top: 8vh; } .search-panel { max-height: 80vh; padding: 18px 22px 24px; } }
.search-bar { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--ink); padding: 6px 0 10px; color: var(--ink); }
.search-input { flex: 1; min-width: 0; border: none; background: transparent; font-family: var(--font-sans); font-size: 16px; color: var(--ink); outline: none; }
.search-input::-webkit-search-cancel-button { display: none; }
.search-close { border: none; background: none; font-size: 24px; line-height: 1; color: var(--ink-soft); cursor: pointer; padding: 0 4px; }
.search-hint { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin: 18px 0 10px; }
.search-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.search-chip { padding: 8px 12px; border: 1px solid var(--border); background: var(--ivoire); font-family: var(--font-sans); font-size: 13px; color: var(--ink); cursor: pointer; }
.search-empty { margin: 20px 0 0; font-size: 14px; }
.search-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.search-row img { width: 52px; height: 52px; object-fit: cover; background: var(--sable); }
.search-row-text { min-width: 0; display: flex; flex-direction: column; }
.search-row-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-row-meta { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.search-row-price { font-family: var(--font-voice); color: var(--gold-deep); font-size: 14px; white-space: nowrap; }
.search-all { display: block; text-align: center; margin-top: 16px; padding: 12px; border: 1px solid var(--ink); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
@media (hover: hover) { .search-chip:hover, .search-row:hover .search-row-name { color: var(--gold-deep); } }

/* Header row on phones: nothing wraps, icons do not shrink, the basket shows a
   bag icon instead of its label. */
.header-actions > a, .header-actions > .search-trigger { white-space: nowrap; flex-shrink: 0; }
#cartLink { display: inline-flex; align-items: center; gap: 4px; }
.cart-icon { display: none; }
@media (max-width: 600px) {
  .cart-icon { display: block; }
  #cartLink > [data-i18n="nav.cart"] { display: none; }
}

/* Ratings on product cards — added by shop-features.js */
.card-rating { font-size: 12px; margin-top: 4px; color: var(--ink); }
.card-rating-star { color: var(--gold); }
.card-rating-count { color: var(--ink-soft); }

/* ANPC SAL pictogram, required in every page footer. */
.anpc-badge { display: inline-block; margin-top: 14px; line-height: 0; }
.anpc-badge img { display: block; width: 201px; height: 50px; }
.legal-footer { background: var(--noir); color: rgba(250,247,242,0.6); padding: 22px var(--gutter); font-size: 12px; text-align: center; }

/* Product cards show the whole photo: shots come in several proportions. */
.product-card .zoom-frame img { object-fit: contain; }

/* Social icons */
.social-links { display: flex; gap: 12px; justify-content: center; margin-top: 14px; }
.social-links.align-left { justify-content: flex-start; margin-top: 0; }
.social-links a { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(250,247,242,0.28); color: rgba(250,247,242,0.85); transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
@media (hover: hover) { .social-links a:hover { background: var(--gold); border-color: var(--gold); color: var(--noir); } }
.social-links.on-light a { border-color: var(--border); color: var(--ink); }
