/*
 * Rovnek — Single Product
 * Requiere tokens de header.css (--rvk-*) ya encolado en páginas internas.
 */

/* ── TOKENS LOCALES (complementan header.css) ──────────────────────────────── */
:root {
  --rvk-off-white: #F7F6F4;
  --rvk-light:     #EEECE9;
  --rvk-dur:       0.4s;
}

/* ── NEUTRALIZAR WRAPPERS DE DIVI ──────────────────────────────────────────── */
body.single-product #page-container,
body.single-product #main-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
  max-width: 100% !important;
}
body.single-product .et_pb_section,
body.single-product .et_pb_row {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ── PÁGINA PRODUCTO ────────────────────────────────────────────────────────── */
.rvk-sp-page {
  display: block;
}

/* ── BREADCRUMB ─────────────────────────────────────────────────────────────── */
.rvk-sp-bc {
  border-bottom: 1px solid var(--rvk-border);
}
.rvk-sp-bc-inner {
  max-width: var(--rvk-max, 1400px);
  margin: 0 auto;
  padding: 12px 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--rvk-muted);
}
.rvk-sp-bc-inner a {
  color: var(--rvk-muted);
  transition: color 0.2s;
}
.rvk-sp-bc-inner a:hover { color: var(--rvk-text); }
.rvk-sp-bc-inner span[aria-current] { color: var(--rvk-text); }

/* ── GRID PRINCIPAL ─────────────────────────────────────────────────────────── */
.rvk-sp {
  max-width: var(--rvk-max, 1400px);
  margin: 0 auto;
  padding: 48px 40px 80px;
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 0 5vw;
  align-items: start;
}

/* ── GALERÍA ────────────────────────────────────────────────────────────────── */
.rvk-gallery {
  display: grid;
  grid-template-columns: 72px 1fr;
  grid-template-rows: 1fr auto;
  gap: 0 10px;
}
.rvk-gallery[data-count="1"] {
  grid-template-columns: 1fr;
}
.rvk-gallery[data-count="1"] .rvk-gallery-thumbs {
  display: none;
}

/* Thumbnails */
.rvk-gallery-thumbs {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rvk-gallery-thumb {
  width: 72px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1.5px solid transparent;
  transition: border-color 0.2s;
  background: var(--rvk-off-white);
  cursor: pointer;
  padding: 0;
  display: block;
}
.rvk-gallery-thumb.is-active  { border-color: var(--rvk-text); }
.rvk-gallery-thumb:focus-visible { outline: 2px solid var(--rvk-gold); outline-offset: 2px; }
.rvk-gallery-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--rvk-ease);
}
@media (hover: hover) {
  .rvk-gallery-thumb:hover img { transform: scale(1.06); }
}

/* Main viewport */
.rvk-gallery-main {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  background: var(--rvk-off-white);
  cursor: zoom-in;
}
.rvk-gallery-slide {
  display: none;
}
.rvk-gallery-slide.is-active {
  display: block;
  animation: rvk-fade 0.35s var(--rvk-ease);
}
@keyframes rvk-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.rvk-gallery-slide img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* Zoom button */
.rvk-gallery-zoom {
  position: absolute;
  bottom: 14px; right: 14px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--rvk-text);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
}
@media (hover: hover) {
  .rvk-gallery-main:hover .rvk-gallery-zoom { opacity: 1; }
}
.rvk-gallery-zoom:focus-visible {
  opacity: 1;
  outline: 2px solid var(--rvk-gold);
}

/* Dots (mobile solamente, hidden desktop) */
.rvk-gallery-dots {
  display: none;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  grid-column: 1 / -1;
}
.rvk-gallery-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--rvk-border);
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}
.rvk-gallery-dot.is-active {
  background: var(--rvk-text);
  transform: scale(1.5);
}
.rvk-gallery-dot:focus-visible { outline: 2px solid var(--rvk-gold); }

