/* ============================================================
   EDYD Goes Public — „firul de aur”
   Paletă: cerneală regală + fir de aur + hârtie de poveste
   Display: Fraunces · Text: Nunito Sans
   ============================================================ */

:root {
  --ink:        #1E2A4A;
  --ink-2:      #2B3B6B;
  --paper:      #FBF7EE;
  --paper-2:    #F1E9D6;
  --gold:       #C9962E;
  --gold-soft:  #E7CE8C;
  --mouse:      #6E675C;
  --seal:       #A6402B;
  --ok:         #4C7A3F;

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Nunito Sans", system-ui, sans-serif;

  --radius: 14px;
  --shadow: 0 14px 40px rgba(30, 42, 74, .16);
  --stitch: 1px dashed var(--gold);
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--gold); color: var(--ink); padding: .5rem 1rem; z-index: 99;
}
.skip:focus { left: .5rem; top: .5rem; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Firul de aur (semnătura vizuală) ---------- */
.thread {
  height: 0;
  border-bottom: 2px dashed var(--gold);
  opacity: .85;
  position: relative;
}
.thread::after {
  content: "";
  position: absolute; right: 8%; top: -7px;
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--paper);
}

/* ---------- Header ---------- */
.site-header { background: var(--ink); color: var(--paper); }
.header-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: .9rem; padding-bottom: .9rem;
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-mouse { width: 34px; height: 28px; color: var(--gold); }
.brand-name {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; letter-spacing: .01em;
}
.brand-name em { font-style: italic; font-weight: 400; color: var(--gold-soft); }

.nav { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.nav a {
  text-decoration: none; font-weight: 600; font-size: .98rem;
  padding-bottom: 2px; border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--gold); }
.cart-link { position: relative; }
.cart-badge {
  background: var(--gold); color: var(--ink);
  border-radius: 999px; font-size: .75rem; font-weight: 800;
  padding: .05rem .45rem; margin-left: .35rem; vertical-align: 2px;
}

.site-header .thread::after { background: var(--ink); }

/* ---------- Flash ---------- */
.flash {
  margin: 1rem 0 0; padding: .8rem 1.1rem;
  background: #EAF3E4; border: 1px solid #B7D3A8; border-radius: 10px; color: var(--ok);
  font-weight: 600;
}

/* ---------- Butoane ---------- */
.btn {
  display: inline-block; cursor: pointer; text-decoration: none; text-align: center;
  font-family: var(--font-body); font-weight: 800; font-size: 1rem;
  padding: .8rem 1.7rem; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--ink); color: var(--paper);
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-2px); background: var(--ink-2); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero {
  background: var(--ink); color: var(--paper);
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 5.5rem);
  position: relative; overflow: hidden;
}
.hero-in {
  display: grid; grid-template-columns: 1.1fr .9fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--gold-soft); font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; font-size: .8rem; margin-bottom: 1rem;
}
.hero-eyebrow svg { width: 22px; height: 17px; color: var(--gold); }
.hero h1 { color: var(--paper); }
.hero h1 em { font-style: italic; color: var(--gold-soft); }
.hero-verse {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--gold-soft);
  border-left: 2px dashed var(--gold); padding-left: 1rem; margin: 1.4rem 0;
}
.hero-verse cite { display: block; font-style: normal; font-family: var(--font-body); font-size: .85rem; color: var(--paper); opacity: .75; margin-top: .4rem; }
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-meta { margin-top: 1.3rem; font-size: .9rem; opacity: .8; }

.hero-book { position: relative; justify-self: center; }
.hero-book img {
  width: min(340px, 78vw); border-radius: 6px;
  transform: rotate(3deg);
  box-shadow: 0 30px 70px rgba(0,0,0,.5);
  border: 6px solid var(--paper);
}
.hero-book::before {
  content: ""; position: absolute; inset: -18px -18px auto auto;
  width: 100%; height: 100%;
  border: 2px dashed var(--gold); border-radius: 8px;
  transform: rotate(-2deg); z-index: 0;
}
.hero-book img { position: relative; z-index: 1; }
.hero-mice {
  position: absolute; bottom: -34px; left: -30px; z-index: 2;
  width: 64px; height: 54px; color: var(--gold);
  transform: rotate(-8deg);
}

