:root {
  --bg: #ffffff;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --ink: #12151a;
  --accent: #1d3557;
  --accent-soft: rgba(29, 53, 87, 0.08);
  --accent-2: #457b9d;
  --sun: #f5871f;
  --sun-deep: #e07212;
  --text: #171717;
  --muted: #5c6570;
  --border: #ddd6c8;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(23, 23, 23, 0.04);
  --shadow-md: 0 6px 20px rgba(23, 23, 23, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ===== Navigation ===== */
.nav {
  position: sticky; top: 0; z-index: 220;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; max-width: 1140px; margin: 0 auto;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.05rem; }
.nav-logo img { height: 40px; width: auto; display: block; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.92rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-toggle { display: none; }
.nav-overlay { display: none; }
@media (max-width: 720px) {
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; padding: 9px;
    border: 1px solid var(--border); border-radius: 10px;
    background: #fff; cursor: pointer;
  }
  .nav-toggle span {
    display: block; height: 2px; background: var(--accent); border-radius: 2px;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-overlay {
    display: block; position: fixed; inset: 0; z-index: 210;
    background: rgba(15, 23, 42, 0.4);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
  }
  body.nav-open .nav-overlay {
    opacity: 1; visibility: visible; pointer-events: auto;
  }
  .nav-links {
    display: flex; position: fixed; z-index: 215;
    top: 0; left: 0;
    width: min(300px, 84vw); height: 100dvh;
    flex-direction: column; gap: 0;
    margin: 0; padding: 88px 24px 28px;
    background: #fff;
    box-shadow: 8px 0 32px rgba(15, 23, 42, 0.14);
    transform: translate3d(-100%, 0, 0);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
    overflow-y: auto;
  }
  body.nav-open .nav-links,
  .nav.open .nav-links { transform: translate3d(0, 0, 0); }
  .nav-links a { display: block; padding: 14px 4px; font-size: 1.05rem; font-weight: 600; color: var(--text); }
  body.nav-open { overflow: hidden; }
  @media (prefers-reduced-motion: reduce) {
    .nav-overlay, .nav-links { transition: none; }
  }
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 20px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }

/* ===== Product layout ===== */
.product-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  padding: 36px 0 64px;
  align-items: start;
}
@media (max-width: 860px) {
  .product-hero { grid-template-columns: 1fr; gap: 32px; }
}

/* Gallery */
.gallery-main {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.gallery-main img {
  width: 100%;
  height: 420px;
  object-fit: contain;
  display: block;
  padding: 20px;
}
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.gallery-thumbs button {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  padding: 6px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gallery-thumbs button:hover, .gallery-thumbs button.active { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.gallery-thumbs img { width: 100%; height: 64px; object-fit: contain; display: block; }
.gallery-dots { display: none; }

/* Info column */
.product-info h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; margin-bottom: 10px; }
.product-info .subtitle { color: var(--muted); margin-bottom: 20px; }
.price-label { text-transform: uppercase; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 2px; }
.price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.price { font-size: 2rem; font-weight: 800; color: var(--accent); }
.price-note { color: var(--muted); font-size: 0.88rem; }
.stock { color: #15803d; font-weight: 600; font-size: 0.9rem; margin-bottom: 22px; }

.key-specs { list-style: none; margin: 0 0 26px; }
.key-specs li { padding: 6px 0; color: var(--text); font-size: 0.95rem; display: flex; gap: 10px; align-items: center; }
.key-specs li::before { content: "✓"; color: var(--accent); font-weight: 700; }

.cta-label { font-weight: 700; font-size: 0.95rem; margin-bottom: 10px; }
.cta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  transition: background 0.15s ease-out, border-color 0.15s ease-out, transform 0.15s ease-out;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #ffffff; }
.btn-primary:hover { background: #162943; }
.btn-whatsapp {
  display: inline-flex; align-items: center; gap: 9px;
  background: #128C7E; color: #ffffff;
}
.btn-whatsapp:hover { background: #075E54; }
.btn-whatsapp svg { flex-shrink: 0; }
.btn-phone { display: inline-flex; align-items: center; gap: 9px; }
.btn-phone svg { flex-shrink: 0; color: var(--accent); }
.btn-secondary { background: #ffffff; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: #cfcbc3; }

.guarantee { color: var(--muted); font-size: 0.85rem; }

/* Document download buttons */
.docs-title { font-weight: 700; font-size: 0.95rem; margin: 20px 0 10px; }
.docs-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-doc {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 18px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text); font-weight: 600; font-size: 0.88rem;
  text-decoration: none;
  transition: border-color 0.15s ease-out;
}
.btn-doc:hover { border-color: #cfcbc3; }
.btn-doc .pdf-icon { color: #dc2626; flex-shrink: 0; }
.btn-doc .dl-icon { color: var(--muted); flex-shrink: 0; }

/* ===== Sections ===== */
.section { padding: 48px 0; }
.section-alt { background: var(--bg-soft); }
.section h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 20px; }
.section p + p { margin-top: 12px; }
.section .prose { max-width: 820px; color: var(--muted); }

/* Description + specs two-column row */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) { .details-grid { grid-template-columns: 1fr; gap: 36px; } }

/* Specs table */
.specs-table {
  width: 100%;
  max-width: 820px;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.specs-table th, .specs-table td { text-align: left; padding: 12px 18px; font-size: 0.92rem; }
.specs-table tr + tr { border-top: 1px solid var(--border); }
.specs-table th { width: 40%; color: var(--muted); font-weight: 600; background: var(--bg-soft); }

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px 20px;
  color: var(--muted);
  font-size: 0.86rem;
  background: #fff;
}
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.footer-logo { justify-self: start; }
.footer-logo img { display: block; height: 40px; width: auto; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
}
.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-nav a:hover { color: var(--text); }
.footer-social {
  justify-self: end;
  display: flex;
  gap: 10px;
}
.footer-social a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--accent);
}
.footer-social a:hover { border-color: #cfcbc3; color: var(--sun); }
.footer-copy {
  max-width: 1140px;
  margin: 22px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-copy a { color: inherit; font-weight: 600; text-decoration: none; }
.footer-copy a:hover { color: var(--sun); }
@media (max-width: 800px) {
  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .footer-logo, .footer-social { justify-self: center; }
}

/* ===== Mobile product layout =====
   Order: title, subtitle, image carousel, price, stock, CTA buttons, specs, docs */
@media (max-width: 860px) {
  .product-hero { display: flex; flex-direction: column; gap: 0; align-items: stretch; }
  /* Flatten both columns so slider, price and buttons can interleave freely */
  .product-info, .product-hero .gallery { display: contents; }
  .product-info h1 { order: 1; }
  .product-info .subtitle { order: 2; }
  .gallery-thumbs { order: 3; margin-bottom: 12px; }
  .gallery-dots {
    display: flex; order: 3;
    justify-content: center; gap: 7px;
    margin-bottom: 26px;
  }
  .gallery-dot {
    width: 8px; height: 8px; border-radius: 999px;
    background: rgba(29, 53, 87, 0.18);
    transition: background 0.25s, width 0.25s;
  }
  .gallery-dot.active { width: 22px; background: var(--accent); }
  .product-info .price-label { order: 4; }
  .product-info .price-row { order: 5; }
  .product-info .stock { order: 6; }
  .product-info .cta-label { order: 7; }
  .product-info .cta-row { order: 8; margin-bottom: 24px; }
  .product-info .key-specs { order: 9; }
  .docs-title { order: 10; margin-top: 6px; }
  .docs-row { order: 11; }

  /* Full-width CTA buttons */
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { width: 100%; justify-content: center; text-align: center; }

  /* Swipeable image carousel instead of main image + thumbnails */
  .gallery-main { display: none; }
  .gallery-thumbs {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    margin-top: 0;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .gallery-thumbs::-webkit-scrollbar { display: none; }
  .gallery-thumbs button {
    flex: 0 0 88%;
    scroll-snap-align: center;
    background: #ffffff;
    border-radius: var(--radius);
  }
  .gallery-thumbs button:hover, .gallery-thumbs button.active { border-color: var(--border); box-shadow: none; }
  .gallery-thumbs img {
    height: 300px;
    object-fit: contain;
    padding: 16px;
  }
}

/* ===== Catalog page ===== */
.catalog { padding-bottom: 72px; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.catalog-trust {
  list-style: none;
  display: flex; flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 32px;
}
.catalog-trust li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px 8px 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.84rem; font-weight: 600;
}
.catalog-trust .trust-icon {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.catalog-trust .trust-icon svg { width: 14px; height: 14px; }
.catalog-filters {
  display: flex; flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 28px;
}
.catalog-filters button {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 16px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.catalog-filters button:hover { color: var(--text); border-color: #c4bbaa; }
.catalog-filters button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.catalog-filters .filter-count {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.72;
}
.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 720px) { .catalog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .catalog-grid { grid-template-columns: repeat(3, 1fr); } }
.catalog-card[hidden] { display: none; }
.catalog-empty {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.catalog-empty.is-visible { display: block; }
.catalog-empty h2 { font-size: 1.2rem; margin-bottom: 8px; }
.catalog-empty p { color: var(--muted); margin-bottom: 18px; }
.catalog-empty .btn { margin: 0 5px 8px; }
.catalog-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.catalog-card:hover { border-color: #c4bbaa; cursor: pointer; }
.catalog-media { position: relative; background: #fff; }
.catalog-image {
  width: 100%; height: 240px;
  object-fit: contain;
  display: block;
  padding: 36px 16px 12px;
}
.catalog-card-cover .catalog-image {
  padding: 0;
  height: 220px;
  object-fit: cover;
}
.catalog-tags {
  position: absolute; top: 12px; left: 12px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.catalog-tag {
  font-size: 0.72rem; font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--sun);
  color: #fff;
}
.catalog-tag.tag-soft {
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--border);
}
.catalog-tag.tag-right {
  position: absolute; top: 12px; right: 12px;
}
.catalog-body {
  padding: 20px 22px 22px;
  display: flex; flex-direction: column; flex: 1;
}
.catalog-card h2 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.catalog-specs { list-style: none; margin: 0 0 16px; }
.catalog-specs li {
  color: var(--muted); font-size: 0.9rem; padding: 4px 0;
  display: flex; align-items: flex-start; gap: 8px;
}
.catalog-specs li::before { content: "✓"; color: var(--sun); font-weight: 700; flex-shrink: 0; }
.catalog-price { margin-top: auto; font-size: 1.2rem; font-weight: 750; color: var(--accent); }
.catalog-price .price-from { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.catalog-price span { font-size: 0.8rem; font-weight: 400; color: var(--muted); }
.catalog-card .btn-detalii {
  display: inline-block;
  margin-top: 14px;
  color: var(--sun-deep); font-weight: 600; font-size: 0.92rem;
  text-decoration: none;
}
.catalog-card .btn-detalii::after { content: ""; position: absolute; inset: 0; }
.catalog-card:hover .btn-detalii { text-decoration: underline; }
.catalog-cta {
  margin-top: 40px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
}
.catalog-cta p { color: var(--muted); margin-bottom: 14px; }
.catalog-cta a:not(.btn) { color: var(--accent); font-weight: 600; text-decoration: none; }
.catalog-cta a:not(.btn):hover { text-decoration: underline; }
.catalog-cta .btn { display: inline-flex; margin-right: 10px; }