/* ── PANEL DE INFORMACIÓN ────────────────────────────────────────────────────── */
.rvk-sp-info {
  position: sticky;
  top: calc(var(--rvk-hdr-h, 72px) + 24px);
  max-height: calc(100dvh - var(--rvk-hdr-h, 72px) - 48px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0 48px;
}
.rvk-sp-info::-webkit-scrollbar { display: none; }

/* Etiqueta categoría */
.rvk-sp-cat-label {
  font-family: var(--rvk-font-b, 'DM Sans', sans-serif);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rvk-muted);
  margin-bottom: 10px;
}

/* Título H1 */
.rvk-sp-title {
  font-family: var(--rvk-font-d, 'Cormorant Garamond', serif);
  font-size: clamp(1.9rem, 2.4vw, 2.6rem);
  font-weight: 300;
  letter-spacing: 0.015em;
  line-height: 1.2;
  color: var(--rvk-text);
  margin-bottom: 16px;
}

/* ── PRECIO PREMIUM ──────────────────────────────────────────────────────────── */
.rvk-sp-price {
  margin-bottom: 24px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
}

/* Precio único (sin oferta) */
.rvk-sp-price .price {
  font-family: var(--rvk-font-d, 'Cormorant Garamond', serif);
  font-size: clamp(1.9rem, 2.6vw, 2.6rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--rvk-text, #1A1917);
  line-height: 1;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
}

/* Precio tachado (precio original en oferta) */
.rvk-sp-price .price del {
  font-family: var(--rvk-font-d, 'Cormorant Garamond', serif);
  font-size: clamp(1.15rem, 1.5vw, 1.45rem);
  font-weight: 300;
  color: var(--rvk-muted, #7A7570);
  text-decoration: line-through;
  text-decoration-color: currentColor;
  opacity: 0.75;
  letter-spacing: 0.02em;
  line-height: 1;
}
.rvk-sp-price .price del .woocommerce-Price-amount {
  color: var(--rvk-muted, #7A7570);
}

/* Precio de oferta (precio real con descuento) */
.rvk-sp-price .price ins {
  text-decoration: none;
  font-family: var(--rvk-font-d, 'Cormorant Garamond', serif);
  font-size: clamp(1.9rem, 2.6vw, 2.6rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1;
}
.rvk-sp-price .price ins .woocommerce-Price-amount {
  color: var(--rvk-gold, #C8A97E);
}

/* Símbolo de moneda ligeramente más pequeño para refinamiento tipográfico */
.rvk-sp-price .price .woocommerce-Price-currencySymbol {
  font-size: 0.62em;
  vertical-align: super;
  letter-spacing: 0;
  margin-right: 1px;
}

/* Precio de variación (se actualiza dinámicamente) */
.rvk-sp-form .woocommerce-variation-price .price {
  font-family: var(--rvk-font-d, 'Cormorant Garamond', serif);
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--rvk-text, #1A1917);
}

/* Precio de la sticky bar (mantiene DM Sans compacto) */
.rvk-sp-sticky-price .price {
  font-family: var(--rvk-font-b, 'DM Sans', sans-serif);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
}
.rvk-sp-sticky-price .price .woocommerce-Price-currencySymbol {
  font-size: 1em;
  vertical-align: baseline;
}

.rvk-sp-price .woocommerce-Price-amount { font-variant-numeric: tabular-nums; }

/* Descripción corta */
.rvk-sp-short-desc {
  font-size: 0.875rem;
  color: var(--rvk-muted);
  line-height: 1.75;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--rvk-border);
  padding-bottom: 28px;
}
.rvk-sp-short-desc p { margin-bottom: 8px; }
.rvk-sp-short-desc p:last-child { margin-bottom: 0; }
.rvk-sp-short-desc ul {
  list-style: disc;
  padding-left: 18px;
}
.rvk-sp-short-desc li { margin-bottom: 4px; }

/* ── FORMULARIO WOOCOMMERCE ──────────────────────────────────────────────────── */
.rvk-sp-form {
  margin-bottom: 12px;
}
.rvk-sp-form form.cart { display: flex; flex-direction: column; gap: 0; }

/* Variación: disponibilidad y precio tras seleccionar */
.rvk-sp-form .variations { margin-bottom: 20px; }
.rvk-sp-form .woocommerce-variation-availability {
  font-family: var(--rvk-font-b, sans-serif);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rvk-muted);
  margin-bottom: 8px;
}
.rvk-sp-form .woocommerce-variation-price {
  padding-bottom: 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--rvk-border);
}
.rvk-sp-form .woocommerce-variation-price .price {
  font-size: clamp(1.7rem, 2.4vw, 2.2rem) !important;
  color: var(--rvk-text, #1A1917) !important;
}

/* Cantidad */
.rvk-sp-form .quantity {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--rvk-text);
  width: fit-content;
  height: 50px;
  background: transparent;
  margin-bottom: 10px;
}
.rvk-sp-form input.qty {
  width: 54px; height: 100%;
  text-align: center;
  border: none;
  background: transparent;
  font-family: var(--rvk-font-b, sans-serif);
  font-size: 0.9rem;
  color: var(--rvk-text);
  -moz-appearance: textfield;
}
.rvk-sp-form input.qty::-webkit-inner-spin-button,
.rvk-sp-form input.qty::-webkit-outer-spin-button { -webkit-appearance: none; }
.rvk-sp-form input.qty:focus { outline: none; }

/* Botones +/− inyectados por JS (usan SVG) */
.rvk-qty-btn {
  width: 46px;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--rvk-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.rvk-qty-minus { border-right: 1px solid var(--rvk-border); }
.rvk-qty-plus  { border-left:  1px solid var(--rvk-border); }
@media (hover: hover) {
  .rvk-qty-btn:hover:not(:disabled) { background: var(--rvk-off-white, #F7F6F4); }
}
.rvk-qty-btn:focus-visible { outline: 2px solid var(--rvk-gold); outline-offset: -2px; }
.rvk-qty-btn:disabled { opacity: 0.22; cursor: default; }

/* ── BOTÓN AÑADIR AL CARRITO ─────────────────────────────────────────────────── */
.rvk-sp-form .single_add_to_cart_button,
.woocommerce .rvk-sp-form button.button.alt,
.woocommerce .rvk-sp-form a.button.alt {
  width: 100% !important;
  min-height: 52px !important;
  background: var(--rvk-text, #1A1917) !important;
  color: #fff !important;
  font-family: var(--rvk-font-b, 'DM Sans', sans-serif) !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: background 0.3s ease, color 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  position: relative;
  margin-bottom: 10px;
  padding: 0 !important;
}
@media (hover: hover) {
  .rvk-sp-form .single_add_to_cart_button:hover:not(:disabled):not(.loading),
  .woocommerce .rvk-sp-form button.button.alt:hover:not(:disabled):not(.loading) {
    background: var(--rvk-gold, #C8A97E) !important;
    color: var(--rvk-text, #1A1917) !important;
  }
}
.rvk-sp-form .single_add_to_cart_button:disabled { opacity: 0.4; cursor: not-allowed; }
.rvk-sp-form .single_add_to_cart_button:focus-visible { outline: 2px solid var(--rvk-gold); outline-offset: 2px; }
.rvk-sp-form .single_add_to_cart_button.loading {
  pointer-events: none;
  background: var(--rvk-text, #1A1917) !important;
  color: transparent !important;
}
.rvk-sp-form .single_add_to_cart_button.loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rvk-spin 0.6s linear infinite;
}
@keyframes rvk-spin { to { transform: rotate(360deg); } }

/* ── BOTÓN COMPRAR AHORA ─────────────────────────────────────────────────────── */
.rvk-buy-now-btn {
  width: 100%; min-height: 52px;
  margin-bottom: 10px;
  background: #fff;
  color: var(--rvk-text, #1A1917);
  font-family: var(--rvk-font-b, 'DM Sans', sans-serif);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1.5px solid var(--rvk-text, #1A1917);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, opacity 0.2s;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  position: relative;
}
@media (hover: hover) {
  .rvk-buy-now-btn:hover:not(:disabled):not(.loading) {
    background: var(--rvk-off-white, #F7F6F4);
  }
}
.rvk-buy-now-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: var(--rvk-border, #E2DDD8);
  color: var(--rvk-muted, #7A7570);
}
.rvk-buy-now-btn:focus-visible { outline: 2px solid var(--rvk-gold); outline-offset: 2px; }
.rvk-buy-now-btn.loading {
  pointer-events: none;
  color: transparent;
}
.rvk-buy-now-btn.loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 1.5px solid rgba(26,25,23,0.25);
  border-top-color: var(--rvk-text, #1A1917);
  border-radius: 50%;
  animation: rvk-spin 0.6s linear infinite;
}

/* Variaciones (productos variables) */
.rvk-sp-form .variations {
  width: 100%;
  border-collapse: collapse;
}
.rvk-sp-form .variations tr { display: block; margin-bottom: 18px; }
.rvk-sp-form .variations td { display: block; padding: 0; }
.rvk-sp-form .variations td.label {
  font-family: var(--rvk-font-b, sans-serif);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rvk-muted);
  margin-bottom: 10px;
}
.rvk-sp-form .variations td.label label {
  font-weight: 400;
  font-size: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}
.rvk-sp-form .variations td.value select {
  width: 100%;
  border: 1.5px solid var(--rvk-border);
  background: #fff;
  font-family: var(--rvk-font-b, sans-serif);
  font-size: 0.875rem;
  color: var(--rvk-text);
  padding: 11px 36px 11px 14px;
  border-radius: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231A1917' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
}
.rvk-sp-form .reset_variations {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rvk-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  margin-top: 8px;
}

/* ── SELECTOR DE TALLA / MEDIDA (botones tipo Zara) ─────────────────────────── */
.rvk-size-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rvk-size-opt {
  min-width: 48px;
  height: 46px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--rvk-border);
  background: transparent;
  font-family: var(--rvk-font-b, 'DM Sans', sans-serif);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--rvk-text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  line-height: 1;
}
@media (hover: hover) {
  .rvk-size-opt:not(:disabled):not(.is-unavailable):hover {
    border-color: var(--rvk-text);
  }
}
.rvk-size-opt.is-selected {
  border-color: var(--rvk-text);
  background: var(--rvk-text);
  color: #fff;
}
.rvk-size-opt.is-unavailable,
.rvk-size-opt[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
  text-decoration: line-through;
  pointer-events: none;
}
.rvk-size-opt:focus-visible {
  outline: 2px solid var(--rvk-gold);
  outline-offset: 2px;
}

/* ── CTA WHATSAPP ────────────────────────────────────────────────────────────── */
.rvk-sp-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 52px;
  background: #EBF5EB;
  border: 1.5px solid #5A9E5A;
  font-family: var(--rvk-font-b, sans-serif);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2B6B2B;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  margin-bottom: 36px;
}
.rvk-sp-wa svg { color: #3D7C47; flex-shrink: 0; }
@media (hover: hover) {
  .rvk-sp-wa:hover {
    background: #D5EDD5;
    border-color: #3D7C47;
  }
}
.rvk-sp-wa:focus-visible { outline: 2px solid var(--rvk-gold); outline-offset: 2px; }

/* ── ACORDEONES ──────────────────────────────────────────────────────────────── */
.rvk-accordion {
  border-top: 1px solid var(--rvk-border);
}
.rvk-acc-item {
  border-bottom: 1px solid var(--rvk-border);
}
.rvk-acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  font-family: var(--rvk-font-b, sans-serif);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rvk-text);
  cursor: pointer;
  background: transparent;
  border: none;
  transition: opacity 0.2s;
  text-align: left;
}
@media (hover: hover) {
  .rvk-acc-trigger:hover { opacity: 0.55; }
}
.rvk-acc-trigger:focus-visible { outline: 2px solid var(--rvk-gold); outline-offset: 2px; }

.rvk-acc-icon {
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.3s var(--rvk-ease);
}
.rvk-acc-trigger[aria-expanded="true"] .rvk-acc-icon {
  transform: rotate(45deg);
}

.rvk-acc-panel {
  overflow: hidden;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.36s var(--rvk-ease);
}
.rvk-acc-panel.is-open {
  grid-template-rows: 1fr;
}
.rvk-acc-panel > .rvk-acc-content {
  overflow: hidden;
  min-height: 0; /* fix Safari <17: colapso correcto en grid-template-rows: 0fr */
  padding-bottom: 0;
  transition: padding-bottom 0.3s;
}
.rvk-acc-panel.is-open > .rvk-acc-content {
  padding-bottom: 22px;
}

.rvk-acc-content {
  font-size: 0.875rem;
  color: var(--rvk-muted);
  line-height: 1.75;
}
.rvk-acc-content p { margin-bottom: 8px; }
.rvk-acc-content p:last-child { margin-bottom: 0; }
.rvk-acc-content ul { list-style: disc; padding-left: 16px; }
.rvk-acc-content li { margin-bottom: 4px; }

/* Tabla de medidas */
.rvk-dims-table {
  width: 100%;
  border-collapse: collapse;
}
.rvk-dims-table tr { border-bottom: 1px solid var(--rvk-light); }
.rvk-dims-table tr:last-child { border-bottom: none; }
.rvk-dims-table td {
  padding: 9px 0;
  font-size: 0.875rem;
  color: var(--rvk-muted);
  vertical-align: top;
}
.rvk-dims-table td:first-child {
  color: var(--rvk-text);
  font-weight: 400;
  width: 40%;
}

/* ── LIGHTBOX ────────────────────────────────────────────────────────────────── */
.rvk-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}
.rvk-lightbox:not([hidden]) { display: flex; }

.rvk-lightbox-img {
  max-width: min(90vw, 900px);
  max-height: 90dvh;
  object-fit: contain;
  display: block;
  animation: rvk-lb-in 0.3s var(--rvk-ease);
}
@keyframes rvk-lb-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.rvk-lightbox-close {
  position: absolute;
  top: 16px; right: 20px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}
.rvk-lightbox-close:hover { color: #fff; }
.rvk-lightbox-close:focus-visible { outline: 2px solid var(--rvk-gold); }

.rvk-lightbox-prev,
.rvk-lightbox-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.08);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.rvk-lightbox-prev { left: 20px; }
.rvk-lightbox-next { right: 20px; }
.rvk-lightbox-prev:hover,
.rvk-lightbox-next:hover { background: rgba(255,255,255,0.16); color: #fff; }

/* ── VALORACIONES (acordeón a ancho completo) ────────────────────────────────── */
.rvk-sp-valoraciones {
  border-top: 1px solid var(--rvk-border);
}
.rvk-val-wrap {
  max-width: var(--rvk-max, 1400px);
  margin: 0 auto;
  padding: 0 40px;
}

/* Trigger */
.rvk-val-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rvk-border);
  cursor: pointer;
  text-align: left;
  transition: opacity 0.2s;
}
@media (hover: hover) {
  .rvk-val-trigger:hover { opacity: 0.65; }
}
.rvk-val-trigger:focus-visible { outline: 2px solid var(--rvk-gold); }

.rvk-val-title {
  font-family: var(--rvk-font-b, sans-serif);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rvk-text);
}
.rvk-val-count {
  color: var(--rvk-muted);
  font-weight: 400;
}
.rvk-val-avg-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.rvk-val-avg-num {
  font-family: var(--rvk-font-b, sans-serif);
  font-size: 0.85rem;
  color: var(--rvk-muted);
}
.rvk-val-trigger .rvk-acc-icon { margin-left: 0; flex-shrink: 0; }

/* Panel de valoraciones */
.rvk-val-panel.rvk-acc-panel {
  border-bottom: 1px solid var(--rvk-border);
}
.rvk-val-panel.rvk-acc-panel.is-open > .rvk-acc-content {
  padding: 32px 0 40px;
}

/* Estrellas */
.rvk-stars { display: inline-flex; gap: 2px; }
.rvk-star   { color: var(--rvk-border); font-size: 0.85rem; line-height: 1; }
.rvk-star.is-filled { color: var(--rvk-gold); }
.rvk-star.is-half   { color: var(--rvk-gold); opacity: 0.5; }

/* Lista de reseñas */
.rvk-reviews-list { display: flex; flex-direction: column; gap: 0; }

.rvk-review {
  padding: 24px 0;
  border-bottom: 1px solid var(--rvk-light);
}
.rvk-review:last-child { border-bottom: none; }

.rvk-review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.rvk-review-author {
  font-family: var(--rvk-font-b, sans-serif);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--rvk-text);
}
.rvk-review-date {
  font-size: 0.75rem;
  color: var(--rvk-muted);
  margin-left: auto;
}
.rvk-review-verified {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5A8A5A;
  background: #EEF5EE;
  padding: 2px 8px;
  border-radius: 2px;
}
.rvk-review-body {
  font-size: 0.875rem;
  color: var(--rvk-muted);
  line-height: 1.7;
}
.rvk-review-body p { margin-bottom: 6px; }
.rvk-review-body p:last-child { margin-bottom: 0; }

/* CTAs dentro del panel */
.rvk-reviews-more-link,
.rvk-review-cta { margin-top: 24px; }

.rvk-reviews-more-link a,
.rvk-review-write {
  font-family: var(--rvk-font-b, sans-serif);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rvk-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}
@media (hover: hover) {
  .rvk-reviews-more-link a:hover,
  .rvk-review-write:hover { opacity: 0.55; }
}

/* ── FORMULARIO DE VALORACIÓN ────────────────────────────────────────────────── */
.rvk-sp-review-form {
  border-top: 1px solid var(--rvk-border);
  padding: 60px 0;
}
.rvk-sp-review-form-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 40px;
}
.rvk-review-form-title {
  font-family: var(--rvk-font-d, serif);
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-bottom: 28px;
  color: var(--rvk-text);
}

/* Campos del formulario de WP comment_form() */
.rvk-commentform p { margin-bottom: 16px; }
.rvk-commentform label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rvk-muted);
  margin-bottom: 6px;
}
.rvk-commentform input[type="text"],
.rvk-commentform input[type="email"],
.rvk-commentform textarea {
  width: 100%;
  border: 1px solid var(--rvk-border);
  background: transparent;
  font-family: var(--rvk-font-b, sans-serif);
  font-size: 0.875rem;
  color: var(--rvk-text);
  padding: 12px 14px;
  transition: border-color 0.2s;
}
.rvk-commentform input[type="text"]:focus,
.rvk-commentform input[type="email"]:focus,
.rvk-commentform textarea:focus {
  outline: none;
  border-color: var(--rvk-text);
}
.rvk-commentform textarea { min-height: 120px; resize: vertical; }
.rvk-commentform .stars { margin-bottom: 12px; }
.rvk-commentform .stars a {
  font-size: 1.3rem;
  color: var(--rvk-border);
  text-decoration: none;
  transition: color 0.15s;
}
.rvk-commentform .stars:hover a,
.rvk-commentform .stars a:hover ~ a { color: var(--rvk-border); }
.rvk-commentform .stars a:hover,
.rvk-commentform .stars a.active { color: var(--rvk-gold); }
.rvk-commentform input[type="submit"] {
  background: var(--rvk-text);
  color: #fff;
  border: none;
  padding: 14px 32px;
  font-family: var(--rvk-font-b, sans-serif);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s;
}
@media (hover: hover) {
  .rvk-commentform input[type="submit"]:hover { background: #2C2B29; }
}

@media (max-width: 768px) {
  .rvk-val-wrap { padding: 0 20px; }
  .rvk-val-trigger { gap: 12px; }
  .rvk-val-avg-wrap { display: none; } /* simplificar en móvil */
  .rvk-sp-review-form-inner { padding: 0 20px; }
  .rvk-review-date { margin-left: 0; }
}

/* ── PRODUCTOS RELACIONADOS ──────────────────────────────────────────────────── */
.rvk-sp-related {
  border-top: 1px solid var(--rvk-border);
}
.rvk-sp-related .related {
  max-width: var(--rvk-max, 1400px);
  margin: 0 auto;
  padding: 60px 40px 80px;
}
.rvk-sp-related .related > h2 {
  font-family: var(--rvk-font-d, serif);
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 40px;
  color: var(--rvk-text);
}
.rvk-sp-related ul.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}
/* Productos relacionados usan .rvk-card (mismo template que el grid de tienda) */
.rvk-sp-related .rvk-card { display: flex; flex-direction: column; }
.rvk-sp-related .rvk-card-img {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
}
.rvk-sp-related .rvk-card-img-link { display: block; }
.rvk-sp-related .rvk-card-img-link img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.4s var(--rvk-ease);
}
@media (hover: hover) {
  .rvk-sp-related .rvk-card:hover .rvk-card-img-link img { transform: scale(1.03); }
}
/* Elementos del loop que no necesitamos en este contexto */
.rvk-sp-related .rvk-card-overlay,
.rvk-sp-related .rvk-card-cat { display: none; }
.rvk-sp-related .woocommerce-loop-product__title {
  font-family: var(--rvk-font-b, sans-serif);
  font-size: 0.83rem;
  font-weight: 400;
  color: var(--rvk-text);
  margin: 0 0 4px !important;
  padding: 0 !important;
}
.rvk-sp-related .woocommerce-loop-product__title a {
  color: inherit;
  text-decoration: none;
}
.rvk-sp-related .price {
  font-size: 0.83rem !important;
  color: var(--rvk-muted) !important;
  margin: 0 !important;
}
.rvk-sp-related .button { display: none; }