/* ---------- Secțiuni ---------- */
.section { padding: clamp(2.6rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--paper-2); }
.section-head { max-width: 640px; margin-bottom: 2rem; }
.section-head .eyebrow {
  color: var(--gold); font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; font-size: .78rem; display: block; margin-bottom: .4rem;
}
.section-head p { color: var(--mouse); }

/* ---------- Grile produse ---------- */
.grid-products {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.6rem;
}
.card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(30,42,74,.06);
  display: flex; flex-direction: column;
  transition: transform .15s ease;
}
.card:hover { transform: translateY(-4px); }
.card-img { aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.15rem; }
.card-body h3 a { text-decoration: none; }
.card-body h3 a:hover { color: var(--gold); }
.card-sub { color: var(--mouse); font-size: .9rem; margin: 0; flex: 1; }
.card-price { display: flex; align-items: baseline; gap: .6rem; margin-top: .3rem; }
.price-now { font-weight: 800; font-size: 1.2rem; }
.price-old { color: var(--mouse); text-decoration: line-through; font-size: .95rem; }
.badge-sale {
  background: var(--seal); color: #fff; font-size: .72rem; font-weight: 800;
  border-radius: 999px; padding: .15rem .6rem; text-transform: uppercase; letter-spacing: .05em;
}
.badge-out { background: var(--mouse); color: #fff; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: .15rem .6rem; }

/* ---------- Stele recenzii ---------- */
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.stars svg { width: 15px; height: 15px; }
.stars .off { color: #D8D2C4; }
.rating-line { display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--mouse); }

/* ---------- Pagina produs ---------- */
.product-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: start; padding-top: 2.5rem;
}
.gallery-main {
  border-radius: var(--radius); overflow: hidden; background: #fff;
  border: var(--stitch); padding: .6rem;
}
.gallery-main img { width: 100%; border-radius: 8px; }
.gallery-thumbs { display: flex; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; }
.gallery-thumbs button {
  border: 2px solid transparent; border-radius: 8px; padding: 0; cursor: pointer;
  background: none; width: 68px; overflow: hidden;
}
.gallery-thumbs button.active { border-color: var(--gold); }
.gallery-thumbs img { border-radius: 6px; aspect-ratio: 1; object-fit: cover; }

.product-info h1 { margin-bottom: .3rem; }
.product-sub { color: var(--mouse); font-size: 1.05rem; margin-top: 0; }
.product-price { display: flex; align-items: baseline; gap: .8rem; margin: 1.2rem 0; }
.product-price .price-now { font-size: 1.9rem; font-family: var(--font-display); }
.stock-note { font-size: .9rem; font-weight: 700; }
.stock-note.in { color: var(--ok); }
.stock-note.out { color: var(--seal); }

.qty-row { display: flex; gap: .9rem; align-items: center; margin: 1.4rem 0; flex-wrap: wrap; }
.qty {
  display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden;
}
.qty button {
  width: 42px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; font-weight: 700;
}
.qty input {
  width: 52px; border: 0; text-align: center; font-size: 1rem; font-weight: 700;
  font-family: var(--font-body); background: none;
}
.qty input:focus { outline: none; }

.product-desc { margin-top: 2rem; white-space: pre-line; }
.product-details {
  margin-top: 1.6rem; background: var(--paper-2); border-radius: var(--radius);
  padding: 1.2rem 1.4rem; white-space: pre-line; font-size: .95rem;
  border: var(--stitch);
}
.product-details h3 { margin-top: 0; }

