/* ==========================================================================
   PAGINĂ · Produs
   Galerie + info (desktop 2 coloane / mobil 1), variații adaptive, acordeoane,
   recenzii, similare, sticky ATC. Layout-ul din mockup-ul aprobat.
   ========================================================================== */

@layer pages {

  .omn-product { padding-block: var(--omn-space-2) var(--omn-space-7); }

  .omn-product__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--omn-space-5);
    margin-top: var(--omn-space-3);
    min-width: 0;
  }
  @media (min-width: 900px) {
    .omn-product__layout {
      grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
      gap: var(--omn-space-7);
      align-items: start;
    }
  }

  /* ==================== GALERIA ==================== */
  .omn-gallery { position: sticky; top: calc(var(--omn-header-h) + var(--omn-space-4)); min-width: 0; }
  @media (max-width: 899px) { .omn-gallery { position: static; } }

  .omn-gallery__main {
    position: relative;
    aspect-ratio: var(--omn-ratio-product);
    border-radius: var(--omn-radius-lg);
    overflow: hidden;
    background: var(--omn-surface);   /* alb - produsul e pe fundal alb */
    touch-action: pan-y;              /* gestul orizontal = swipe imagine, nu scroll pagină */
  }
  .omn-gallery__slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;   /* slide-urile inactive nu blochează hover-ul */
    transition: opacity var(--omn-dur) var(--omn-ease);
  }
  .omn-gallery__slide.is-active {
    opacity: 1;
    pointer-events: auto;   /* DOAR slide-ul activ primește zoom-ul */
    z-index: 1;
  }
  .omn-gallery__img {
    width: 100%; height: 100%;
    object-fit: contain;    /* produsul ÎNTREG vizibil, nu decupat */
    transition: transform var(--omn-dur-fast) var(--omn-ease);
    will-change: transform;
  }
  .omn-gallery__slide.is-zooming { cursor: zoom-in; }

  /* Săgeți de navigare */
  .omn-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 40px; height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: var(--omn-text);
    box-shadow: var(--omn-shadow-sm);
    transition: background var(--omn-dur-fast), opacity var(--omn-dur-fast);
    opacity: 0;
  }
  .omn-gallery__main:hover .omn-gallery__nav { opacity: 1; }
  @media (hover: none) { .omn-gallery__nav { opacity: 1; } } /* mereu vizibile pe touch */
  .omn-gallery__nav:hover { background: #fff; }
  .omn-gallery__nav svg { width: 20px; height: 20px; stroke: currentColor; }
  .omn-gallery__nav--prev { left: 4px; }
  .omn-gallery__nav--prev svg { transform: rotate(180deg); }
  .omn-gallery__nav--next { right: 4px; }

  .omn-product__badge {
    position: absolute;
    top: var(--omn-space-3);
    left: var(--omn-space-3);
    background: var(--omn-accent);
    color: #fff;
    font-family: var(--omn-font-sans);
    font-size: var(--omn-fs-xs);
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--omn-radius-pill);
    z-index: 2;
  }
  .omn-product__heart {
    top: var(--omn-space-3);
    right: var(--omn-space-3);
    width: 42px; height: 42px;
  }

  .omn-gallery__dots {
    position: absolute;
    bottom: var(--omn-space-3);
    left: 0; right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 2;
  }
  @media (min-width: 900px) { .omn-gallery__dots { display: none; } }
  .omn-gallery__dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(26, 26, 26, 0.25);
    transition: background var(--omn-dur-fast);
  }
  .omn-gallery__dot.is-active { background: var(--omn-text); }

  .omn-gallery__thumbs {
    display: flex;
    gap: var(--omn-space-2);
    margin-top: var(--omn-space-3);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .omn-gallery__thumbs::-webkit-scrollbar { display: none; }
  .omn-gallery__thumb {
    flex: 0 0 auto;
    width: 64px; height: 64px;
    border-radius: var(--omn-radius-sm);
    overflow: hidden;
    border: 1.5px solid var(--omn-border);
    background: var(--omn-bg-alt);
    padding: 0;
    transition: border-color var(--omn-dur-fast);
  }
  .omn-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
  .omn-gallery__thumb.is-active { border-color: var(--omn-text); }
  .omn-gallery__thumb:hover { border-color: var(--omn-border-2); }

  /* ==================== INFO ==================== */
  .omn-product__info { min-width: 0; }
  .omn-product__eyebrow { margin-bottom: var(--omn-space-2); }
  .omn-product__title {
    font-family: var(--omn-font-sans);
    font-weight: 600;
    font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.55rem);
    line-height: 1.2;
    margin-bottom: var(--omn-space-3);
  }

  .omn-product__rating {
    display: inline-flex;
    align-items: center;
    gap: var(--omn-space-2);
    font-size: var(--omn-fs-sm);
    color: var(--omn-text-3);
    margin-bottom: var(--omn-space-4);
  }
  .omn-product__rating:hover { color: var(--omn-accent-strong); }

  /* Stele prin gradient - o singură tehnică, orice rating fracționar */
  .omn-stars {
    --omn-rating: 0;
    display: inline-block;
    font-size: 15px;
    line-height: 1;
    letter-spacing: 2px;
  }
  .omn-stars::before {
    content: '★★★★★';
    background: linear-gradient(
      90deg,
      var(--omn-gold) calc(var(--omn-rating) / 5 * 100%),
      var(--omn-border-2) calc(var(--omn-rating) / 5 * 100%)
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .omn-product__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 7px;
    font-family: var(--omn-font-sans);
    font-size: var(--omn-fs-lg);
    font-weight: 600;
    color: var(--omn-text);
    margin-bottom: var(--omn-space-4);
  }
  .omn-product__price .price { display: contents; }
  .omn-product__price ins { text-decoration: none; color: var(--omn-text); }
  .omn-product__price del {
    font-family: var(--omn-font-sans);
    font-size: 0.72em;
    font-weight: 400;
    color: var(--omn-text-3);
  }

  .omn-product__short {
    font-size: var(--omn-fs-base);
    color: var(--omn-text-2);
    line-height: var(--omn-lh-normal);
    margin-bottom: var(--omn-space-5);
    max-width: 48ch;
  }

  /* ============ VARIAȚII - UI-ul adaptiv (chips / labels) ============ */
  .omn-var { margin-bottom: var(--omn-space-4); }
  .omn-var__label {
    display: block;
    font-size: var(--omn-fs-sm);
    font-weight: 500;
    color: var(--omn-text);
    margin-bottom: var(--omn-space-2);
  }
  .omn-var__options { display: flex; flex-wrap: wrap; gap: var(--omn-space-2); }

  .omn-var__opt {
    font-family: var(--omn-font-sans);
    font-size: var(--omn-fs-base);
    color: var(--omn-text);
    background: var(--omn-surface);
    border: 1px solid var(--omn-border-2);
    border-radius: var(--omn-radius-sm);
    padding: 10px 14px;
    transition: border-color var(--omn-dur-fast), background var(--omn-dur-fast);
    min-width: 44px; /* țintă de atingere */
  }
  .omn-var__options--chips .omn-var__opt { padding: 10px 10px; text-align: center; }
  .omn-var__opt:hover { border-color: var(--omn-text); }
  .omn-var__opt[aria-checked="true"] {
    border: 1.5px solid #8FB59E;
    background: var(--omn-sage-bg);
    color: var(--omn-sage-ink);
  }
  .omn-var__opt.is-unavailable {
    color: var(--omn-border-2);
    text-decoration: line-through;
    border-color: var(--omn-border);
    cursor: not-allowed;
  }

  /* Chip-uri server-side: ascunse fără JS (se folosesc selecturile native),
     vizibile cu JS. Selecturile native se ascund DOAR cu JS (contract + no-JS). */
  .omn-vars { display: none; }
  .js .omn-vars { display: block; }
  .js .omn-product__form form.variations_form table.variations { display: none; }
  .omn-vars .omn-var:last-child { margin-bottom: 0; }

  /* Formularul nativ: layout curat pentru AMBELE tipuri de produs.
     - Simplu (form.cart fără .variations_form): qty + buton pe un rând.
     - Variabil: variațiile stivuite, apoi .woocommerce-variation-add-to-cart rând. */
  .omn-product__form form.cart:not(.variations_form) {
    display: flex;
    gap: var(--omn-space-3);
    align-items: stretch;
    flex-wrap: wrap;
  }
  .omn-product__form form.variations_form { display: block; }
  .omn-product__form,
  .omn-product__form form.cart,
  .omn-product__form .single_variation_wrap { max-width: 100%; min-width: 0; }
  .omn-product__form .woocommerce-variation-add-to-cart {
    display: flex;
    gap: var(--omn-space-3);
    align-items: stretch;
    margin-top: var(--omn-space-4);
    flex-wrap: wrap;
    max-width: 100%;
  }
  .omn-product__form .quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--omn-border-2);
    border-radius: var(--omn-radius-sm);
    overflow: hidden;
    flex: 0 0 auto;    /* compact - NU full width */
    width: auto;
    height: auto;
  }
  .omn-product__form .quantity .qty {
    width: 52px;
    border: none;
    text-align: center;
    font-size: var(--omn-fs-base);
    padding: 13px 4px;
    background: var(--omn-surface);
    -moz-appearance: textfield;
  }
  .omn-product__form .qty::-webkit-outer-spin-button,
  .omn-product__form .qty::-webkit-inner-spin-button { appearance: none; margin: 0; }

  .omn-product__form .single_add_to_cart_button {
    flex: 1 1 140px;
    min-width: 0;
    background: var(--omn-accent);      /* piersică - CTA ca pe LP */
    color: var(--omn-text-inv);
    border: none;
    border-radius: var(--omn-radius-sm);
    font-family: var(--omn-font-sans);
    font-size: var(--omn-fs-base);
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 13px 20px;
    cursor: pointer;
    transition: background var(--omn-dur-fast);
  }
  /* Produse VARIABILE: butonul pornește gri (fără flash portocaliu), devine
     piersică doar după ce JS confirmă o selecție validă (clasa .omn-var-ready). */
  .js .omn-product__form form.variations_form .single_add_to_cart_button {
    background: var(--omn-border-2);
  }
  .js .omn-product__form form.variations_form.omn-var-ready .single_add_to_cart_button {
    background: var(--omn-accent);
  }
  .omn-product__form .single_add_to_cart_button:hover { background: var(--omn-accent-mid); }
  .js .omn-product__form form.variations_form:not(.omn-var-ready) .single_add_to_cart_button:hover { background: var(--omn-border-2); }
  .omn-product__form .single_add_to_cart_button:disabled {
    background: var(--omn-border-2);
    cursor: not-allowed;
  }
  .omn-product__form .woocommerce-variation-price,
  .omn-product__form .woocommerce-variation-availability,
  .omn-product__form .reset_variations { display: none; }
  /* Descrierea variației - o afișăm în chiar elementul WooCommerce, o dată, stilizat.
     Prețul/disponibilitatea din el le ascundem (prețul îl afișăm noi). */
  /* Când varianta n-are descriere, nu arătăm cutia goală. */
  .omn-product__form .single_variation:not(:has(.woocommerce-variation-description)) { display: none !important; }
  .omn-product__form .single_variation {
    margin-top: var(--omn-space-3);
    padding: var(--omn-space-3);
    background: var(--omn-bg-alt);
    border-radius: var(--omn-radius-sm);
    font-size: var(--omn-fs-sm);
    color: var(--omn-text-2);
    line-height: var(--omn-lh-snug);
  }
  .omn-product__form .single_variation p:last-child { margin-bottom: 0; }

  /* Boxuri de încredere - grilă compactă (2 coloane), sub add-to-cart */
  .omn-trust {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--omn-space-2);
    margin-block: var(--omn-space-5) var(--omn-space-2);
  }
  .omn-trust__box {
    display: flex;
    align-items: center;          /* icon centrat vertical în card */
    gap: var(--omn-space-2);
    padding: var(--omn-space-3);
    border: 1px solid var(--omn-border);
    border-radius: var(--omn-radius);
    background: var(--omn-surface);
    min-width: 0;
  }
  .omn-trust__icon {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--omn-bg-alt);
    display: inline-flex; align-items: center; justify-content: center;
  }
  .omn-trust__icon svg { width: 16px; height: 16px; stroke: var(--omn-text-2); fill: none; }
  .omn-trust__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
  .omn-trust__title {
    font-size: var(--omn-fs-xs);
    font-weight: 600;
    color: var(--omn-text);
    line-height: 1.2;
  }
  .omn-trust__sub {
    font-size: 11px;
    color: var(--omn-text-3);
    line-height: 1.25;
  }

  /* Acordeoane (custom, ca peek-ul să funcționeze fiabil) */
  .omn-acc { border-bottom: 1px solid var(--omn-border); }
  .omn-acc__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--omn-space-4) 0;
    font-family: var(--omn-font-sans);
    font-size: var(--omn-fs-base);
    font-weight: 500;
    color: var(--omn-text);
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
  }
  .omn-acc__head svg { transform: rotate(90deg); transition: transform var(--omn-dur); stroke: var(--omn-text-3); }
  .omn-acc.is-open .omn-acc__head svg { transform: rotate(-90deg); }

  .omn-acc__body {
    padding-bottom: var(--omn-space-4);
    font-size: var(--omn-fs-base);
    color: var(--omn-text-2);
    line-height: var(--omn-lh-normal);
  }
  .omn-acc__body > * + * { margin-top: var(--omn-space-3); }

  /* Închis: „peek" - se vede o mostră din conținut, ștearsă în jos */
  .js .omn-acc:not(.is-open) .omn-acc__body {
    max-height: 2.7em;
    overflow: hidden;
    padding-bottom: var(--omn-space-3);
    -webkit-mask-image: linear-gradient(to bottom, #000 15%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 15%, transparent 100%);
    opacity: 0.7;
    pointer-events: none;
  }

  .omn-spec-table { width: 100%; border-collapse: collapse; font-size: var(--omn-fs-sm); table-layout: fixed; }
  .omn-spec-table td { word-break: break-word; }
  .omn-spec-table th, .omn-spec-table td {
    text-align: left;
    padding: var(--omn-space-2) 0;
    border-bottom: 1px solid var(--omn-hairline-soft);
  }
  .omn-spec-table th { color: var(--omn-text-3); font-weight: 400; width: 42%; }

  /* ==================== SIMILARE ==================== */
  .omn-related { margin-top: var(--omn-space-7); }
  .omn-related__title { font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.55rem); font-weight: 600; margin-bottom: var(--omn-space-5); }
  .omn-related__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--omn-space-3);
  }
  @media (min-width: 720px) { .omn-related__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--omn-space-4); } }

  /* ==================== STICKY ATC (mobil) ==================== */
  .omn-sticky-atc {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    gap: var(--omn-space-3);
    padding: var(--omn-space-3) var(--omn-gutter);
    padding-bottom: calc(var(--omn-space-3) + env(safe-area-inset-bottom, 0px));
    background: var(--omn-bg);
    border-top: 1px solid var(--omn-border);
    z-index: var(--omn-z-header);
    box-shadow: 0 -4px 20px rgba(26, 22, 15, 0.08);
  }
  @media (min-width: 900px) { .omn-sticky-atc { display: none; } }
  .omn-sticky-atc[hidden] { display: none; }
  .omn-sticky-atc__price {
    font-family: var(--omn-font-serif);
    font-size: var(--omn-fs-lg);
    font-weight: 600;
    white-space: nowrap;
  }
  .omn-sticky-atc__price del { display: block; font-family: var(--omn-font-sans); font-size: var(--omn-fs-xs); color: var(--omn-text-3); }
  .omn-sticky-atc__price ins { text-decoration: none; color: var(--omn-accent-strong); }
  .omn-sticky-atc__btn { flex: 1; background: var(--omn-accent); }
  .omn-sticky-atc__btn:hover { background: var(--omn-accent-mid); }
  .omn-sticky-atc__btn.is-disabled { opacity: 0.6; }
}

