/* ==========================================================================
   GiordaniBaby — stiluri de baza (Faza 1)
   Paleta si spatierile pot fi ajustate dupa identitatea vizuala oficiala.
   ========================================================================== */

:root {
  --c-bg: #ffffff;
  --c-bg-alt: #f6f8fb;
  --c-text: #1f2733;
  --c-muted: #5b6675;
  --c-primary: #2f7fc1;
  --c-primary-dark: #235f92;
  --c-accent: #f4a6b8;
  --c-border: #e4e9f0;
  --c-shadow: rgba(31, 39, 51, 0.08);
  --radius: 14px;
  --radius-sm: 8px;
  --container: 1120px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; color: var(--c-text); margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }

p { margin: 0 0 1rem; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-primary);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Butoane ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .18s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--c-primary); border-color: var(--c-border); }
.btn-ghost:hover { border-color: var(--c-primary); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--c-text); }
.logo:hover { text-decoration: none; }
.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  color: #fff;
  font-weight: 800;
}
.logo-text { font-size: 1.15rem; letter-spacing: .2px; }

.site-nav ul {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--c-text);
  font-weight: 500;
}
.site-nav a:hover { background: var(--c-bg-alt); text-decoration: none; }
.site-nav a.active { color: var(--c-primary); background: var(--c-bg-alt); }

.nav-toggle { display: none; }
.nav-toggle-label { display: none; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, #eaf3fb 0%, #fdf1f4 100%);
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--c-primary);
  margin: 0 0 .6rem;
}
.lead { font-size: 1.12rem; color: var(--c-muted); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.4rem; }
.hero-visual {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  position: relative;
  box-shadow: 0 20px 50px var(--c-shadow);
}
.hero-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(255,255,255,.95);
  color: var(--c-primary-dark);
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .85rem;
}

/* ---------- Sectiuni ---------- */
.section { padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.section-alt { background: var(--c-bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.2rem; }
.section-head p { color: var(--c-muted); margin: 0; }

.page-hero {
  background: var(--c-bg-alt);
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-bottom: 1px solid var(--c-border);
}
.page-hero .lead { margin-bottom: 0; }

/* ---------- Grid & carduri ---------- */
.grid { display: grid; gap: 22px; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-posts { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px var(--c-shadow); text-decoration: none; }

.category-card {
  padding: 26px 22px;
  text-align: left;
  color: var(--c-text);
}
.category-card:hover { text-decoration: none; }
.category-card h3 { margin-top: 12px; }
.category-card p { color: var(--c-muted); }
.category-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eaf3fb, #fdf1f4);
  font-size: 1.5rem;
}
.category-icon::before { content: "🍼"; }
.category-icon[data-icon="stroller"]::before { content: "🚼"; }
.category-icon[data-icon="car-seat"]::before { content: "🚗"; }
.category-icon[data-icon="highchair"]::before { content: "🪑"; }
.category-icon[data-icon="walker"]::before { content: "👣"; }

.card-media {
  display: block;
  aspect-ratio: 4 / 3;
  background: #ffffff;
}
/* Imaginile de produs se vad integral, fara decupare */
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #ffffff;
  padding: 8px;
}
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: 1.1rem; margin: 0; }
.card-title a { color: var(--c-text); }
.card-title a:hover { color: var(--c-primary); }
.card-text { color: var(--c-muted); margin: 0; flex: 1; }
.card-link { font-weight: 600; color: var(--c-primary); margin-top: 8px; }

/* placeholder imagini */
.placeholder-media {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 160px;
  background:
    repeating-linear-gradient(45deg, #eef2f7 0 12px, #f6f8fb 12px 24px);
  color: var(--c-muted);
}
.placeholder-media.large { min-height: 340px; border-radius: var(--radius); }
.placeholder-label {
  background: rgba(255,255,255,.8);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
}

/* ---------- Lightbox (zoom imagine produs) ---------- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 20, 0.9);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.lightbox-overlay.open { opacity: 1; visibility: visible; }
.lightbox-figure {
  margin: 0;
  max-width: 94vw;
  max-height: 90vh;
  display: flex;
}
.lightbox-img {
  max-width: 94vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(255,255,255,.14);
  color: #fff;
  border: none;
  cursor: pointer;
  line-height: 1;
  transition: background .15s ease;
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255,255,255,.28); }
.lightbox-close {
  top: 14px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 1.8rem;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  font-size: 2rem;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-nav[hidden], .lightbox-counter[hidden] { display: none; }
.lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(255,255,255,.14);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .85rem;
}
@media (max-width: 520px) {
  .lightbox-nav { width: 44px; height: 44px; font-size: 1.6rem; }
}

/* ---------- Values ---------- */
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.value { padding: 24px; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-bg); }
.value h3 { color: var(--c-primary-dark); }
.value p { color: var(--c-muted); margin: 0; }

