/* ==========================================================================
   OMONYMA — Single product page (Classic Split)
   ========================================================================== */

.omh-pdp-crumb { padding: 1.2rem 3rem 0; font-size: 0.68rem; letter-spacing: 0.04em; color: var(--color-ink-soft); }
.omh-pdp-crumb a { color: inherit; }
.omh-pdp-crumb a:hover { color: var(--color-ink); }

.omh-pdp-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 1600px;
  margin-inline: auto;
  padding: 1.4rem 3rem 6rem;
  align-items: start;
}

/* Grid items default to min-width:auto, which respects a child's
   intrinsic content size — a wide non-wrapping row (e.g. gallery
   thumbnails) can silently force the whole column wider than the
   viewport. min-width:0 lets the column actually shrink to fit. */
.omh-pdp-gallery, .omh-pdp-info { min-width: 0; }

/* ---------- Gallery (real WooCommerce gallery markup, restyled) ---------- */
.omh-pdp-gallery { position: relative; }
.omh-pdp-gallery .woocommerce-product-gallery { position: relative; }
.omh-pdp-gallery .woocommerce-product-gallery__wrapper { margin: 0; padding: 0; list-style: none; }
.omh-pdp-gallery .woocommerce-product-gallery__image {
  aspect-ratio: 4/5; overflow: hidden; margin-bottom: 0.6rem;
}
.omh-pdp-gallery .woocommerce-product-gallery__image img {
  width: 100% !important; height: 100% !important; object-fit: cover !important;
  aspect-ratio: 4/5 !important;
}
.omh-pdp-gallery .flex-control-thumbs {
  display: flex !important; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0.6rem 0 0;
}
.omh-pdp-gallery .flex-control-thumbs li { width: 70px; }
.omh-pdp-gallery .flex-control-thumbs img {
  aspect-ratio: 4/5; object-fit: cover; cursor: pointer; opacity: 0.55; transition: opacity 0.2s var(--ease);
}
.omh-pdp-gallery .flex-control-thumbs img.flex-active,
.omh-pdp-gallery .flex-control-thumbs img:hover { opacity: 1; }
/* Hide Woodmart-less/plain lightbox chrome we don't need styled */
.omh-pdp-gallery .woocommerce-product-gallery__trigger { display: none; }

/* ---------- Info column ---------- */
.omh-pdp-info { padding: 0 0 0 3rem; }
.omh-pdp-back { display:inline-block; font-family:var(--font-ui); font-size:0.78rem; color:var(--color-ink-soft); text-decoration:none; margin-bottom:1rem; }
.omh-pdp-back:hover { color:var(--color-ink); }
.omh-pdp-info .eyebrow { font-size: 0.72rem; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-ink-soft); margin-bottom: 0.6rem; }
.omh-pdp-color-eyebrow { color: var(--color-ink); font-weight: 500; }
.omh-pdp-info h1.product_title {
  font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; margin: 0 0 0.4rem; line-height: 1.1;
}
.omh-pdp-info .price {
  font-family: var(--font-ui) !important; font-size: 1.05rem !important; color: var(--color-ink-soft) !important;
  margin-bottom: 1.8rem; display: block;
}
.omh-pdp-info .price ins { text-decoration: none; color: var(--color-ink) !important; }
.omh-pdp-info .price del { opacity: 0.5; margin-right: 0.5em; }

/* Stock / availability — WooCommerce's own real <p class="stock">
   (already reflecting the real restock-date countdown from
   inc/restock-date.php), restyled as a warm strip with a clock icon
   rather than plain text. */