@layer pages {
  /* ==================== RECENZII (compact, în tab) ==================== */
  /* Buton review (partajat de trigger și de submitul din modală) - auriu, mic, fără efect de click */
  .omn-review-btn {
    display: inline-block;
    font-family: var(--omn-font-sans);
    font-size: var(--omn-fs-xs);
    font-weight: 500;
    color: var(--omn-text);
    background: transparent;
    border: 1px solid var(--omn-gold);
    border-radius: var(--omn-radius-pill);
    padding: 7px 16px;
    cursor: pointer;
    transition: background var(--omn-dur-fast), color var(--omn-dur-fast);
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
  }
  .omn-review-btn:hover { background: var(--omn-gold); color: #fff; }
  .omn-review-btn:active { transform: none; }        /* fără efect de click */
  .omn-review-btn:focus { outline: none; }
  .omn-review-btn:focus-visible { outline: 2px solid var(--omn-gold); outline-offset: 2px; }

  .omn-reviews__open { margin-left: auto; align-self: center; }
  @media (max-width: 560px) { .omn-reviews__open { margin-left: 0; } }
  .omn-reviews__login { color: var(--omn-text-2); font-size: var(--omn-fs-sm); }

  /* Modala de review - centrată pe centrul ecranului */
  .omn-review-modal {
    width: min(92vw, 520px);
    max-height: 90vh;
    overflow: auto;
    margin: auto;                 /* centrare orizontală + verticală */
    inset: 0;
    border: none;
    border-radius: var(--omn-radius-lg);
    padding: clamp(1.25rem, 4vw, 2rem);
    background: var(--omn-surface);
    color: var(--omn-text);
    box-shadow: 0 20px 60px rgba(26, 22, 15, 0.25);
  }
  .omn-review-modal::backdrop { background: rgba(26, 22, 15, 0.45); backdrop-filter: blur(2px); }
  .omn-review-modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--omn-space-4); }
  .omn-review-modal__title { font-size: var(--omn-fs-lg); margin: 0; }
  .omn-review-modal__close {
    background: none; border: 0; font-size: 26px; line-height: 1;
    color: var(--omn-text-3); cursor: pointer; padding: 0 4px;
  }
  .omn-review-modal__close:hover { color: var(--omn-text); }
  .omn-review-modal .omn-field:first-of-type { margin-top: 0; }

  .omn-reviews__summary {
    display: flex;
    align-items: center;
    gap: var(--omn-space-5);
    flex-wrap: wrap;
    margin-bottom: var(--omn-space-4);
  }
  .omn-reviews__score { display: flex; align-items: baseline; gap: var(--omn-space-2); }
  .omn-reviews__avg {
    font-family: var(--omn-font-serif);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1;
  }
  .omn-reviews__score .omn-stars { font-size: 15px; }
  .omn-reviews__total { font-size: var(--omn-fs-sm); color: var(--omn-text-3); }

  .omn-reviews__bars { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 200px; max-width: 320px; }
  .omn-reviews__bar-row {
    display: flex; align-items: center; gap: var(--omn-space-2);
    font-size: var(--omn-fs-xs); color: var(--omn-text-3);
  }
  .omn-reviews__bar-label { width: 22px; }
  .omn-reviews__bar { flex: 1; height: 5px; background: var(--omn-border); border-radius: 3px; overflow: hidden; }
  .omn-reviews__bar-fill { display: block; height: 100%; background: var(--omn-gold); }
  .omn-reviews__bar-pct { width: 32px; text-align: right; }

  .omn-reviews__list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--omn-space-3); margin-bottom: var(--omn-space-4); }
  .omn-review { padding: var(--omn-space-2) 0; border-bottom: 1px solid var(--omn-hairline-soft); }
  .omn-review__head { display: flex; align-items: center; gap: var(--omn-space-3); margin-bottom: 1px; }
  .omn-review__author { font-weight: 500; font-size: var(--omn-fs-base); }
  .omn-review__stars { font-size: 13px; }
  .omn-review__meta { display: flex; align-items: center; gap: var(--omn-space-3); font-size: var(--omn-fs-xs); color: var(--omn-text-3); margin-bottom: 4px; }
  .omn-review__verified { display: inline-flex; align-items: center; gap: 4px; color: var(--omn-sage-ink); }
  .omn-review__verified svg { stroke: var(--omn-sage); }
  .omn-review__text { font-size: var(--omn-fs-base); color: var(--omn-text-2); line-height: var(--omn-lh-normal); }
  .omn-review__text p { margin: 0; }

  .omn-reviews__pagination {
    margin-bottom: var(--omn-space-4);
    display: flex;
    flex-wrap: nowrap;           /* niciodată o săgeată singură pe rând nou */
    justify-content: safe center;
    gap: 6px;
    overflow-x: auto;            /* dacă sunt multe pagini, scroll orizontal fin */
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .omn-reviews__pagination::-webkit-scrollbar { display: none; }
  .omn-reviews__pagination .page-numbers { flex: 0 0 auto; }
  .omn-reviews__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px; height: 40px;
    padding-inline: var(--omn-space-2);
    border: 1px solid var(--omn-border-2);
    border-radius: var(--omn-radius-sm);
    font-size: var(--omn-fs-base);
    line-height: 1;
    color: var(--omn-text-2);
    background: var(--omn-surface);
    text-decoration: none;
    transition: border-color var(--omn-dur-fast), color var(--omn-dur-fast), background var(--omn-dur-fast);
  }
  .omn-reviews__pagination .page-numbers.prev,
  .omn-reviews__pagination .page-numbers.next {
    font-size: 20px;   /* săgeți vizibile complet */
    font-weight: 400;
    color: var(--omn-text);
  }
  .omn-reviews__pagination a.page-numbers:hover { border-color: #8FB59E; color: var(--omn-sage-ink); }
  .omn-reviews__pagination .page-numbers.current {
    background: #8FB59E;
    color: var(--omn-text-inv);
    border-color: #8FB59E;
  }
  .omn-reviews__empty { color: var(--omn-text-2); margin-bottom: var(--omn-space-4); }

  /* Formular recenzie - câmpuri clar delimitate, vizibile */
  /* Mesajul „Autentificat ca…" - discret, cu spațiu */
  .omn-review-modal .logged-in-as {
    font-size: var(--omn-fs-sm);
    color: var(--omn-text-3);
    margin-bottom: var(--omn-space-4);
  }
  .omn-review-modal .logged-in-as a { color: var(--omn-text-2); text-decoration: underline; text-underline-offset: 2px; }

  /* Mesaj de eroare - frumos, cu sens */
  .omn-reviews__error {
    background: #fdf0ec;
    border: 1px solid var(--omn-accent);
    color: var(--omn-accent-ink);
    font-size: var(--omn-fs-sm);
    padding: var(--omn-space-2) var(--omn-space-3);
    border-radius: var(--omn-radius-sm);
    margin-bottom: var(--omn-space-3);
  }

  .omn-field {
    background: var(--omn-surface);
    border: 1px solid var(--omn-border);
    border-radius: var(--omn-radius);
    padding: var(--omn-space-3) var(--omn-space-4);
    margin-bottom: var(--omn-space-3);
  }
  .omn-field__label {
    display: block;
    font-size: var(--omn-fs-sm);
    font-weight: 600;
    color: var(--omn-text);
    margin-bottom: var(--omn-space-2);
  }
  .omn-field--text textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--omn-border-2);
    border-radius: var(--omn-radius-sm);
    background: var(--omn-bg);
    font-family: var(--omn-font-sans);
    font-size: var(--omn-fs-base);
    resize: vertical;
  }
  .omn-field--text textarea:focus { outline: 2px solid var(--omn-accent-mid); outline-offset: 1px; border-color: transparent; }

  /* Restul câmpurilor native (nume/email/consimțământ) */
  .omn-review-modal label { font-size: var(--omn-fs-sm); font-weight: 500; margin-bottom: var(--omn-space-1); display: block; }
  .omn-review-modal input[type="text"],
  .omn-review-modal input[type="email"] {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--omn-border-2); border-radius: var(--omn-radius-sm);
    background: var(--omn-surface); font-family: var(--omn-font-sans); font-size: var(--omn-fs-base);
  }
  .comment-form-author, .comment-form-email { margin-bottom: var(--omn-space-3); }

  /* Star input: radio-uri ascunse + stele clicabile (hover/checked colorate) */
  .omn-star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
  .omn-star-input input { position: absolute; opacity: 0; width: 0; height: 0; }
  .omn-star-input label {
    font-size: 30px; line-height: 1; color: var(--omn-border-2); cursor: pointer;
    margin: 0; transition: color var(--omn-dur-fast);
  }
  .omn-star-input label:hover,
  .omn-star-input label:hover ~ label,
  .omn-star-input input:checked ~ label { color: var(--omn-gold); }
  .omn-star-input input:focus-visible + label { outline: 2px solid var(--omn-accent-mid); outline-offset: 2px; border-radius: 2px; }
  .omn-star-input.is-invalid label { color: var(--omn-accent); }

  .omn-review-modal .comment-form-cookies-consent {
    display: flex; align-items: center; gap: var(--omn-space-2);
    font-size: var(--omn-fs-sm); color: var(--omn-text-2); margin-bottom: var(--omn-space-3);
  }
  .omn-review-modal .comment-form-cookies-consent label { display: inline; margin: 0; font-weight: 400; }
}

