/* =====================================================================
   STYLES.CSS — tot CSS-ul pentru ambele pagini (landing + thank-you)
   ---------------------------------------------------------------------
   Estetică boutique / editorial feminin. Construit în jurul culorii
   produsului (verde fistic), cu accent bordo doar pe butoanele CTA.
   Culorile se schimbă din variabilele de mai jos (:root).
   ===================================================================== */

/* ---------- Paleta de culori (variabile CSS) ---------- */
:root {
  --bg:        #edede3;  /* fundal general, stone / in natural */
  --bg-2:      #e3e5d7;  /* secțiuni alternate */
  --cream:     #fafaf4;  /* carduri, fundal imagini */
  --ink:       #24271c;  /* text principal */
  --ink-soft:  #5a5e4c;  /* text secundar */
  --sage:      #afc086;  /* accent produs */
  --sage-deep: #71804f;  /* accent secundar */
  --wine:      #6b2d46;  /* butoane CTA */
  --wine-deep: #521f35;  /* hover CTA */

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Jost", "Helvetica Neue", sans-serif;

  --radius: 4px;
  --shadow: 0 10px 40px rgba(36, 39, 28, 0.10);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* Focus vizibil la navigarea cu tastatura */
:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
}

/* Respectăm preferința pentru mai puțină mișcare */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Butoane ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  color: var(--cream);
  background: var(--wine);
  border: none;
  border-radius: var(--radius);
  padding: 0.9rem 2rem;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
.btn:hover { background: var(--wine-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

.btn--small { padding: 0.55rem 1.4rem; font-size: 0.8rem; }
.btn--large { padding: 1.1rem 2.6rem; font-size: 1rem; }
.btn--full { width: 100%; }
/* Varianta pentru banda închisă la culoare */
.btn--on-dark { background: var(--wine); }

/* ---------- Bara de anunț ---------- */
.announce {
  background: var(--sage-deep);
  color: var(--cream);
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  padding: 0.5rem 1rem;
}

/* ---------- Header sticky ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem clamp(1rem, 5vw, 3rem);
  background: rgba(237, 237, 227, 0.92); /* --bg cu transparență */
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(36, 39, 28, 0.08);
}
.header__logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

/* ---------- Hero: galerie + info produs ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 5vw, 3rem);
  animation: fade-in 0.7s ease both; /* fade discret la încărcare */
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* Galeria: thumbnail-uri verticale în stânga + imagine mare */
.gallery {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.9rem;
  align-items: start;
}
.gallery__thumbs {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.gallery__thumb {
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--cream);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.75;
}
.gallery__thumb img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.gallery__thumb:hover { opacity: 1; }
.gallery__thumb.is-active {
  border-color: var(--ink);
  opacity: 1;
}
.gallery__main {
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.gallery__main img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* Info produs */
.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 0.7rem;
}
.product-info__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 0.8rem;
}
.rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.rating__stars { color: var(--sage-deep); letter-spacing: 0.15em; }
.rating__count { font-size: 0.9rem; color: var(--ink-soft); }

.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}
.price-row__current {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
}
.price-row__old { color: var(--ink-soft); font-size: 1.1rem; }
.price-row__badge {
  background: var(--wine);
  color: var(--cream);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.product-info__desc {
  color: var(--ink-soft);
  max-width: 44ch;
  margin-bottom: 1.6rem;
}

/* Selectorul de culoare (bulinuțe) */
.color-picker { margin-bottom: 1.4rem; }
.color-picker__label {
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  color: var(--ink-soft);
}
.color-picker__label strong { color: var(--ink); font-weight: 500; }
.color-picker__swatches { display: flex; gap: 0.7rem; }
.swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--cream);
  background: var(--swatch-color);
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(36, 39, 28, 0.25);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.swatch:hover { transform: scale(1.08); }
.swatch.is-active { box-shadow: 0 0 0 2px var(--ink); }

/* Cardul cu cadoul (chenar punctat) */
.gift-card {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  border: 1.5px dashed var(--sage-deep);
  border-radius: var(--radius);
  background: var(--cream);
  padding: 1rem 1.2rem;
  margin-bottom: 1.6rem;
}
.gift-card__icon { font-size: 1.4rem; line-height: 1.3; }
.gift-card__name { font-weight: 500; }
.gift-card__note { font-size: 0.88rem; color: var(--ink-soft); }

/* Badge-uri de încredere */
.trust-badges {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-top: 1.6rem;
}
.trust-badges li {
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem;
  text-align: center;
}
.trust-badges__title {
  display: block;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}
.trust-badges__sub {
  display: block;
  font-size: 0.76rem;
  color: var(--ink-soft);
  margin-top: 0.15rem;
}

/* ---------- Titluri de secțiune ---------- */
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  text-align: center;
  margin-bottom: 2rem;
}

/* ---------- Secțiunea „De ce acest compleu" ---------- */
.features {
  background: var(--bg-2);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 5vw, 3rem);
}
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  max-width: 1080px;
  margin: 0 auto;
}
.feature-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}
.feature-card p { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Ghid de mărimi ---------- */
.sizes {
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 5vw, 3rem);
  max-width: 760px;
  margin: 0 auto;
}
.sizes__table-wrap { overflow-x: auto; } /* pe mobil, tabelul poate derula */
.sizes__table {
  width: 100%;
  border-collapse: collapse;
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
}
.sizes__table th,
.sizes__table td {
  padding: 0.85rem 1rem;
  text-align: center;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--bg-2);
}
.sizes__table thead th {
  background: var(--sage);
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.05em;
}
.sizes__table tbody th { font-weight: 500; }
.sizes__hint {
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 1rem;
}