/* ── BARRA STICKY MÓVIL ──────────────────────────────────────────────────────── */
.rvk-sp-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--rvk-border);
  padding: 12px 20px env(safe-area-inset-bottom, 0px);
  z-index: 500;
  align-items: center;
  gap: 16px;
  transform: translateY(100%);
  transition: transform 0.3s var(--rvk-ease);
}
.rvk-sp-sticky-bar.is-visible { transform: translateY(0); }
.rvk-sp-sticky-price {
  flex: 1;
  font-family: var(--rvk-font-b, sans-serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--rvk-text);
}
.rvk-sp-sticky-price .price { font-size: 1rem; }
.rvk-sp-sticky-btn {
  flex: 2;
  min-height: 48px;
  background: var(--rvk-text, #1A1917);
  color: #fff;
  border: none;
  font-family: var(--rvk-font-b, sans-serif);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s;
}
.rvk-sp-sticky-btn:active { background: #2C2B29; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .rvk-sp {
    gap: 0 40px;
    padding: 40px 32px 80px;
  }
  .rvk-gallery {
    grid-template-columns: 64px 1fr;
    gap: 0 8px;
  }
  .rvk-gallery-thumb { width: 64px; }
}

@media (max-width: 1024px) {
  .rvk-sp {
    grid-template-columns: 52fr 48fr;
    gap: 0 32px;
    padding: 32px 24px 60px;
  }
  .rvk-sp-title { font-size: clamp(1.7rem, 3vw, 2.2rem); }
}