.omh-pdp-info p.stock {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--color-bg-alt); padding: 0.8rem 1rem;
  font-family: var(--font-ui); font-size: 0.78rem; color: var(--color-ink-soft);
  margin: 0 0 1.8rem;
}
.omh-pdp-info p.stock::before {
  content: ""; flex-shrink: 0; width: 14px; height: 14px;
  background-color: var(--color-ink-soft);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.omh-pdp-info p.stock.in-stock::before { background-color: #6B7F5E; }

/* "X σε απόθεμα" is redundant for shoppers — hidden. Out-of-stock and
   restock-date messaging (same .stock element, different state) stay
   visible since those genuinely affect whether someone can buy. */
.omh-pdp-info p.stock.in-stock { display: none; }

/* ---------- Real WooCommerce variation form — functional core kept,
   default <table> visually replaced by our swatch/size buttons (built
   by assets/js/product-variations.js from the SAME <select> elements,
   so stock/price/image logic stays 100% native WooCommerce). ---------- */
.omh-pdp-info table.variations { display: none; }
.omh-var-group { margin-bottom: 1.6rem; }
.omh-var-label { font-size: 0.72rem; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-ink-soft); margin-bottom: 0.6rem; }

.omh-pdp-info .swatches { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.omh-color-name { display: block; font-size: 0.78rem; color: var(--color-ink-soft); margin-top: 0.7rem; min-height: 1.1em; }
.omh-pdp-info .swatch {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer;
  box-shadow: 0 0 0 1px var(--color-line) inset;
}
.omh-pdp-info .swatch.is-active { border-color: var(--color-ink); }
.omh-pdp-info .swatch[disabled] { opacity: 0.5; filter: blur(1.5px); cursor: not-allowed; }

.omh-pdp-info .sizes { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.omh-pdp-info .size-btn {
  font-family: var(--font-ui); font-size: 0.78rem; background: none; border: 1px solid var(--color-line);
  color: var(--color-ink); padding: 0.6rem 1rem; min-width: 44px; cursor: pointer; transition: all 0.2s var(--ease);
}
.omh-pdp-info .size-btn.is-active { background: var(--color-ink); color: var(--color-bg); border-color: var(--color-ink); }
.omh-pdp-info .size-btn:hover:not([disabled]) { border-color: var(--color-ink); }
.omh-pdp-info .size-btn[disabled] { opacity: 0.5; filter: blur(1.5px); cursor: not-allowed; }

.omh-pdp-info .single_variation_wrap { margin-bottom: 1.2rem; }
.omh-pdp-info .woocommerce-variation-price .price { margin-bottom: 0; }
.omh-pdp-info .woocommerce-variation-availability { font-size: 0.8rem; color: var(--color-ink-soft); margin-bottom: 1rem; }

.omh-pdp-info button.single_add_to_cart_button,
.omh-pdp-info button[name="add-to-cart"] {
  width: 100%; background: var(--color-ink) !important; color: var(--color-bg) !important; border: none !important;
  padding: 1.1rem !important; font-family: var(--font-ui) !important; font-size: 0.78rem !important;
  letter-spacing: 0.08em !important; text-transform: uppercase !important; font-weight: 500 !important;
  border-radius: 0 !important; cursor: pointer;
}
.omh-pdp-info button.single_add_to_cart_button:disabled { opacity: 0.4; cursor: not-allowed; }
/* Hidden until a full variation is selected (WooCommerce's own
   variation JS reveals it again via inline style at that point) —
   that existing behavior stays; only the visual style is new below. */
.omh-pdp-info .quantity { display: none; }
.omh-pdp-info .woocommerce-variation-add-to-cart { display: flex; align-items:center; gap:1.4rem; }

/* Minimal stepper — chosen from 5 mockups (Option 2): no borders, no
   box, just "− N +" in the site's own type, matching the general
   restraint of the rest of the product page. */
.omh-pdp-info .quantity.omh-qty-minimal{ display:flex; align-items:center; gap:1rem; }
.omh-pdp-info .omh-qty-btn{ background:none; border:none; font-family:var(--font-display); font-size:1.3rem; color:var(--color-ink); cursor:pointer; padding:0; line-height:1; width:24px; height:24px; }
.omh-pdp-info .omh-qty-btn:hover{ color:var(--tint, #B5734A); }
.omh-pdp-info .omh-qty-minimal input.qty{
	width:2rem; border:none; background:none; text-align:center; font-family:var(--font-ui); font-size:0.95rem; color:var(--color-ink);
	-moz-appearance:textfield; appearance:textfield; /* hide native spinner arrows */
}
.omh-pdp-info .omh-qty-minimal input.qty::-webkit-inner-spin-button,
.omh-pdp-info .omh-qty-minimal input.qty::-webkit-outer-spin-button{ -webkit-appearance:none; margin:0; }

/* ---------- Accordion (Description / Shipping) ---------- */
.omh-pdp-accordion { margin-top: 2.2rem; }
.omh-acc-item { border-top: 1px solid var(--color-line); }
.omh-acc-item:last-child { border-bottom: 1px solid var(--color-line); }
.omh-acc-row {
  display: flex; justify-content: space-between; align-items: center; padding: 1rem 0;
  background: none; border: none; width: 100%; text-align: left; cursor: pointer;
  font-family: var(--font-ui); font-size: 0.8rem; letter-spacing: 0.02em; text-transform: uppercase; color: var(--color-ink);
}
.omh-acc-plus { transition: transform 0.3s var(--ease); font-size: 1rem; }
.omh-acc-item.is-open .omh-acc-plus { transform: rotate(45deg); }
.omh-acc-panel { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
.omh-acc-item.is-open .omh-acc-panel { max-height: 400px; }
.omh-acc-panel .inner { padding-bottom: 1.4rem; font-size: 0.88rem; color: var(--color-ink-soft); line-height: 1.65; }

/* ==========================================================================
   Mobile product gallery — separate, lightweight swipe carousel (see
   assets/js/mobile-product-gallery.js). Hidden entirely on desktop;
   the desktop FlexSlider gallery is hidden entirely on mobile — only
   one of the two ever renders/runs at a time.
   ========================================================================== */
.omh-mobile-gallery, .omh-mg-lightbox { display: none; }

@media (min-width: 901px) {
  .omh-mg-track img.omh-mg-lazy { display: none; } /* never paid for on desktop even if markup is present */
}

@media (max-width: 900px) {
  .woocommerce-product-gallery { display: none !important; }

  .omh-mobile-gallery { display: block; position: relative; width: 100%; aspect-ratio: 4/5; overflow: hidden; background: var(--color-bg-alt, #EFEBE4); }
  .omh-mg-track { display: flex; width: 100%; height: 100%; touch-action: pan-y; }
  .omh-mg-slide { flex: 0 0 100%; width: 100%; height: 100%; }
  .omh-mg-img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; user-select: none; }
  .omh-mg-counter {
    position: absolute; bottom: 0.9rem; right: 0.9rem; background: rgba(20,19,17,0.55); color: #fff;
    font-family: var(--font-ui); font-size: 0.72rem; padding: 0.3rem 0.65rem; border-radius: 20px; pointer-events: none;
  }

  .omh-mg-lightbox {
    position: fixed; inset: 0; z-index: 900; background: var(--color-bg);
  }
  .omh-mg-lightbox.is-open { display: block; }
  .omh-mg-lb-track { display: flex; width: 100%; height: 100%; touch-action: pan-y; }
  .omh-mg-lb-track .omh-mg-slide { flex: 0 0 100%; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
  .omh-mg-lb-track img { max-width: 100%; max-height: 100%; object-fit: contain; -webkit-user-drag: none; user-select: none; }
  .omh-mg-lb-close {
    position: absolute; top: 1rem; right: 1rem; z-index: 901; background: none; border: none;
    font-size: 1.6rem; line-height: 1; color: var(--color-ink); padding: 0.4rem 0.6rem; cursor: pointer;
  }
  .omh-mg-lb-counter {
    position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%);
    font-family: var(--font-ui); font-size: 0.76rem; color: var(--color-ink-soft);
  }
}

@media (max-width: 900px) {
  .omh-pdp-wrap { grid-template-columns: 1fr; padding: 1.2rem 1.2rem 4rem; }
  .omh-pdp-info { padding: 1.8rem 0 0; }
  .omh-pdp-crumb { padding: 1rem 1.2rem 0; }
}