/* ---------- Banda finală CTA (fundal închis) ---------- */
.cta-band {
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 5vw, 3rem);
}
.cta-band__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 0.6rem;
}
.cta-band__sub {
  color: rgba(250, 250, 244, 0.75);
  margin-bottom: 1.8rem;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 1.6rem 1rem;
  /* spațiu suplimentar jos pe mobil, ca bara sticky să nu acopere textul */
  padding-bottom: 5.5rem;
}
@media (min-width: 761px) {
  .footer { padding-bottom: 1.6rem; }
}

/* ---------- Bara sticky de jos (doar pe mobil) ---------- */
.mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--cream);
  border-top: 1px solid rgba(36, 39, 28, 0.12);
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
}
.mobile-bar__price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
}

/* ---------- Modalul de comandă ---------- */
body.modal-open { overflow: hidden; } /* fără scroll în spatele modalului */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
/* Atributul hidden trebuie să câștige în fața lui display:flex */
.modal[hidden] { display: none; }
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(36, 39, 28, 0.55);
}
.modal__dialog {
  position: relative;
  background: var(--cream);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 1.8rem 1.6rem;
  animation: fade-in 0.3s ease both;
}
.modal__close {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  font-size: 1.6rem;
  line-height: 1;
  background: none;
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0.3rem;
}
.modal__close:hover { color: var(--ink); }
.modal__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.7rem;
  margin-bottom: 1.2rem;
}
.modal__summary {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 0.9rem;
  margin-bottom: 1.4rem;
}
.modal__image {
  width: 76px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.modal__product-name { font-weight: 500; margin-bottom: 0.2rem; }
.modal__detail { font-size: 0.88rem; color: var(--ink-soft); }
.modal__price { font-weight: 500; color: var(--ink); }
.modal__gift { font-size: 0.85rem; color: var(--sage-deep); margin-top: 0.3rem; }
.modal__reassure {
  text-align: center;
  font-size: 0.84rem;
  color: var(--ink-soft);
  margin-top: 0.8rem;
}

/* ---------- Formularul ---------- */
.form-field { margin-bottom: 1.1rem; }
.form-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 400;
  margin-bottom: 0.35rem;
}
.required { color: var(--wine); }
.optional { color: var(--ink-soft); font-size: 0.8rem; }

.form-field input,
.form-field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(36, 39, 28, 0.25);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  transition: border-color 0.2s ease;
}
.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--sage-deep);
  box-shadow: 0 0 0 3px rgba(113, 128, 79, 0.18);
}
/* Câmp cu eroare de validare */
.form-field input.has-error {
  border-color: var(--wine);
  box-shadow: 0 0 0 3px rgba(107, 45, 70, 0.12);
}
.form-field__error {
  font-size: 0.8rem;
  color: var(--wine);
  margin-top: 0.3rem;
  min-height: 1em;
}
/* Eroarea generală de la trimitere (server / rețea) */
.form-error {
  background: rgba(107, 45, 70, 0.08);
  border: 1px solid rgba(107, 45, 70, 0.35);
  color: var(--wine-deep);
  border-radius: var(--radius);
  font-size: 0.9rem;
  padding: 0.7rem 0.9rem;
  margin-bottom: 1rem;
}

/* ---------- Pagina de mulțumire ---------- */
.thanks {
  display: flex;
  justify-content: center;
  padding: clamp(3rem, 8vw, 6rem) 1rem;
  min-height: 55vh;
}
.thanks__card {
  background: var(--cream);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 520px;
  text-align: center;
  padding: clamp(2rem, 5vw, 3rem);
  animation: fade-in 0.6s ease both;
}
.thanks__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--ink);
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
}
.thanks__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  margin-bottom: 0.8rem;
}
.thanks__text { color: var(--ink-soft); margin-bottom: 1.2rem; }
.thanks__gift {
  border: 1.5px dashed var(--sage-deep);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font-size: 0.92rem;
  margin-bottom: 1.6rem;
}

/* =====================================================================
   RESPONSIVE — tabletă și mobil
   ===================================================================== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .features__grid { grid-template-columns: 1fr; max-width: 480px; }
}

@media (max-width: 760px) {
  /* Bara sticky de jos apare doar pe mobil */
  .mobile-bar { display: flex; }

  /* Pe mobil, thumbnail-urile trec sub imaginea mare, pe orizontală */
  .gallery { grid-template-columns: 1fr; }
  .gallery__thumbs {
    flex-direction: row;
    order: 2;
    overflow-x: auto;
    padding-bottom: 0.3rem;
  }
  .gallery__thumb { flex: 0 0 64px; }
  .gallery__main { order: 1; }

  .trust-badges { grid-template-columns: 1fr; }
  .trust-badges li { text-align: left; }

  /* Pe mobil, bulinuțele de culoare sunt mai mari — minim 44px,
     dimensiunea recomandată pentru ținte de atins cu degetul */
  .swatch { width: 44px; height: 44px; }
}
