/* =============================================================
   Product Viewer — [empyra_product_viewer]
   Coupled gallery + variant selectors + add-to-cart.
   Single column layout — width is constrained by the parent.
   ============================================================= */

/* Bottom breathing room: the wishlist buttons and reviews are separate
   Elementor widgets stacked straight after this component. */
.epv { width: 100%; margin-bottom: 12px; }

/* ── Gallery ──────────────────────────────────────────────── */
.epv__gallery { margin-bottom: 16px; }

.epv__main-wrap {
  width: 100%;
  border-radius: var(--emp-r-card, 12px);
  overflow: hidden;
  background: var(--emp-cream, #FAF8F3);
  margin-bottom: 10px;
}

/* Full width from Elementor, fixed height here, image cropped to fill it.
   The height is stated on the image itself — the theme's img { height: auto }
   outranked a percentage and left the image short of its frame. Retune with
   --epv-media-height on .epv. */
.epv .epv__main-img {
  width: 100%;
  height: var(--epv-media-height, 700px);
  object-fit: cover;
  object-position: center top;
  display: block;
  max-width: none;
  transition: opacity 0.2s;
}

/* The column caps at 650px, so this is a portrait frame at every width the
   viewer actually gets; phones just need less of it. */
@media (max-width: 600px) {
  .epv { --epv-media-height: 520px; }
}

/* Thumbs — horizontal scroll row */
.epv__thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.epv__thumbs::-webkit-scrollbar { display: none; }

.epv__thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--emp-border, #E8E4DC);
  background: var(--emp-cream, #FAF8F3);
  padding: 0;
  cursor: pointer;
  transition: border-color 0.15s;
}
.epv__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.epv__thumb:hover { border-color: var(--emp-muted, #7A7A7A); }
.epv__thumb--active { border-color: var(--emp-coral, #E07856); border-width: 2px; }

/* ── Product info ─────────────────────────────────────────── */
.epv__info {}

.epv__short-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--emp-muted, #6B7280);
  margin: 0 0 16px;
}

.epv__short-desc p {
  margin: 0 0 8px;
}

.epv__short-desc p:last-child {
  margin-bottom: 0;
}

.epv__brand a {
  color: inherit;
  text-decoration: none;
}

.epv__brand a:hover {
  text-decoration: underline;
}

.epv__brand-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--emp-teal, #2C5F6F);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.epv__brand-more:hover {
  opacity: 0.7;
}

.epv__brand {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--emp-teal, #2C5F6F);
  margin: 0 0 6px;
}

.epv__title {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--emp-font-heading);
  color: var(--emp-charcoal, #2D2D2D);
  margin: 0 0 10px;
  line-height: 1.2em;
}

.epv__tax-note {
  font-size: 12px;
  font-weight: 400;
  color: var(--emp-muted, #9CA3AF);
}

/* ── Price ────────────────────────────────────────────────── */
.epv__price {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  font-size: 20px;
  font-weight: 700;
}
.epv__price .woocommerce-Price-amount { font-size: inherit; font-weight: inherit; }
.epv__price-sale    { color: var(--emp-coral, #E07856); }
.epv__price-regular { color: var(--emp-charcoal, #2D2D2D); }
.epv__price-strike  { font-size: 14px; font-weight: 400; color: var(--emp-muted, #7A7A7A); text-decoration: line-through; }

/* ── Attributes ───────────────────────────────────────────── */
.epv__attr {
  margin-bottom: 16px;
}

.epv__attr-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--emp-muted, #7A7A7A);
  margin-bottom: 8px;
}

.epv__color-name {
  font-size: 12px;
  color: var(--emp-charcoal, #2D2D2D);
  font-weight: 500;
  margin-left: 8px;
}

.epv__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Size chips */
.epv__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border: 1.5px solid var(--emp-border, #E8E4DC);
  border-radius: var(--emp-r-btn, 24px);
  background: var(--emp-cream, #FAF8F3);
  color: var(--emp-charcoal, #2D2D2D);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.epv__chip:hover { border-color: var(--emp-coral, #E07856); color: var(--emp-coral, #E07856); }
.epv__chip--selected {
  background: var(--emp-charcoal, #2D2D2D);
  border-color: var(--emp-charcoal, #2D2D2D);
  color: #fff;
}

/* Size fit highlight */
.epv__chip--fit {
  border-color: var(--emp-coral);
  border-width: 2px;
  color: var(--emp-coral);
  position: relative;
}
.epv__chip--fit::after {
  content: attr(data-fit);
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  background: var(--emp-coral);
  border-radius: 4px;
  padding: 1px 4px;
  white-space: nowrap;
  pointer-events: none;
}

/* Color swatches */
.epv__chip--swatch {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--emp-border, #E8E4DC);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.3);
}
.epv__chip--swatch:hover { border-color: var(--emp-charcoal, #2D2D2D); }
.epv__chip--swatch.epv__chip--selected {
  border-color: var(--emp-charcoal, #2D2D2D);
  box-shadow: 0 0 0 3px var(--emp-charcoal, #2D2D2D), inset 0 0 0 2px rgba(255,255,255,0.3);
  background: inherit;
  color: inherit;
}

/* ── ATC row ──────────────────────────────────────────────── */
.epv__atc-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

/* Qty stepper */
.epv__qty {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--emp-border, #E8E4DC);
  border-radius: var(--emp-r-btn, 24px);
  overflow: hidden;
  flex-shrink: 0;
}
.epv__qty-btn {
  width: 36px;
  height: 44px;
  border: none;
  background: var(--emp-cream, #FAF8F3);
  color: var(--emp-charcoal, #2D2D2D);
  font-size: 18px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}
.epv__qty-btn:hover { background: var(--emp-border, #E8E4DC); }
.epv__qty-input {
  width: 40px;
  height: 44px;
  border: none;
  border-left: 1px solid var(--emp-border, #E8E4DC);
  border-right: 1px solid var(--emp-border, #E8E4DC);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--emp-charcoal, #2D2D2D);
  background: #fff;
  outline: none;
  -moz-appearance: textfield;
}
.epv__qty-input::-webkit-outer-spin-button,
.epv__qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Add to Cart button */
.epv__btn {
  flex: 1;
  height: 44px;
  background: var(--emp-coral, #E07856);
  color: #fff;
  border: none;
  border-radius: var(--emp-r-btn, 24px);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.epv__btn:hover:not(:disabled) { opacity: 0.88; transform: translateY(-1px); }
.epv__btn:active { transform: translateY(0); }
.epv__btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Feedback ─────────────────────────────────────────────── */
.epv__feedback {
  margin-top: 10px;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--emp-r-input, 8px);
}
.epv__feedback[hidden] { display: none; }
.epv__feedback--ok    { background: #E1F4EA; color: #14612F; }
.epv__feedback--error { background: #FEF2F2; color: #dc2626; }

/* ── Plain attributes (simple products) ───────────────────── */
/* Read-only: a single product's colour and size are facts, not choices. */
.epv__specs {
  margin-bottom: 18px;
  border-top: 1px solid var(--emp-border, #E8E4DC);
}

.epv__spec {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--emp-border, #E8E4DC);
}

.epv__spec-label {
  flex: 0 0 92px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--emp-muted, #7A7A7A);
}

.epv__spec-value {
  font-size: 14px;
  color: var(--emp-charcoal, #2D2D2D);
}

.epv__spec-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: -1px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

/* ── Discounts [empyra_discounts] ─────────────────────────── */
.epd {
  margin: 18px 0;
}

.epd__title {
  font-family: var(--emp-font-heading);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--emp-charcoal, #2D2D2D);
  margin: 0 0 10px;
}

.epd__cards {
  display: grid;
  gap: 10px;
}

.epd__card {
  border: 1px dashed var(--emp-teal, #2C5F6F);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(44, 95, 111, 0.03);
}

.epd__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.epd__amount {
  font-family: var(--emp-font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--emp-coral, #E07856);
}

.epd__code {
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--emp-teal, #2C5F6F);
  color: #fff;
  border-radius: 4px;
  padding: 2px 8px;
}

.epd__scope {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--emp-teal, #2C5F6F);
  margin: 6px 0 0;
}

.epd__desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--emp-charcoal, #2D2D2D);
  margin: 6px 0 0;
}

.epd__conds {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.epd__conds li {
  font-size: 11px;
  line-height: 1.4;
  color: var(--emp-teal, #2C5F6F);
  background: rgba(44, 95, 111, 0.08);
  border-radius: 999px;
  padding: 2px 8px;
}

.epd__expiry {
  font-size: 11px;
  color: var(--emp-muted, #9CA3AF);
  margin: 8px 0 0;
}
