/* Abadal Shop — ficha de producto estilo Mango + tarjetas de listado */
/* Gris claro apagado en vez de blanco: acordado con Ignacio el 14/10. --mute oscurecido para mantener 4,5:1 sobre el gris. */
.abd-pdp, .abd-related, .abd-pdp ~ dialog { --ink: #111; --mute: #5c5c5c; --line: #c8cbd1; --paper: #e5e7eb; --soft: #f0f1f4; }

/* Las fotos vienen recortadas sobre blanco: multiply funde ese blanco con el gris del lienzo */
html:root body button.abd-shot img, .abd-related img, .abd-added-item img, .abd-pdp ~ dialog img { mix-blend-mode: multiply; }

/* Lienzo gris dentro de la plantilla oscura */
.abd-pdp, .abd-related {
  background: var(--paper); color: var(--ink);
  box-sizing: border-box;
}
.abd-pdp { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }

/* Galería: rejilla de 2 columnas, cada foto amplía */
.abd-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; background: var(--paper); min-width: 0; align-content: start; }
html:root body .abd-gallery button.abd-shot:only-child { grid-column: 1 / -1; }
html:root body button.abd-shot { all: unset; cursor: zoom-in; display: block; min-width: 0; overflow: hidden; width: 100%; box-sizing: border-box; background: var(--paper); aspect-ratio: 1; }
html:root body button.abd-shot img { width: 100%; height: 100%; object-fit: contain; display: block; }
html:root body button.abd-shot:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