@media (max-width: 768px) {
  /* Layout single column */
  .rvk-sp {
    grid-template-columns: 1fr;
    padding: 0 0 120px;
    gap: 0;
  }

  /* Galería: scroll horizontal + snap */
  .rvk-gallery {
    display: block;
    position: relative;
    overflow: hidden;
  }
  .rvk-gallery-thumbs { display: none; }
  .rvk-gallery-main {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: default;
  }
  .rvk-gallery-main::-webkit-scrollbar { display: none; }
  .rvk-gallery-slide {
    display: block !important;
    flex: 0 0 100%;
    scroll-snap-align: start;
    animation: none !important;
  }
  .rvk-gallery-slide img { aspect-ratio: 1/1; object-fit: cover; }
  .rvk-gallery-zoom { display: none; }
  .rvk-gallery-dots { display: flex; }

  /* Info panel: scroll normal */
  .rvk-sp-info {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 24px 20px 0;
  }
  .rvk-sp-title { font-size: clamp(1.6rem, 5vw, 2rem); }
  .rvk-sp-bc-inner { padding: 10px 20px; }

  /* Breadcrumb scrollable en móvil */
  .rvk-sp-bc-inner {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    white-space: nowrap;
  }

  /* Mostrar barra sticky */
  .rvk-sp-sticky-bar { display: flex; }

  .rvk-val-wrap,
  .rvk-sp-related .related { padding: 40px 20px 60px; }

  .rvk-sp-related ul.products {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .rvk-sp-related ul.products { gap: 12px; }
}

/* ── FICHA TÉCNICA ───────────────────────────────────────────────────────────── */
/* Texto / especificaciones */
.rvk-ficha-texto {
  margin-bottom: 20px;
}
.rvk-ficha-texto p  { margin-bottom: 8px; }
.rvk-ficha-texto p:last-child { margin-bottom: 0; }
.rvk-ficha-texto ul,
.rvk-ficha-texto ol { padding-left: 18px; margin-bottom: 8px; }
.rvk-ficha-texto li { margin-bottom: 4px; }

/* Galería de imágenes */
.rvk-ficha-imgs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.rvk-ficha-img {
  background: var(--rvk-off-white);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
}
.rvk-ficha-img img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s var(--rvk-ease);
  pointer-events: none;
}
/* Ícono de zoom — aparece en hover */
.rvk-ficha-zoom {
  position: absolute;
  bottom: 8px; right: 8px;
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--rvk-text);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
@media (hover: hover) {
  .rvk-ficha-img:hover img { transform: scale(1.03); }
  .rvk-ficha-img:hover .rvk-ficha-zoom { opacity: 1; }
}
.rvk-ficha-img:focus-visible {
  outline: 2px solid var(--rvk-gold);
  outline-offset: 2px;
}