/* ---------- Prose ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.8rem; }
.callout {
  background: #eef6fc;
  border-left: 4px solid var(--c-primary);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin: 1.4rem 0;
}
.callout.success { background: #eafaf0; border-left-color: #2fae6a; }
.callout p { margin: 0; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .88rem; color: var(--c-muted); margin-bottom: .8rem; }
.breadcrumb a { color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb span { margin: 0 4px; }

/* ---------- Pagina produs ---------- */
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 10px;
}
.product-media img { width: 100%; border-radius: var(--radius); }
.product-single-img { border: 1px solid var(--c-border); }

/* ---------- Galerie produs (CSS-only) ---------- */
.gallery { display: block; }
.gallery-radio {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.gallery-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--c-border);
}
.gallery-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Imagine de produs afisata integral, fara decupare, centrata */
  object-fit: contain;
  object-position: center;
  background: #ffffff;
  padding: 10px;
  opacity: 0;
  border-radius: 0 !important;
  transition: opacity .25s ease;
}
/* Afiseaza slide-ul cu acelasi index ca radio-ul selectat (pana la 12 imagini) */
.gallery-radio:nth-of-type(1):checked ~ .gallery-stage .gallery-slide:nth-of-type(1),
.gallery-radio:nth-of-type(2):checked ~ .gallery-stage .gallery-slide:nth-of-type(2),
.gallery-radio:nth-of-type(3):checked ~ .gallery-stage .gallery-slide:nth-of-type(3),
.gallery-radio:nth-of-type(4):checked ~ .gallery-stage .gallery-slide:nth-of-type(4),
.gallery-radio:nth-of-type(5):checked ~ .gallery-stage .gallery-slide:nth-of-type(5),
.gallery-radio:nth-of-type(6):checked ~ .gallery-stage .gallery-slide:nth-of-type(6),
.gallery-radio:nth-of-type(7):checked ~ .gallery-stage .gallery-slide:nth-of-type(7),
.gallery-radio:nth-of-type(8):checked ~ .gallery-stage .gallery-slide:nth-of-type(8),
.gallery-radio:nth-of-type(9):checked ~ .gallery-stage .gallery-slide:nth-of-type(9),
.gallery-radio:nth-of-type(10):checked ~ .gallery-stage .gallery-slide:nth-of-type(10),
.gallery-radio:nth-of-type(11):checked ~ .gallery-stage .gallery-slide:nth-of-type(11),
.gallery-radio:nth-of-type(12):checked ~ .gallery-stage .gallery-slide:nth-of-type(12) {
  opacity: 1;
  z-index: 1;
}

/* Indiciu vizual ca imaginea principala se poate mari */
.gallery-stage.is-zoomable { cursor: zoom-in; }
.gallery-stage.is-zoomable::after {
  content: "⤢";
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(16, 21, 29, 0.55);
  color: #fff;
  border-radius: 8px;
  font-size: 1.1rem;
  pointer-events: none;
}
img.product-single-img.is-zoomable { cursor: zoom-in; }

/* Sageti de navigare in galeria din pagina (slider) */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(16, 21, 29, 0.42);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 3;
  transition: background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.gallery-arrow:hover { background: rgba(16, 21, 29, 0.65); }