/* Columna de compra */
.abd-info { padding: 48px clamp(16px, 4vw, 64px); }
.abd-sticky { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 96px); max-width: 520px; }
.abd-title { font-size: clamp(18px, 1.6vw, 22px); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; line-height: 1.2; margin: 0 0 8px; color: var(--ink); }
.abd-price { font-size: 16px; margin: 0 0 28px; color: var(--ink); }
.abd-price del { color: var(--mute); margin-right: 6px; }
.abd-price ins { text-decoration: none; color: #b3001b; }

.abd-colors { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
html:root body button.abd-color { all: unset; cursor: pointer; width: 18px; height: 18px; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); position: relative; }
html:root body button.abd-color[aria-checked="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px; background: var(--ink); }
html:root body button.abd-color:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
html:root body button.abd-color-name { margin-left: auto; font-size: 14px; color: var(--ink); }

.abd-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
html:root body button.abd-size { all: unset; cursor: pointer; box-sizing: border-box; min-height: 64px; padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; font-size: 14px; font-weight: 600; color: var(--ink); background: var(--paper); }
html:root body button.abd-size small { font-size: 11px; font-weight: 400; color: var(--mute); }
html:root body button.abd-size:hover:not(.is-out) { background: var(--soft); }
html:root body button.abd-size[aria-checked="true"] { box-shadow: inset 0 0 0 1px var(--ink); }
html:root body button.abd-size.is-out { cursor: not-allowed; color: #9a9a9a; }
html:root body button.abd-size.is-out span { text-decoration: line-through; }
html:root body button.abd-size:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.abd-low { margin: 10px 0 0; font-size: 12px; color: #b4561f; }
.abd-low::before { content: "■ "; font-size: 8px; vertical-align: 2px; }

html:root body button.abd-link { all: unset; cursor: pointer; display: inline-block; margin: 18px 0 22px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); border-bottom: 1px solid currentColor; }
html:root body button.abd-add { all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; text-align: center; padding: 18px; margin-top: 8px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; transition: opacity .2s cubic-bezier(.16, 1, .3, 1); }
html:root body button.abd-add:hover { opacity: .86; }
html:root body button.abd-add:disabled { background: #bdbdbd; cursor: not-allowed; }
html:root body button.abd-add:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.abd-msg { min-height: 1.4em; margin: 8px 0 18px; font-size: 13px; color: #b3001b; }

.abd-acc details { border-top: 1px solid var(--line); }
.abd-acc details:last-child { border-bottom: 1px solid var(--line); }
.abd-acc summary { cursor: pointer; list-style: none; padding: 18px 0; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); display: flex; justify-content: space-between; }
.abd-acc summary::-webkit-details-marker { display: none; }
.abd-acc summary::after { content: "+"; font-weight: 400; }
.abd-acc details[open] summary::after { content: "−"; }
.abd-acc-body { padding: 0 0 18px; font-size: 14px; line-height: 1.6; color: #333; }
.abd-acc-body h4 { font-size: 13px; margin: 14px 0 6px; color: var(--ink); }
.abd-acc-body ul { padding-left: 18px; margin: 0; }
.abd-acc-body a { color: var(--ink); }

/* Región principal y pie (contraste AA sobre el fondo oscuro del kit) */
.abd-main:focus { outline: none; }
.elementor-location-footer p { color: #b0b0b0; }
.woocommerce ul.products li.product .price, .woocommerce ul.products li.product .price bdi { color: #f0f0f0; }
.woocommerce .woocommerce-result-count { color: #b0b0b0; }
html:root body .elementor-location-archive .elementor-widget-text-editor p { color: #b0b0b0; }

/* Cabecera: elemento activo del menú legible (antes #8c1d18 sobre #1e1e1e) */
.elementor-location-header a[aria-current="page"] .e-n-menu-title-text { color: #e8706a !important; }

/* Carrito y checkout clásico sobre el tema oscuro: contraste AA y botones de la marca */
.woocommerce-checkout .woocommerce, .woocommerce-cart .woocommerce { color: #d6d6d6; }
.woocommerce-checkout .woocommerce label, .woocommerce-checkout .woocommerce h3, .woocommerce-checkout #order_review_heading,
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper strong, .woocommerce-checkout .shop_table, .woocommerce-checkout .shop_table th, .woocommerce-checkout .shop_table td { color: #e6e6e6; }
.woocommerce-checkout .woocommerce a, .woocommerce-cart .woocommerce a { color: #ffffff; text-decoration: underline; text-underline-offset: 2px; }
.woocommerce-checkout .woocommerce .required { color: #ff8a80; }
.woocommerce-checkout .woocommerce input.input-text, .woocommerce-checkout .woocommerce textarea, .woocommerce-checkout .woocommerce select { border-radius: 0; border: 1px solid #8a8a8a; color: #111; background: #fff; padding: 10px 12px; }
.woocommerce-checkout .woocommerce input:focus-visible, .woocommerce-checkout .woocommerce select:focus-visible, .woocommerce-checkout .woocommerce textarea:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
html:root body.woocommerce-checkout #place_order, html:root body.woocommerce-cart .wc-block-cart__submit-button { border-radius: 0; background: #fff; color: #111; border: 1px solid #fff; padding: 16px 28px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
html:root body.woocommerce-checkout #place_order:hover, html:root body.woocommerce-cart .wc-block-cart__submit-button:hover { background: #e6e6e6; }
.woocommerce-checkout .woocommerce-info, .woocommerce-checkout .woocommerce-message { border-radius: 0; border-top-color: #111; background: #f2f2f2; color: #111; }
.woocommerce-checkout .woocommerce-info a { color: #111; }
.woocommerce-checkout #payment { border-radius: 0; background: #2a2a2a; }
.woocommerce-checkout #payment .woocommerce-privacy-policy-text p { color: #d6d6d6; }
.woocommerce-cart .wc-block-cart-item__product a, .woocommerce-cart .wc-block-components-product-name { color: #fff; }

/* Diálogos */
.abd-pdp ~ dialog { border: 0; padding: 0; color: var(--ink); background: var(--paper); max-width: none; max-height: none; }
.abd-pdp ~ dialog::backdrop { background: rgba(0, 0, 0, .45); }
html:root body button.abd-close { all: unset; cursor: pointer; font-size: 28px; line-height: 1; padding: 8px 12px; color: var(--ink); }
html:root body button.abd-close:focus-visible { outline: 2px solid var(--ink); }

.abd-lightbox { width: 100vw; height: 100dvh; inset: 0; margin: 0; }
html:root body .abd-lightbox button.abd-close { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 12px); right: 16px; z-index: 2; }
.abd-lb-thumbs { position: fixed; left: 24px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 2; }
html:root body .abd-lb-thumbs button { all: unset; cursor: pointer; width: 52px; height: 52px; opacity: .7; }
html:root body .abd-lb-thumbs button:hover, html:root body .abd-lb-thumbs button:focus-visible { opacity: 1; outline: 1px solid var(--ink); }
.abd-lb-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.abd-lb-stage { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; }
.abd-lb-stage img { display: block; width: 100%; max-width: 1500px; height: 100dvh; object-fit: contain; margin: 0 auto; scroll-snap-align: start; }

.abd-guide { width: min(720px, 100vw); max-height: 90dvh; padding: 28px 32px 32px !important; overflow: auto; }
html:root body .abd-guide button.abd-close { position: absolute; top: 12px; right: 12px; }
.abd-guide h2 { font-size: 16px; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 4px; }
.abd-guide-unit, .abd-nota { font-size: 12px; color: var(--mute); }
.abd-tallas { width: 100%; border-collapse: collapse; font-size: 13px; margin: 16px 0 8px; }
.abd-tallas th, .abd-tallas td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; white-space: nowrap; }
.abd-tallas th { font-weight: 600; }

.abd-added { width: min(560px, calc(100vw - 32px)); position: fixed; top: calc(env(safe-area-inset-top, 0px) + 96px); right: 16px; left: auto; margin: 0; border: 1px solid var(--ink) !important; padding: 20px !important; }
.abd-added-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; }
.abd-added-item { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: center; font-size: 14px; }
.abd-added-item img { width: 140px; height: 140px; object-fit: contain; background: var(--paper); }
.abd-added-item p { margin: 0 0 6px; }
.abd-added-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.abd-btn { display: block; text-align: center; padding: 14px 10px; background: var(--ink); color: #fff !important; text-decoration: none; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; border: 1px solid var(--ink); }
.abd-btn-ghost { background: var(--paper); color: var(--ink) !important; }
.abd-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Relacionados */
.abd-related { padding: 56px clamp(16px, 4vw, 64px) 72px; border-top: 1px solid var(--line); }
.abd-related h2 { font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 20px; color: var(--ink); }
.abd-related ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.abd-related a { color: var(--ink); text-decoration: none; display: grid; gap: 6px; font-size: 13px; }
.abd-related img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--paper); }
.abd-rel-name { font-weight: 600; }

/* Listado: fondo blanco + segunda foto al pasar el ratón */
.woocommerce ul.products li.product a img, .elementor-widget-woocommerce-products ul.products li.product a img { background: #fff; }
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link { position: relative; display: block; }
.woocommerce ul.products li.product .abd-hover-img { position: absolute; top: 0; left: 0; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; opacity: 0; transition: opacity .35s cubic-bezier(.16, 1, .3, 1); margin: 0 !important; }
@media (hover: hover) {
  .woocommerce ul.products li.product:hover .abd-hover-img { opacity: 1; }
}

/* Enlaces legales del pie (el rosa del kit da 3,3:1 sobre el fondo oscuro) */
.abd-legal-links a { color: #e6e6e6; text-decoration: underline; text-underline-offset: 2px; }

/* Desistimiento online [abadal_desistimiento] */
.abd-wd, .abd-wd-done { max-width: 640px; color: inherit; }
.abd-wd-field { display: grid; gap: 6px; margin: 0 0 18px; }
.abd-wd-field label { font-size: 14px; font-weight: 600; }
.abd-wd input[type="text"], .abd-wd input[type="email"], .abd-wd textarea { border-radius: 0; border: 1px solid #8a8a8a; background: #fff; color: #111; padding: 10px 12px; font: inherit; width: 100%; box-sizing: border-box; }
.abd-wd [aria-invalid="true"] { border-color: #b3261e; }
.abd-wd-error { color: #b3261e; font-size: 13px; }
.abd-wd-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.abd-wd-summary { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 16px 0 24px; }
.abd-wd-summary dt { font-weight: 600; }
.abd-wd-summary dd { margin: 0; overflow-wrap: anywhere; }
html:root body .abd-wd-btn { border-radius: 0; background: #111; color: #fff; border: 1px solid #111; padding: 16px 28px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
html:root body .abd-wd-btn:hover { background: #333; }
html:root body .abd-wd-btn:focus-visible { outline: 2px solid #111; outline-offset: 3px; }

@media (max-width: 900px) {
  .abd-pdp { grid-template-columns: minmax(0, 1fr); }
  .abd-wd-summary { grid-template-columns: 1fr; gap: 2px; }
  .abd-wd-summary dd { margin-bottom: 10px; }
  .abd-gallery { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; }
  html:root body button.abd-shot { scroll-snap-align: start; }
  .abd-info { padding: 24px 16px 40px; }
  .abd-sticky { position: static; }
  .abd-related ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .abd-lb-thumbs { display: none; }
  .abd-added { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); right: 16px; }
  .abd-added-item { grid-template-columns: 96px 1fr; }
  .abd-added-item img { width: 96px; height: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  html:root body button.abd-add, .woocommerce ul.products li.product .abd-hover-img { transition: none; }
}