@layer pages {
  .omn-reviews__inner.is-loading .omn-reviews__list { opacity: 0.45; transition: opacity var(--omn-dur) var(--omn-ease); }
}

@layer pages {
  /* Recent vizualizate - carusel orizontal (performant, CSS scroll-snap) */
  .omn-recent__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--omn-space-5); }
  .omn-recent .omn-related__title { margin-bottom: 0; }
  .omn-recent__nav { display: flex; gap: var(--omn-space-2); }
  .omn-recent__arrow {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--omn-border-2);
    border-radius: 50%;
    background: var(--omn-surface);
    cursor: pointer;
    transition: border-color var(--omn-dur-fast);
  }
  .omn-recent__arrow:hover { border-color: var(--omn-text); }
  .omn-recent__arrow svg { width: 18px; height: 18px; stroke: var(--omn-text); }
  .omn-recent__arrow[data-omn-recent-prev] svg { transform: rotate(180deg); }
  .omn-recent__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 3 * var(--omn-space-4)) / 4);
    gap: var(--omn-space-4);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .omn-recent__track::-webkit-scrollbar { display: none; }
  .omn-recent__track > * { scroll-snap-align: start; }
  @media (max-width: 900px) { .omn-recent__track { grid-auto-columns: calc((100% - var(--omn-space-3)) / 2.2); gap: var(--omn-space-3); } }
}