.gallery-arrow-prev { left: 10px; }
.gallery-arrow-next { right: 10px; }
@media (max-width: 520px) {
  .gallery-arrow { width: 38px; height: 38px; font-size: 1.5rem; }
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.gallery-thumb {
  display: block;
  aspect-ratio: 1 / 1;
  border: 2px solid var(--c-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: #ffffff;
  transition: border-color .15s ease, transform .15s ease;
}
.gallery-thumb:hover { transform: translateY(-2px); }
.gallery-thumb:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #ffffff;
  padding: 4px;
  border-radius: 0 !important;
}
/* Evidentiaza miniatura activa */
.gallery-radio:nth-of-type(1):checked ~ .gallery-thumbs .gallery-thumb:nth-of-type(1),
.gallery-radio:nth-of-type(2):checked ~ .gallery-thumbs .gallery-thumb:nth-of-type(2),
.gallery-radio:nth-of-type(3):checked ~ .gallery-thumbs .gallery-thumb:nth-of-type(3),
.gallery-radio:nth-of-type(4):checked ~ .gallery-thumbs .gallery-thumb:nth-of-type(4),
.gallery-radio:nth-of-type(5):checked ~ .gallery-thumbs .gallery-thumb:nth-of-type(5),
.gallery-radio:nth-of-type(6):checked ~ .gallery-thumbs .gallery-thumb:nth-of-type(6),
.gallery-radio:nth-of-type(7):checked ~ .gallery-thumbs .gallery-thumb:nth-of-type(7),
.gallery-radio:nth-of-type(8):checked ~ .gallery-thumbs .gallery-thumb:nth-of-type(8),
.gallery-radio:nth-of-type(9):checked ~ .gallery-thumbs .gallery-thumb:nth-of-type(9),
.gallery-radio:nth-of-type(10):checked ~ .gallery-thumbs .gallery-thumb:nth-of-type(10),
.gallery-radio:nth-of-type(11):checked ~ .gallery-thumbs .gallery-thumb:nth-of-type(11),
.gallery-radio:nth-of-type(12):checked ~ .gallery-thumbs .gallery-thumb:nth-of-type(12) {
  border-color: var(--c-primary);
}
.feature-title { font-size: 1.15rem; margin-top: 1.4rem; }
.feature-list { padding-left: 0; list-style: none; margin: 0 0 1.4rem; }
.feature-list li { padding: 8px 0 8px 28px; border-bottom: 1px solid var(--c-border); position: relative; }
.feature-list li::before { content: "✓"; position: absolute; left: 4px; color: var(--c-primary); font-weight: 700; }
.product-details { margin-top: 2.6rem; max-width: 820px; }
.product-details .prose { max-width: none; }
.product-details h2 { margin-top: 1.9rem; }
.product-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 1.2rem 0 .8rem; }
.note { color: var(--c-muted); font-size: .88rem; }
.related { margin-top: 3rem; }
.related h2 { margin-bottom: 1.2rem; }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--c-bg-alt);
  border-radius: var(--radius);
}
.empty-state p { color: var(--c-muted); }

/* ---------- Blog ---------- */
.post-meta { color: var(--c-muted); font-size: .85rem; margin: 0 0 .4rem; }
.article-body { margin: 1.4rem 0; }
.article-body p { margin-bottom: 1rem; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.contact-list li { padding: 8px 0; border-bottom: 1px solid var(--c-border); }
.contact-form { display: grid; gap: 14px; }
.form-row { display: grid; gap: 6px; }
.form-row label { font-weight: 600; font-size: .92rem; }
.form-row input, .form-row textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--c-text);
  background: var(--c-bg);
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(47,127,193,.15);
}

/* ---------- Footer ---------- */
.site-footer { background: #10151d; color: #c7d0dc; margin-top: 2rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding: 48px 20px 32px;
}
.footer-logo .logo-text { color: #fff; }
.footer-tagline { color: #9aa6b5; margin: 12px 0 0; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { padding: 5px 0; }
.footer-col a { color: #c7d0dc; }
.footer-col a:hover { color: #fff; }
.footer-contact li { color: #9aa6b5; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom .container { padding: 18px 20px; }
.footer-bottom p { margin: 0; color: #8590a0; font-size: .86rem; }

/* ---------- Pagini eroare ---------- */
.error-page { text-align: center; padding: 5rem 0; }
.error-code { font-size: 4rem; font-weight: 800; color: var(--c-primary); margin: 0; line-height: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; aspect-ratio: 16/9; }
  .product-layout { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    cursor: pointer;
  }
  .nav-toggle-label span {
    height: 2px;
    background: var(--c-text);
    border-radius: 2px;
    transition: .2s;
  }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .site-nav ul { flex-direction: column; padding: 8px 14px; gap: 2px; }
  .site-nav a { padding: 12px 14px; }
  .nav-toggle:checked ~ .site-nav { max-height: 340px; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* Pe mobil: imaginea de produs pe toata latimea ecranului (edge-to-edge) */
@media (max-width: 720px) {
  .product-page .product-media {
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
  }
  .product-page .gallery-stage {
    aspect-ratio: 1 / 1;          /* pozele sunt patrate -> umplu latimea */
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .product-page .gallery-thumbs {
    padding-left: 20px;
    padding-right: 20px;
  }
  .product-page .product-single-img {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
}