/* ---------- Recenzii ---------- */
.reviews { margin-top: 3rem; }
.review {
  background: #fff; border-radius: var(--radius); padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow); margin-bottom: 1rem;
}
.review-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .4rem; }
.review-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--gold-soft);
  display: grid; place-items: center; font-weight: 800; font-family: var(--font-display);
}
.review-author { font-weight: 700; }
.review-body { margin: 0; color: #3A3F52; }
.review-form { background: #fff; border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); margin-top: 1.5rem; }

/* ---------- Formulare ---------- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .3rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .7rem .85rem; font-size: 1rem; font-family: var(--font-body);
  border: 1.5px solid #C9C2B0; border-radius: 10px; background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(201,150,46,.2);
}
.field .hint { font-size: .82rem; color: var(--mouse); margin-top: .25rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
.form-err {
  background: #FBEAE6; border: 1px solid #E0A493; color: var(--seal);
  border-radius: 10px; padding: .8rem 1.1rem; margin-bottom: 1.2rem; font-weight: 600;
}

/* ---------- Coș & checkout ---------- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th {
  text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--mouse); padding: .6rem .5rem; border-bottom: 2px solid var(--paper-2);
}
.cart-table td { padding: .9rem .5rem; border-bottom: 1px dashed #D9D2C0; vertical-align: middle; }
.cart-prod { display: flex; gap: .9rem; align-items: center; }
.cart-prod img { width: 62px; border-radius: 8px; }
.cart-prod a { font-weight: 700; text-decoration: none; }
.cart-remove { color: var(--seal); font-size: .85rem; text-decoration: none; font-weight: 700; }
.cart-remove:hover { text-decoration: underline; }

.summary {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.4rem 1.5rem; border-top: 4px solid var(--gold);
}
.summary-row { display: flex; justify-content: space-between; padding: .35rem 0; }
.summary-row.total { font-weight: 800; font-size: 1.2rem; border-top: 2px dashed var(--gold); margin-top: .5rem; padding-top: .8rem; }
.free-ship-note { font-size: .85rem; color: var(--ok); font-weight: 700; }

.checkout-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.5rem; align-items: start; }

.empty-state { text-align: center; padding: 3.5rem 1rem; }
.empty-state svg { width: 80px; height: 66px; color: var(--gold); margin: 0 auto 1rem; }

/* ---------- Pași poveste (cum comanzi) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.step { position: relative; padding-top: .4rem; }
.step-num {
  font-family: var(--font-display); font-style: italic; font-size: 2.6rem;
  color: var(--gold); line-height: 1;
}
.step h3 { margin: .4rem 0 .3rem; }
.step p { color: var(--mouse); margin: 0; font-size: .95rem; }

/* ---------- Autor ---------- */
.author-quote {
  max-width: 760px; margin: 0 auto; text-align: center;
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem); line-height: 1.5;
}
.author-quote::before { content: "„"; color: var(--gold); font-size: 3rem; display: block; line-height: 0.4; }
.author-sign { margin-top: 1.4rem; font-family: var(--font-body); font-style: normal; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .85rem; color: var(--gold); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); margin-top: 3rem; }
.site-footer .thread { border-color: var(--gold); }
.site-footer .thread::after { background: var(--ink); }
.footer-in {
  display: grid; grid-template-columns: 1.3fr 1fr 1.2fr 1fr; gap: 2rem;
  padding: 2.8rem 1.25rem 1.5rem;
}
.footer-brand { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; margin: 0 0 .6rem; }
.footer-brand em { color: var(--gold-soft); font-weight: 400; }
.footer-verse { font-family: var(--font-display); font-style: italic; color: var(--gold-soft); }
.footer-col h3 { color: var(--gold-soft); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; font-family: var(--font-body); font-weight: 800; }
.footer-col a { display: block; text-decoration: none; opacity: .85; padding: .18rem 0; font-size: .95rem; }
.footer-col a:hover { opacity: 1; text-decoration: underline; }
.footer-note { opacity: .85; font-size: .95rem; }
.footer-bottom { border-top: 1px dashed rgba(201,150,46,.4); padding-top: 1rem; padding-bottom: 1.3rem; font-size: .85rem; opacity: .7; }

/* ---------- Pagini text ---------- */
.prose { max-width: 720px; padding-top: 2rem; white-space: pre-line; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-book { order: -1; }
  .product-layout, .checkout-layout { grid-template-columns: 1fr; }
  .footer-in { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .footer-in { grid-template-columns: 1fr; }
  .header-in { flex-direction: column; gap: .5rem; }
  .cart-table th:nth-child(2), .cart-table td:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