@layer pages {
  /* Lightbox - vizualizator de galerie elegant (nu „margini negre") */
  .omn-lightbox {
    width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh;
    margin: 0; padding: 0; border: 0;
    background: rgba(28, 24, 18, 0.94);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    color: #fff;
    flex-direction: column;
  }
  .omn-lightbox[open] { display: flex; }
  .omn-lightbox::backdrop { background: rgba(28, 24, 18, 0.6); }

  .omn-lightbox__bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: max(14px, env(safe-area-inset-top)) 18px 10px;
    flex: 0 0 auto;
  }
  .omn-lightbox__counter { font-size: var(--omn-fs-sm); letter-spacing: 0.08em; color: rgba(255,255,255,0.8); }
  .omn-lightbox__close {
    width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.1); border: 0; border-radius: 50%; color: #fff; cursor: pointer;
    -webkit-tap-highlight-color: transparent; transition: background var(--omn-dur-fast);
  }
  .omn-lightbox__close:hover { background: rgba(255,255,255,0.2); }
  .omn-lightbox__close svg { stroke: #fff; }

  .omn-lightbox__stage {
    flex: 1 1 auto; min-height: 0;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; touch-action: none; position: relative;
  }
  .omn-lightbox__img {
    max-width: 92%; max-height: 100%;
    object-fit: contain;
    transform-origin: center center;
    transition: transform var(--omn-dur) var(--omn-ease);
    will-change: transform; user-select: none; -webkit-user-drag: none;
    cursor: zoom-in;
  }
  .omn-lightbox__img.is-zoomed { cursor: grab; transition: none; }

  .omn-lightbox__hint {
    position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: var(--omn-radius-pill);
    background: rgba(255,255,255,0.14); color: #fff;
    font-size: var(--omn-fs-sm); white-space: nowrap;
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    transition: opacity var(--omn-dur) var(--omn-ease);
    pointer-events: none;
  }
  .omn-lightbox__hint svg { stroke: #fff; }
  .omn-lightbox__hint.is-hidden { opacity: 0; }

  .omn-lightbox__nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 2;
    width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.1); border: 0; border-radius: 50%; color: #fff; cursor: pointer;
    -webkit-tap-highlight-color: transparent; transition: background var(--omn-dur-fast);
  }
  .omn-lightbox__nav:hover { background: rgba(255,255,255,0.22); }
  .omn-lightbox__nav svg { stroke: #fff; width: 24px; height: 24px; }
  .omn-lightbox__nav--prev { left: 12px; }
  .omn-lightbox__nav--prev svg { transform: rotate(180deg); }
  .omn-lightbox__nav--next { right: 12px; }

  .omn-lightbox__thumbs {
    flex: 0 0 auto;
    display: flex; gap: 8px; justify-content: center;
    padding: 12px 16px max(14px, env(safe-area-inset-bottom));
    overflow-x: auto; scrollbar-width: none;
  }
  .omn-lightbox__thumbs::-webkit-scrollbar { display: none; }
  .omn-lightbox__thumb {
    flex: 0 0 auto; width: 54px; height: 54px;
    border-radius: var(--omn-radius-sm); overflow: hidden;
    border: 2px solid transparent; background: rgba(255,255,255,0.08);
    padding: 0; cursor: pointer; opacity: 0.6; transition: opacity var(--omn-dur-fast), border-color var(--omn-dur-fast);
  }
  .omn-lightbox__thumb img { width: 100%; height: 100%; object-fit: cover; }
  .omn-lightbox__thumb.is-active { opacity: 1; border-color: #fff; }
  .omn-lightbox__thumb:hover { opacity: 1; }
  @media (max-width: 560px) { .omn-lightbox__nav { width: 40px; height: 40px; } .omn-lightbox__thumb { width: 46px; height: 46px; } }
}

@layer pages {
  /* Ghid mărimi - link lângă label + modal */
  .omn-var__labelrow { display: flex; align-items: center; justify-content: space-between; gap: var(--omn-space-3); margin-bottom: var(--omn-space-2); }
  .omn-var__labelrow .omn-var__label { margin-bottom: 0; }
  .omn-var__guide {
    background: none; border: 0; padding: 0; cursor: pointer;
    font-family: var(--omn-font-sans); font-size: var(--omn-fs-sm); color: var(--omn-text-3);
    text-decoration: underline; text-underline-offset: 2px;
    -webkit-tap-highlight-color: transparent;
  }
  .omn-var__guide:hover { color: var(--omn-accent-strong); }

  .omn-sgm {
    width: min(94vw, 560px); max-height: 88vh; overflow: auto;
    margin: auto; inset: 0;
    border: 0; border-radius: var(--omn-radius-lg);
    padding: 0;
    background: var(--omn-surface); color: var(--omn-text);
    box-shadow: 0 20px 60px rgba(26, 22, 15, 0.25);
  }
  .omn-sgm::backdrop { background: rgba(26, 22, 15, 0.45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
  .omn-sgm__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--omn-space-4) var(--omn-space-5);
    border-bottom: 1px solid var(--omn-border); position: sticky; top: 0; background: var(--omn-surface);
  }
  .omn-sgm__title { font-size: var(--omn-fs-lg); margin: 0; }
  .omn-sgm__close { background: none; border: 0; cursor: pointer; color: var(--omn-text-3); display: inline-flex; -webkit-tap-highlight-color: transparent; }
  .omn-sgm__close:hover { color: var(--omn-text); }
  .omn-sgm__body { padding: var(--omn-space-5); }

  .omn-sgm__table { width: 100%; border-collapse: collapse; font-size: var(--omn-fs-sm); margin-bottom: var(--omn-space-5); }
  .omn-sgm__table th, .omn-sgm__table td { padding: var(--omn-space-2) var(--omn-space-3); text-align: left; border-bottom: 1px solid var(--omn-hairline-soft); }
  .omn-sgm__table th { color: var(--omn-text-3); font-weight: 500; }
  .omn-sgm__table td:first-child { font-weight: 500; }

  .omn-sgm__guide-title { font-size: var(--omn-fs-base); font-weight: 600; margin-bottom: var(--omn-space-3); }
  .omn-sgm__guide-list { padding-left: 1.25em; display: flex; flex-direction: column; gap: var(--omn-space-2); font-size: var(--omn-fs-sm); color: var(--omn-text-2); line-height: var(--omn-lh-snug); }
  .omn-sgm__tips { margin-top: var(--omn-space-4); display: flex; flex-direction: column; gap: var(--omn-space-2); }
  .omn-sgm__tip { font-size: var(--omn-fs-sm); color: var(--omn-text-2); background: var(--omn-bg-alt); padding: var(--omn-space-3); border-radius: var(--omn-radius-sm); margin: 0; }
  .omn-sgm__tip strong { color: var(--omn-text); }
}