/* Lightbox ficha técnica */
#rvkFichaLb {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
}
#rvkFichaLb:not([hidden]) { display: flex; }
#rvkFichaLbImg {
  max-width: min(92vw, 1280px);
  max-height: 92dvh;
  object-fit: contain;
  display: block;
  animation: rvk-lb-in 0.3s var(--rvk-ease);
}
#rvkFichaLb .rvk-lightbox-close {
  position: absolute;
  top: 16px; right: 20px;
}
#rvkFichaLb .rvk-lightbox-prev { left: 20px; }
#rvkFichaLb .rvk-lightbox-next { right: 20px; }

/* Enlace de descarga PDF */
.rvk-ficha-pdf {
  margin-top: 4px;
}
.rvk-ficha-pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--rvk-font-b, sans-serif);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rvk-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}
@media (hover: hover) {
  .rvk-ficha-pdf-link:hover { opacity: 0.55; }
}
.rvk-ficha-pdf-link:focus-visible { outline: 2px solid var(--rvk-gold); outline-offset: 2px; }

@media (max-width: 768px) {
  .rvk-ficha-imgs {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* ── REDUCED MOTION ──────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .rvk-gallery-slide.is-active         { animation: none; }
  .rvk-lightbox-img                    { animation: none; }
  .rvk-acc-panel                       { transition: none; }
  .rvk-acc-icon                        { transition: none; }
  .rvk-sp-sticky-bar                   { transition: none; }
  .rvk-sp-related .rvk-card-img-link img { transition: none; }
  .rvk-qty-btn                         { transition: none; }
}
