/* Web GDP · reglas mínimas de funcionalidad (no de diseño): estados que el
   prototipo no contemplaba (card sin stock, scroll infinito, mensajes de
   servicio, pantallas de administración). Solo tokens de styles.css. */

/* Card sin stock: no se puede añadir (spec Fase 1.1) */
/* card sin stock (diseño de Gerard, 26/09/2026): punto rojo + «Prossimamente disponibile», fecha estimada, alternativa, «Avvisami» */
.offer-oos { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: var(--fs-sm, 16px); font-weight: 400; color: var(--black, #0a0a0a); text-align: center; }
.offer-oos-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red-accent, #ee333e); flex-shrink: 0; }
.offer-oos-date { display: block; font-size: var(--fs-xs, 14px); color: var(--black, #0a0a0a); text-align: center; margin-top: 6px; line-height: 1.4; }
.offer-oos-hint { display: block; font-size: var(--fs-xs, 14px); color: var(--black, #0a0a0a); text-align: center; margin-top: 6px; }
.offer-oos-alt, .offer-oos-aviso { width: 100%; min-width: 0; justify-content: center; white-space: normal; text-align: center; margin-top: 8px; font-size: 15px; text-transform: none; letter-spacing: 0; font-weight: 600; line-height: 1.3; }
.offer-oos-aviso { padding-top: 10px; padding-bottom: 10px; }
/* .offer-actions es un grid de dos columnas (qty | añadir); sin stock va todo en una columna */
.offer-card .offer-actions:has(.offer-oos) { grid-template-columns: 1fr; }

/* Scroll infinito */
.plp-more { display: flex; flex-direction: column; align-items: center; gap: var(--sp-16, 16px); padding: var(--sp-24, 24px) 0; }
.plp-empty { font-size: var(--fs-base, 14px); color: var(--g500, #6e6e6e); margin: 0; }
#plpSentinel { width: 100%; height: 1px; }
.cat-products-hd { scroll-margin-top: 96px; }

/* Píldora de subcategoría activa */
.cat-pill.is-active .cat-pill-name { font-weight: 700; }

/* Mensajes de servicio (mantenimiento, 404) */
.site-msg { max-width: 720px; margin: var(--sp-32, 32px) auto; }
.site-msg-admin { margin-top: var(--sp-16, 16px); font-size: var(--fs-base, 14px); color: var(--g500, #6e6e6e); }

/* Formulario «Avísame»: campo trampa para robots (nunca visible) */
.aviso-web { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#avisoForm { display: flex; flex-direction: column; gap: var(--sp-16, 16px); }

/* Administración (login y ajustes): mismos componentes del diseño, solo colocación */
.admin-card { max-width: 480px; margin: var(--sp-32, 32px) auto; }
.admin-wrap { max-width: 820px; margin: var(--sp-32, 32px) auto; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--sp-16, 16px); margin-bottom: var(--sp-24, 24px); }
.admin-alert { margin-bottom: var(--sp-16, 16px); }
.admin-hint { font-size: var(--fs-3xs, 12px); color: var(--g500, #6e6e6e); margin: var(--sp-8, 8px) 0 0; }
.admin-hint code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.admin-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-12, 12px); margin: var(--sp-16, 16px) 0 var(--sp-32, 32px); }
.admin-resultado { font-size: var(--fs-base, 14px); color: var(--g500, #6e6e6e); }
.admin-resultado.ok { color: var(--green-dark, #2f4a05); }
.admin-resultado.error { color: var(--red, #e53e3e); }
.admin-reenviar { display: flex; align-items: center; gap: var(--sp-16, 16px); margin-top: var(--sp-16, 16px); }
.admin-link { font-size: var(--fs-base, 14px); }
#ajustesForm .pdp-variants-title { margin: var(--sp-24, 24px) 0 var(--sp-12, 12px); }
#ajustesForm .checkout-toggle { margin-top: var(--sp-12, 12px); }

/* Spinner (spec app 2021 §0.2: «desde que se llama un método hasta que responde»).
   Escudo de García de Pou latiendo: overlay al navegar y variante inline en los listados. */
.gdp-loader { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.72); }
.gdp-loader[hidden] { display: none; }
.gdp-loader img { width: 52px; height: 70px; object-fit: contain; animation: gdp-latido 1.1s ease-in-out infinite; } /* escudo 28x38: contain, no cover */
.gdp-loader--inline { position: static; inset: auto; background: none; padding: var(--sp-32, 32px) 0; min-height: 124px; overflow: visible; }
.gdp-loader--inline img { width: 44px; height: 60px; }
.plp-more { overflow: visible; min-height: 120px; }
/* Graella del llistat: 4 → 3 → 2 → 1 columnes de forma progressiva (el prototip saltava de 4 a 2 a 1199px) */
/* 4 columnas hasta 1200px como el prototipo (02/10/2026: con su contenedor, sin el 90vw, la card mide ≥230px y la
   fila «qty | Aggiungi» cabe); por debajo, 3. La columna del botón puede encoger en vez de empujar al selector. */
.cat-grid:not(.cat-grid--list) .offer-card .offer-actions:not(:has(.offer-oos)) { grid-template-columns: minmax(100px, max-content) minmax(0, 1fr); }
/* La columna de la card no creix per sobre de l'1fr encara que el contingut (preu ratllat, botó) sigui més ample */
@media (min-width: 1200px) { .cat-grid:not(.cat-grid--list) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1199px) and (min-width: 900px) { .cat-grid:not(.cat-grid--list) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899px) and (min-width: 601px) { .cat-grid:not(.cat-grid--list) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* El camp de la quantitat no es pot quedar sense ample: amb 68 px per al selector i botons de 32 px, al mòbil el número
   no es veia (auditoria del 07/10/2026) */
.offer-card .qty-selector .qty-input, .cat-grid .offer-card .qty-selector .qty-input { min-width: 30px; }
.cat-grid:not(.cat-grid--list) .offer-card .btn.btn-add-cart { min-width: 0; overflow: hidden; }
@media (min-width: 1200px) {
  /* 4 columnes: selector compacte (28 + 32 + 28 px) i botó amb 12 px de marge perquè «Aggiungi» hi càpiga sencer (auditoria 07/10/2026) */
  .cat-grid:not(.cat-grid--list) .offer-card .btn.btn-add-cart { padding-inline: 12px; }
  .cat-grid:not(.cat-grid--list) .offer-card .qty-selector .qty-btn { width: 28px; }
  .cat-grid:not(.cat-grid--list) .offer-card .qty-selector .qty-input { flex: 0 0 32px; width: 32px; }
  .cat-grid:not(.cat-grid--list) .offer-card .offer-actions:not(:has(.offer-oos)) { grid-template-columns: minmax(88px, max-content) minmax(0, 1fr); }
}
@media (min-width: 1200px) and (max-width: 1439px) {
  .cat-grid:not(.cat-grid--list) .offer-card .btn.btn-add-cart { padding-inline: 8px; gap: 4px; }
}
@keyframes gdp-latido { 0%, 100% { transform: scale(1); opacity: .55; } 50% { transform: scale(1.15); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .gdp-loader img { animation: none; opacity: .8; } }
.plp-error { width: 100%; max-width: 640px; }

/* Área de cliente: avisos y acciones de texto dentro de las tarjetas (sin diseño propio) */
.account-alert { margin-bottom: var(--sp-16, 16px); }
.account-page .account-alert { margin-bottom: var(--sp-24, 24px); }
.account-inline-form { display: inline; }
.account-link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--blue, #002d72); text-decoration: underline; cursor: pointer; }
.order-line[data-code] .cart-page-item-price .account-actions { margin-top: var(--sp-8, 8px); justify-content: flex-end; }
.address-form { margin-bottom: var(--sp-24, 24px); }
@media print { .header, .announcement, .footer, .account-nav, .order-summary-actions, .mobile-drawer, .cart-drawer, .gdp-loader { display: none !important; } }

/* Checkout (spec app 2021 §5): estados sin diseño propio, con los componentes del checkout */
.checkout-step-alert { margin: 0 0 var(--sp-16, 16px); }
.checkout-address-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-12, 12px); margin-bottom: var(--sp-16, 16px); }
.checkout-address-tiles .checkout-address-card { cursor: pointer; max-width: none; margin: 0; }
.checkout-address-tiles .checkout-address-card .checkout-address-check { visibility: hidden; }
.checkout-address-tiles .checkout-address-card.is-selected { box-shadow: inset 0 0 0 2px var(--blue, #002d72); }
.checkout-address-tiles .checkout-address-card.is-selected .checkout-address-check { visibility: visible; }
.checkout-address-tiles input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.checkout-address-block { margin-bottom: var(--sp-24, 24px); }
.checkout-address-block .checkout-address-card { max-width: none; }
.checkout-summary-extra { margin-top: var(--sp-16, 16px); }
.checkout-terms-link { background: none; border: 0; padding: 0; font: inherit; color: var(--blue, #002d72); text-decoration: underline; cursor: pointer; }
.checkout-terms-frame { width: 100%; height: 70vh; border: 0; background: #fff; }
.checkout-terms-fallback { margin: var(--sp-12, 12px) 0 0; font-size: var(--fs-base, 14px); }
.checkout-terms-fallback a { color: #fff; }
.checkout-step[hidden] { display: none; }
.checkout-subtitle-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-12, 12px); }
.checkout-subtitle-row .checkout-subtitle { margin-bottom: 0; }
.checkout-subtitle-row + .checkout-address-card { margin-top: var(--sp-12, 12px); }
.checkout-address-card--payment + .checkout-address-card--payment { margin-top: var(--sp-12, 12px); }

/* Cesta de invitado y fusión con el carro anterior del ERP (sin diseño propio: componentes de cart.html) */
.cart-summary-note { font-size: var(--fs-3xs, 12px); color: var(--g500, #6e6e6e); margin: var(--sp-8, 8px) 0 0; }
.cart-merge-qty { font-size: var(--fs-base, 14px); color: var(--black, #0a0a0a); margin: 0; }
.cart-merge-actions { display: flex; flex-direction: column; gap: var(--sp-12, 12px); }
.cart-merge-actions .btn { width: 100%; justify-content: center; white-space: normal; text-align: center; }

/* Mis productos (spec 20240917): cantidad 0 en rojo, «ya en la cesta», filas sin stock y subtotal */
.mp-table .qty-input.is-zero { background: #fde7e7; }
.mp-in-cart { display: block; margin-top: var(--sp-8, 8px); font-size: var(--fs-3xs, 12px); color: var(--g500, #6e6e6e); line-height: 1.4; }
.mp-in-cart a { color: var(--blue, #002d72); text-decoration: underline; font-weight: 700; }
.mp-row-oos .mp-oos { color: var(--red, #e53e3e); text-transform: none; font-size: var(--fs-3xs, 12px); }
.mp-subtotal { text-align: right; font-size: var(--fs-base, 14px); font-weight: 700; color: var(--black, #0a0a0a); padding: var(--sp-12, 12px) var(--sp-16, 16px); }
.mp-subtotal strong { font-weight: 800; }

/* Ajustes → Categorías (url keys) */
.admin-wrap--ancho { max-width: 1200px; }
.ac-filtro { width: 320px; max-width: 100%; text-align: left; padding: 0 var(--sp-12, 12px); }
.ac-table td { vertical-align: middle; font-size: var(--fs-3xs, 12px); }
.ac-table .ac-input { width: 260px; max-width: 100%; text-align: left; padding: 0 var(--sp-8, 8px); }
.ac-table .ac-input.is-manual { border-color: var(--blue, #002d72); font-weight: 700; }
.ac-table .ac-input.is-changed { background: #fff8dc; }
.ac-nombre { display: inline-block; }
.ac-nivel-1 { padding-left: 16px; } .ac-nivel-2 { padding-left: 32px; } .ac-nivel-3 { padding-left: 48px; } .ac-nivel-4 { padding-left: 64px; }
.ac-ruta { color: var(--g500, #6e6e6e); word-break: break-all; }

/* Revisión funcional del 24/09/2026 (lista de Gerard) */
.mp-actions { position: sticky; bottom: 0; z-index: 5; background: var(--white, #fff); padding: var(--sp-12, 12px) 0; margin-top: var(--sp-16, 16px); box-shadow: 0 -8px 16px -12px rgba(0,0,0,.25); }
/* Foto a todo el ancho de la card (sin margen interior) y logo de línea grande, sobre la foto, abajo a la izquierda (referencia de Gerard, 24/09/2026) */
.offer-card .offer-card-img > img { padding: 0; }
.offer-card .offer-brand-wrap { bottom: var(--sp-12, 12px); left: var(--sp-12, 12px); }
.offer-card .offer-brand-logo { width: auto; height: 48px; max-width: 132px; }
/* Card del llistat com a la web actual (comparació de Gerard, 24/09/2026): foto a 3/4 de l'ample i centrada,
   logo de línia a sobre de la cantonada inferior esquerra de la foto, cos més compacte. */
@media (min-width: 601px) {
  .cat-grid:not(.cat-grid--list) .offer-card .offer-card-img { position: relative; padding-bottom: var(--sp-8, 8px); }
  .cat-grid:not(.cat-grid--list) .offer-card .offer-card-img > img { width: 76%; max-height: 200px; margin: var(--sp-12, 12px) auto 0; padding: 0; }
  .cat-grid:not(.cat-grid--list) .offer-card .offer-brand-wrap { position: absolute; left: var(--sp-8, 8px); bottom: var(--sp-8, 8px); margin: 0; }
  .cat-grid:not(.cat-grid--list) .offer-card .offer-brand-logo { width: auto; height: 26px; max-width: 96px; }
  .cat-grid:not(.cat-grid--list) .offer-card .offer-card-body { padding: var(--sp-8, 8px) var(--sp-12, 12px) var(--sp-12, 12px); gap: 6px; }
}
/* El contenidor del llistat té l'ample i els marges del prototip (Gerard, 02/10/2026; abans 90vw, com la web actual) */
.offers-grid .offer-card .offer-brand-logo { height: 32px; }
.pdp-main-img .offer-brand-logo { width: auto; height: 44px; max-width: 140px; }   /* 64 px se veía demasiado grande (06/10/2026) */
.pdp-color-opt { width: 40px; height: 40px; }                       /* «otros colores» a la altura de «otros tamaños» */
.cart-drawer-related { margin-top: var(--sp-24, 24px); padding-top: var(--sp-16, 16px); border-top: 1px solid var(--g100, #eee); }
.cart-page-main .cart-drawer-related { margin-top: var(--sp-8, 8px); }
.cart-confirm-added-name { color: inherit; text-decoration: none; }
.cart-confirm-added-name:hover { text-decoration: underline; }
.custom-banner.has-img { background-size: cover; background-position: center; }
.account-content { min-width: 0; }                                   /* la tabla de pedidos no ensancha la página a 1024/768 */

/* Categorías sin foto en el ERP: escudo pequeño y neutro en vez del escudo gigante del ERP */
.cat-pill-thumb--sin { background: var(--g100, #eee); display: flex; align-items: center; justify-content: center; }
.cat-pill-thumb--sin img { width: 28px; height: 28px; object-fit: contain; opacity: .55; }
.sector-card--sin-img .sector-card-img { display: flex; align-items: center; justify-content: center; background: var(--g100, #eee); }
.sector-card--sin-img .sector-card-sin { width: 30%; height: auto; object-fit: contain; opacity: .35; }
.ac-media { white-space: nowrap; }
.ac-media .ac-mini { display: block; width: 96px; height: 48px; object-fit: cover; background: var(--g100, #eee); margin-bottom: var(--sp-4, 4px); }
.ac-media .ac-mini.is-hidden, .ac-media .ac-quitar.is-hidden { display: none; }
.ac-media .ac-subir { display: inline-block; cursor: pointer; margin-right: var(--sp-8, 8px); }

/* Revisión del 24/09/2026 (captura de Gerard): más aire entre la imagen y el código de la card, logos de línea.
   Las píldoras de subcategoría vuelven a las medidas del prototipo (200×56, texto fs-sm; Gerard, 02/10/2026) */
.offer-card .offer-card-body { padding-top: var(--sp-12, 12px); }
.al-logo { height: 32px; width: auto; max-width: 140px; object-fit: contain; background: var(--g50, #f5f5f5); padding: 2px 6px; }
.al-origen { color: var(--g500, #6e6e6e); font-size: var(--fs-3xs, 12px); }
.account-link-btn.is-hidden { display: none; }

/* Mega-menú: el botón «Vedi tutto <categoría>» no debe invadir la primera columna (nombres italianos largos) */
.mega-desc { min-width: 0; }
.mega-desc-cta { white-space: normal; max-width: 100%; text-align: center; line-height: 1.25; padding-top: var(--sp-8, 8px); padding-bottom: var(--sp-8, 8px); }
.as-titulo { font-size: var(--fs-md, 18px); margin: var(--sp-24, 24px) 0 var(--sp-8, 8px); }
.as-icono { height: 36px; max-width: 60px; }
/* Fitxa: sota 1100px la galeria i la barra lateral ja van a tota l'amplada (una columna), però el prototip
   només treia el sticky a 900: entre 900 i 1099 la imatge quedava fixa tapant el text en fer scroll. */
@media (max-width: 1099px) { .pdp-gallery, .pdp-details-aside { position: static; top: auto; } }

/* ── Capa del buscador (diseño tipo Doofinder; el CSS editable de Ajustes va incrustado en la página) ── */
.dfd-layer { position: fixed; inset: 0; z-index: 10000; background: #fff; overflow: hidden; }
.dfd-layer[hidden] { display: none; }
body.dfd-open { overflow: hidden; }
.dfd-layer-inner { position: absolute; inset: 0; display: flex; flex-direction: column; }
.dfd-topbar { display: flex; align-items: center; gap: 28px; padding: 22px 48px 0; }
.dfd-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #1c3f7c; font-size: 18px; letter-spacing: .02em; white-space: nowrap; }
.dfd-logo strong { font-weight: 800; }
.dfd-logo img { width: 22px; height: 30px; flex: 0 0 auto; }
.dfd-search { flex: 1; display: flex; align-items: center; gap: 14px; height: 48px; border-bottom: 2px solid #1c3f7c; color: #1c3f7c; }
.dfd-input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 18px; outline: none; color: var(--black, #111); }
.dfd-input::-webkit-search-cancel-button { display: none; }
.dfd-close { width: 44px; height: 44px; border: 0; background: transparent; font-size: 34px; line-height: 1; cursor: pointer; color: #1c3f7c; }
.dfd-chips { padding: 14px 48px 0 48px; min-height: 52px; }
.dfd-chip { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 8px 0 18px; border: 1px solid #c9ced6; border-radius: 999px; font-weight: 700; font-size: 14px; color: #1c3f7c; }
.dfd-chip[hidden] { display: none; }
.dfd-chip-x { border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: #1c3f7c; padding: 0 6px; }
.dfd-body { flex: 1; display: grid; grid-template-columns: 300px minmax(0, 1fr); column-gap: 24px; min-height: 0; padding: 12px 48px 0; }
.dfd-facets { overflow-y: auto; padding: 24px 0 40px; }
.dfd-facets-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dfd-facets-title { font-weight: 800; font-size: 18px; color: #1c3f7c; border-bottom: 3px solid #1c3f7c; padding: 0 0 10px; }
.dfd-clear { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; font: inherit; font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: #1c3f7c; cursor: pointer; }
.dfd-facet { padding: 22px 0 0; }
.dfd-facet-title { width: 100%; display: flex; align-items: center; justify-content: space-between; border: 0; background: transparent; font: inherit; font-weight: 800; font-size: 18px; letter-spacing: .02em; text-transform: uppercase; color: #1c3f7c; cursor: pointer; padding: 0 0 12px; text-align: left; }
.dfd-facet-title svg { transition: transform .2s; }
.dfd-facet.is-open .dfd-facet-title svg { transform: rotate(180deg); }
.dfd-facet-body { display: none; }
.dfd-facet.is-open .dfd-facet-body { display: block; }
.dfd-facet-search { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid #c9ced6; border-radius: 4px; color: #6e6e6e; margin: 4px 0 14px; }
.dfd-facet-search input { flex: 1; border: 0; outline: none; font: inherit; font-size: 15px; background: transparent; }
.dfd-facet-values { display: flex; flex-direction: column; gap: 14px; padding: 4px 0; }
.dfd-facet-item { display: flex; align-items: center; gap: 12px; font-size: 15px; cursor: pointer; color: var(--black, #111); }
.dfd-facet-item input { width: 20px; height: 20px; margin: 0; accent-color: #1c3f7c; }
.dfd-facet-item .dfd-facet-label { flex: 1; }
.dfd-facet-n { color: #1c3f7c; font-weight: 600; font-size: 14px; }
.dfd-facet-values--visual { flex-direction: row; flex-wrap: wrap; gap: 22px; padding: 10px 6px; }   /* 6px de aire: el anillo del color seleccionado (5px) no se corta en el borde */
/* nombre del color (en el idioma de la web) al pasar el ratón / enfocar */
.dfd-facet-swatch::after { content: attr(data-nombre); position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); background: #1c3f7c; color: #fff; font-size: 12px; font-weight: 600; line-height: 1; padding: 6px 9px; border-radius: 4px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 3; }
.dfd-facet-swatch:hover::after, .dfd-facet-swatch:focus-within::after { opacity: 1; }
.dfd-facet-swatch { position: relative; width: 36px; height: 36px; cursor: pointer; }
.dfd-facet-swatch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.dfd-swatch { display: block; width: 36px; height: 36px; border-radius: 50%; border: 1px solid #d5d8de; }
.dfd-facet-swatch.is-sel .dfd-swatch, .dfd-facet-swatch input:checked + .dfd-swatch { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #1c3f7c; }
.dfd-facet-foot { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding: 12px 0 8px; font-size: 13px; color: #6e6e6e; }
.dfd-facet-more { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; font: inherit; font-size: 14px; color: #1c3f7c; cursor: pointer; align-self: center; }
.dfd-main { overflow-y: auto; padding: 24px 0 60px; }
.dfd-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; font-size: 15px; color: #1c3f7c; }
.dfd-results-count strong { font-weight: 800; }
.dfd-sort-wrap { display: inline-flex; align-items: center; gap: 4px; }
.dfd-sort { border: 0; background: transparent; font: inherit; font-size: 15px; color: #1c3f7c; cursor: pointer; padding: 0; }
.dfd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 26px 24px; }
.dfd-card { display: flex; flex-direction: column; padding: 28px 28px 24px; background: #fff; border: 1px solid #d9dde3; text-decoration: none; color: inherit; transition: box-shadow .2s; }
.dfd-card-image { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.dfd-card-image img { width: 100%; height: 100%; object-fit: contain; }
.dfd-card-new { position: absolute; top: -10px; left: -10px; background: #b5121b; color: #fff; font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 999px; transform: rotate(-12deg); }
.dfd-card-logo { height: 22px; margin: -6px 0 10px; }
.dfd-card-logo img { height: 100%; width: auto; max-width: 90px; object-fit: contain; }
.dfd-card-title { font-size: 14px; font-weight: 500; text-transform: uppercase; line-height: 1.75; color: #1c3f7c; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dfd-card-punto { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e30613; margin: 0 6px 2px 0; }
.dfd-card-pricing { margin-top: 14px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dfd-card-price { font-weight: 800; font-size: 16px; color: #1c3f7c; }
.dfd-card-price--old { font-weight: 400; font-size: 13px; text-decoration: line-through; color: #6e6e6e; }
.dfd-more-wrap { display: flex; justify-content: center; padding: 30px 0; }
.dfd-empty { padding: 40px 0; color: #6e6e6e; }
.dfd-loading .dfd-grid { opacity: .5; }
.dfd-facets-toggle { display: none; }
@media (max-width: 1100px) { .dfd-body { grid-template-columns: 240px minmax(0, 1fr); padding: 12px 24px 0; } .dfd-topbar, .dfd-chips { padding-left: 24px; padding-right: 24px; } }
@media (max-width: 900px) {
  .dfd-topbar { padding: 14px 14px 0; gap: 14px; }
  .dfd-logo span { display: none; }
  .dfd-chips { padding: 10px 14px 0; }
  .dfd-body { grid-template-columns: 1fr; padding: 0 14px; position: relative; }
  .dfd-facets { display: none; padding: 12px 0; border-bottom: 1px solid #d9dde3; }
  .dfd-facets-open .dfd-facets { display: block; }
  .dfd-facets-toggle { display: inline-block; position: fixed; right: 14px; bottom: 16px; z-index: 2; height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: #1c3f7c; color: #fff; font: inherit; font-weight: 800; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
  .dfd-main { padding: 12px 0 80px; }
  .dfd-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .dfd-card { padding: 14px; }
}
}
.ab-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--g100, #e5e5e5); margin: var(--sp-16, 16px) 0; }
.ab-tab { border: 0; background: transparent; padding: 10px 16px; font: inherit; font-weight: 600; color: var(--g500, #6e6e6e); cursor: pointer; border-bottom: 2px solid transparent; }
.ab-tab.is-active { color: var(--blue, #002d72); border-bottom-color: var(--blue, #002d72); }
.ab-css { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; padding: 12px; border: 1px solid var(--g100, #e5e5e5); border-radius: 8px; }
.ab-inline { flex-direction: row; align-items: center; gap: 8px; }
.ab-inline input { width: 70px; }

/* Core Web Vitals (24/09/2026): el header y el footer los pinta components.js; mientras no existen se
   reserva su altura para que el contenido no salte (CLS). */
#gdpHeader:empty { min-height: 172px; }
@media (max-width: 1200px) { #gdpHeader:empty { min-height: 96px; } }
#gdpFooter:empty { min-height: 480px; }

.cat-grid:not(:has(.offer-card)) { min-height: 640px; }   /* la rejilla lleva un comentario HTML: :empty no vale */
@media (max-width: 600px) { .cat-grid:not(:has(.offer-card)) { min-height: 900px; } }

/* Administración: los campos del prototipo llevan la etiqueta flotante dentro del input (checkout); en Ajustes
   las explicaciones son largas → etiqueta arriba, explicación debajo, input normal (25/09/2026). */
.admin-wrap { max-width: 960px; }
.admin-wrap .checkout-field { position: static; gap: 4px; }
.admin-wrap .checkout-field span { position: static; top: auto; left: auto; font-size: 13px; font-weight: 600; color: var(--black, #111); line-height: 1.3; }
.admin-wrap .checkout-field span.checkout-field-hint { display: block; margin: 2px 0 0; font-size: 12px; font-weight: 400; color: var(--g500, #6e6e6e); line-height: 1.35; }
.admin-wrap .checkout-field input:not([type="checkbox"]), .admin-wrap .checkout-field select { height: 44px; padding: 0 12px; font-size: 14px; }
.admin-wrap .checkout-field textarea { padding: 10px 12px; font: inherit; font-size: 14px; }
.admin-wrap .checkout-field-grid { align-items: start; }
@media (max-width: 720px) { .admin-wrap .checkout-field-grid { grid-template-columns: 1fr; } }
/* Páginas de administración con tabla ancha (Categorías, Sellos, Buscador, Líneas) */
.admin-wrap--ancho { max-width: 1360px; }
.admin-wrap .qo-table-wrap { overflow-x: auto; overflow-y: visible; }
.admin-wrap .ac-table th, .admin-wrap .ac-table td { white-space: nowrap; vertical-align: middle; }
.admin-wrap .ac-table td .ac-nombre { white-space: normal; display: inline-block; min-width: 140px; max-width: 200px; }
.admin-wrap .ac-table .ac-ruta { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.admin-wrap .ac-table .ac-input { width: 180px; }
.admin-wrap .ac-table .ac-input-ruta { width: 260px; }
.admin-wrap .ac-table th, .admin-wrap .ac-table td { padding-left: 8px; padding-right: 8px; }

/* Popup de aviso (gdpAviso) */
.gdp-aviso { position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center; background: rgba(0,45,114,.45); padding: 16px; }
.gdp-aviso[hidden] { display: none; }
.gdp-aviso-box { background: #fff; border-radius: 12px; padding: 28px 24px 20px; max-width: 460px; width: 100%; box-shadow: 0 12px 40px rgba(0,0,0,.25); text-align: center; }
.gdp-aviso-msg { font-size: 15px; line-height: 1.5; margin: 0 0 20px; color: var(--black, #111); }
.cart-summary-hint { font-size: 12px; color: var(--g500, #6e6e6e); margin: 4px 0 8px; line-height: 1.4; }

/* Avisos breves (gdpNotificar) */
.gdp-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 10002; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.gdp-toast { background: var(--blue, #002d72); color: #fff; padding: 12px 16px; border-radius: 8px; font-size: 14px; line-height: 1.4; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: opacity .4s, transform .4s; }
.gdp-toast--error { background: #b5121b; }
.gdp-toast.is-out { opacity: 0; transform: translateY(8px); }

/* Sugerencias de código postal (formularios de dirección) */
.checkout-field.has-cp-sugerencias { position: relative; }
.cp-sugerencias { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; margin: 4px 0 0; padding: 6px 0; list-style: none; background: #fff; border: 1px solid var(--g400, #bbb); border-radius: var(--radius, 8px); box-shadow: 0 10px 30px rgba(0,45,114,.16); max-height: 280px; overflow-y: auto; }
.cp-sugerencias[hidden] { display: none; }
.cp-sugerencias li { padding: 10px 16px; cursor: pointer; font-size: 14px; color: var(--black, #111); }
.cp-sugerencias li:hover { background: var(--g50, #f5f5f5); }

/* Ajustes → Colores */
.acl-muestra { display: inline-block; width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--g400, #bbb); vertical-align: middle; }
.acl-rgb { white-space: nowrap; }
.acl-rgb .acl-picker { width: 34px; height: 34px; padding: 0; border: 1px solid var(--g400, #bbb); border-radius: 6px; background: none; vertical-align: middle; margin-right: 6px; cursor: pointer; }
.acl-rgb .acl-hex { width: 96px; display: inline-block; vertical-align: middle; }
.acl-nombre { min-width: 140px; }
.acl-fusionar { max-width: 220px; margin-left: 6px; }
tr.acl-pendiente td { background: #fff7e6; }

/* Filtros del listado (26/09/2026): el grupo enseña todos sus valores; si no caben, barra de scroll visible */
.cat-filter.is-open .cat-filter-body { max-height: 2000px; }
.cat-filter-bd { max-height: 340px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--g400, #bbb) transparent; scrollbar-gutter: stable; padding-right: 4px; }
.cat-filter-bd::-webkit-scrollbar { width: 6px; }
.cat-filter-bd::-webkit-scrollbar-thumb { background: var(--g400, #bbb); border-radius: 3px; }
.cat-filter-bd::-webkit-scrollbar-track { background: transparent; }

/* Bundle «Acquistati frequentemente insieme» (spec HU 1, 26/09/2026) */
.pdp-bundle-card { position: relative; }
.pdp-bundle-check { position: absolute; top: 4px; right: 4px; z-index: 2; border: 0; background: transparent; padding: 4px; cursor: pointer; line-height: 0; }
/* check como en el diseño: cuadrado blanco con borde azul y tick azul (no relleno azul) */
.pdp-bundle-check .cat-check-box { display: block; width: 24px; height: 24px; border-radius: 3px; border: 2px solid var(--g400, #909090); background: #fff; box-shadow: 0 0 0 3px #fff; }
.pdp-bundle-check .cat-check-box.is-on, .pdp-bundle-pop-check .cat-check-box.is-on {
  border-color: var(--blue, #002d72); background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 13l4 4L19 7' stroke='%23002d72' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.pdp-bundle-code { font-size: 12px; color: var(--g500, #6e6e6e); margin: 0; }
.pdp-bundle-units { font-size: 13px; color: var(--g500, #6e6e6e); margin: -4px 0 0; }
.pdp-bundle-price-old { color: var(--g500, #6e6e6e); font-weight: 400; font-size: 13px; margin-left: 4px; }
.pdp-bundle-card.is-disabled .pdp-bundle-units, .pdp-bundle-card.is-disabled .qty-selector { opacity: .45; }
.pdp-bundle-total-old { text-decoration: line-through; }
@media (max-width: 720px) {
  .pdp-bundle-check { display: none; }   /* móvil: sin check en la esquina (spec); se desmarca en el pop-up */
}
/* pop-up */
.pdp-bundle-pop .pdp-bundle-pop-box { max-width: 640px; text-align: left; position: relative; padding: 24px; max-height: 90vh; overflow-y: auto; }
.pdp-bundle-pop-x { position: absolute; top: 8px; right: 12px; border: 0; background: transparent; font-size: 28px; line-height: 1; color: var(--g500, #6e6e6e); cursor: pointer; }
.pdp-bundle-pop-lines { display: flex; flex-direction: column; gap: 16px; margin: 8px 0 16px; }
.pdp-bundle-pop-line { display: grid; grid-template-columns: 30px 88px 1fr; gap: 12px; align-items: start; }
.pdp-bundle-pop-line.is-off .pdp-bundle-pop-img, .pdp-bundle-pop-line.is-off .pdp-bundle-pop-info { opacity: .4; }
.pdp-bundle-pop-check { border: 0; background: transparent; padding: 4px 0; cursor: pointer; line-height: 0; }
.pdp-bundle-pop-check .cat-check-box { display: block; width: 22px; height: 22px; border-radius: 3px; border: 2px solid var(--g400, #909090); background: #fff; }
.pdp-bundle-pop-img { aspect-ratio: 1; background: var(--g50, #f5f5f5); }
.pdp-bundle-pop-img img { width: 100%; height: 100%; object-fit: contain; }
.pdp-bundle-pop-pack { font-size: 13px; color: var(--g500, #6e6e6e); margin: 0 0 6px; }
.pdp-bundle-pop-info .pdp-bundle-card-footer { flex-wrap: wrap; }
@media (max-width: 480px) { .pdp-bundle-pop-line { grid-template-columns: 26px 64px 1fr; } }

/* ── Accesibilidad WCAG 2.1 AA (auditoría del 26/09/2026: contrastes) ──
   Texto ≥ 4,5:1 (1.4.3) y bordes de controles ≥ 3:1 (1.4.11). El diseño usaba --g300 (#C4C4C4, 1,7:1) en
   placeholders y separadores y --g100 en algunos bordes; --g500 (#6E6E6E) da 5,1:1 sobre blanco y 4,7:1 sobre --g50. */
.search-input::placeholder, .qo-code-input::placeholder, input::placeholder, textarea::placeholder { color: var(--g500, #6e6e6e); opacity: 1; }
.header-brand .search-input::placeholder { color: var(--blue-80, #1a4490); }
.cat-bc-sep, .cat-banner-bc .cat-bc-sep, .cat-bc-scroll .cat-bc-sep, .pdp-pack-sep { color: var(--g500, #6e6e6e); }
.filter-drawer-clear-btn { color: var(--g500, #6e6e6e); }
.cat-view-btn { color: var(--g500, #6e6e6e); }
.cat-mobile-pill--all { border-color: var(--g400, #909090); }
.gift-item-radio { border-color: var(--g400, #909090); }
.cat-sort { border-color: var(--g400, #909090); }
.mega-close { border-color: var(--g400, #909090); }
/* líneas de los selectores de cantidad: 5,1:1 sobre blanco y 4,7:1 sobre fondos grises (--g50) */
.qty-selector { border-color: var(--g500, #6e6e6e); }
.qty-input { border-left-color: var(--g500, #6e6e6e); border-right-color: var(--g500, #6e6e6e); }

/* Ajustes → Reglas de regalo */
.admin-form { margin-top: 24px; padding: 20px; border: 1px solid var(--g100, #eee); border-radius: 8px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px 20px; }
.ar-grupos { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 18px; border: 1px solid var(--g100, #eee); padding: 10px 14px; border-radius: 6px; }
.ar-grupos legend { font-weight: 600; padding: 0 6px; }
.ar-grupos label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.ar-grupos input[type="text"] { width: 160px; display: inline-block; }
tr.ar-inactiva td { color: var(--g500, #6e6e6e); }
.checkout-field--check { display: flex; align-items: center; gap: 8px; }

/* Regalos (reglas de Ajustes → Regalos) */
.cart-item-gift-tag { color: var(--blue, #002d72); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.cart-item--gift .cart-item-info, .cart-page-item--gift .cart-page-item-info { justify-content: center; }
.cart-gift-promo--drawer { margin: 0 0 12px; }
.checkout-gift-promo { cursor: pointer; }

/* modal global «Avvisami quando ci sarà stock» */
.gdp-avisame-box { position: relative; text-align: center; max-width: 480px; padding: 28px 28px 24px; }
.gdp-avisame-x { position: absolute; top: 8px; right: 12px; border: 0; background: transparent; font-size: 28px; line-height: 1; color: var(--g500, #6e6e6e); cursor: pointer; }
.gdp-avisame-titulo { font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--blue, #002d72); margin: 0 0 12px; }
.gdp-avisame-nombre { margin: 0 0 14px; }
.gdp-avisame-texto { font-size: 15px; line-height: 1.5; color: var(--black, #111); margin: 0 0 16px; }
.gdp-avisame-qty { margin: 0 auto 16px; width: max-content; }
.gdp-avisame-box .btn-lg { width: 100%; justify-content: center; }
.qo-suggest-aviso { margin-top: 8px; }

/* Ajustes → Logs de errores del ERP (27/09/2026) */
.admin-logs-filtros { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin: 16px 0 8px; }
.admin-logs-filtros .ac-filtro { width: 220px; }
.admin-logs-botones { display: flex; gap: 12px; align-items: center; padding-bottom: 6px; }
.admin-logs-tabla td a { color: inherit; text-decoration: none; }
.admin-logs-tabla tbody tr:hover { background: var(--g100, #f4f4f4); }
.admin-logs-tabla td:first-child { white-space: nowrap; }
.admin-logs-datos { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 16px 0 24px; }
.admin-logs-datos dt { font-weight: 600; }
.admin-logs-datos dd { margin: 0; overflow-wrap: anywhere; }
.admin-logs-body { background: var(--g100, #f4f4f4); border: 1px solid var(--g300, #d6d6d6); border-radius: 4px; padding: 12px 16px;
  font-size: 12px; line-height: 1.5; max-height: 480px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 24px; }

/* Ajustes: menú lateral por grupos (27/09/2026) */
.admin-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 40px; align-items: start; }
.admin-main { min-width: 0; }
.admin-main .admin-wrap { margin-left: 0; margin-right: 0; }
.admin-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.admin-nav-label { margin: 0; }
.admin-nav-movil { display: none; }
.admin-nav-lista ul { list-style: none; margin: 0; padding: 0; }
.admin-nav-grupo > a { display: block; padding: 9px 12px; border-radius: 4px; font-weight: 600; font-size: 15px; color: var(--black, #111); text-decoration: none; }
.admin-nav-grupo > a:hover { background: var(--blue-10, #EBF0F8); }
.admin-nav-grupo.is-activo > a { background: var(--blue, #002D72); color: #fff; }
.admin-nav-grupo ul { margin: 4px 0 8px 12px; border-left: 2px solid var(--blue-10, #EBF0F8); }
.admin-nav-grupo ul a { display: block; padding: 6px 12px; font-size: 14px; color: var(--g700, #444); text-decoration: none; }
.admin-nav-grupo ul a:hover, .admin-nav-grupo ul a.is-activo { color: var(--blue, #002D72); font-weight: 600; }
.admin-nav-salir { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 16px; border-top: 1px solid var(--g300, #d6d6d6); }
.admin-nav-salir .admin-hint { margin: 0; overflow-wrap: anywhere; }
.admin-bloque { scroll-margin-top: 24px; }
.admin-bloque + .admin-bloque { margin-top: 8px; }
.admin-guardar { position: sticky; bottom: 0; background: var(--white, #fff); padding: 12px 0; border-top: 1px solid var(--g300, #d6d6d6); z-index: 2; }
.admin-resumen { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 16px 0 32px; }
.admin-tarjeta { border: 1px solid var(--g300, #d6d6d6); border-radius: 6px; padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; }
.admin-tarjeta h2 { margin: 0 0 4px; font-size: 17px; }
.admin-tarjeta p { margin: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.admin-tarjeta .admin-link { margin-top: auto; padding-top: 8px; }
.admin-resumen-lista { list-style: none; margin: 4px 0 0; padding: 0; font-size: 13px; }
.admin-resumen-lista li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.admin-resumen-grupos { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.admin-resumen-grupos small { display: block; color: var(--g500, #6e6e6e); }
@media (max-width: 899px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .admin-nav { position: static; gap: 8px; }
  .admin-nav-lista { display: none; }
  .admin-nav-movil { display: block; }
  .admin-nav-select { display: block; width: 100%; height: 48px; padding: 0 40px 0 14px; font: 600 15px/1.2 inherit; font-family: inherit; color: var(--black, #111);
    background: var(--white, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23002D72' stroke-width='1.8' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center;
    border: 1px solid var(--g500, #6e6e6e); border-radius: 4px; appearance: none; -webkit-appearance: none; }
  .admin-nav-salir { flex-direction: row; align-items: center; padding-top: 0; border-top: 0; }
}

/* Ajustes → estado de las importaciones (28/09/2026) */
.admin-importaciones th[scope="row"] { text-align: left; white-space: nowrap; }
.admin-importaciones td { font-size: 13px; }
.admin-estado { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.admin-estado--ok { background: #E6F4EA; color: #1E6B34; }
.admin-estado--ko { background: #FDECEA; color: #A4262C; }
.admin-estado--curso { background: var(--blue-10, #EBF0F8); color: var(--blue, #002D72); }
.admin-importacion-detalle { margin: 12px 0; }
.admin-codigos { margin: 4px 0; font-size: 13px; }
.admin-codigos summary { cursor: pointer; color: var(--blue, #002D72); font-weight: 600; }
.admin-codigos p { margin: 6px 0 0; line-height: 1.8; overflow-wrap: anywhere; }
.admin-codigos code { margin-right: 4px; }
.admin-importaciones th, .admin-importaciones td { padding-left: 10px; padding-right: 10px; }
.admin-imp-fechas { white-space: nowrap; }
.admin-importaciones td:nth-child(n+5) { text-align: center; }
.admin-importaciones td[colspan] { text-align: left; }

/* Ajustes → Reglas de regalo dentro del menú lateral (28/09/2026): las casillas no heredan el alto de 56 px
   de los campos del checkout y la tabla se ajusta al ancho (los botones Editar/Eliminar siempre a la vista) */
.admin-form input[type="checkbox"], .admin-main .checkout-field input[type="checkbox"] {
  width: 18px; height: 18px; min-width: 18px; padding: 0; margin: 0; border-radius: 3px; background: none; accent-color: var(--blue, #002D72); flex: none; }
.admin-form .checkout-field--check { align-self: end; min-height: 56px; }
.admin-form .checkout-field--check span { position: static; font-size: 14px; font-weight: 600; color: var(--black, #111); }
.ar-grupos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 18px; padding: 12px 16px 16px; }
.ar-grupos legend { font-size: 14px; }
.ar-grupos label { justify-content: flex-start; text-align: left; line-height: 1.3; }
.ar-grupos label:last-child { grid-column: 1 / -1; }
.ar-grupos input[type="text"] { height: 40px; padding: 0 12px; font-size: 14px; }
.admin-form h2.section-title { margin: 0 0 16px; font-size: 28px; }
.admin-wrap #arTable th, .admin-wrap #arTable td { white-space: normal; }
.admin-wrap #arTable td code { overflow-wrap: anywhere; word-break: break-word; }
.admin-wrap #arTable td.ac-media { white-space: nowrap; }
.admin-form .checkout-field--check { flex-direction: row; justify-content: flex-start; align-items: center; gap: 10px; }
.admin-wrap #arTable td:nth-child(2) { min-width: 180px; }
.admin-wrap #arTable td code { word-break: normal; }
.admin-wrap #arTable td.ar-skus { min-width: 120px; }
.admin-wrap #arTable td.ar-skus code { white-space: nowrap; display: inline-block; margin: 0 4px 2px 0; }
.admin-wrap #arTable td.ac-media { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.admin-main .qo-table thead th { padding: 10px 8px; letter-spacing: .03em; font-size: 11px; }
.admin-main .qo-table tbody td { padding: 10px 8px; }
.admin-main .qo-table tbody th { padding: 10px 8px; }

/* Ajustes → Marketing: cesta sin sesión por vista (28/09/2026) */
.cv-lista { display: flex; flex-direction: column; gap: 16px; margin: 12px 0; }
.cv-vista { border: 1px solid var(--g300, #d6d6d6); border-radius: 6px; padding: 14px 16px; }
.cv-vista.is-web { border-color: var(--blue, #002D72); }
.cv-cabecera { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.cv-cabecera h3 { margin: 0; font-size: 16px; }
.cv-web { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 10px; background: var(--blue-10, #EBF0F8); color: var(--blue, #002D72); font-size: 12px; font-weight: 600; }
.cv-campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 16px; align-items: end; margin-bottom: 12px; }
.cv-campo { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.cv-campo.cv-check { flex-direction: row; align-items: center; gap: 8px; min-height: 40px; }
.cv-campo input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue, #002D72); }
.cv-vista .cv-in { width: 100%; height: 40px; padding: 0 10px; text-align: left; font-size: 14px; border: 1px solid var(--g500, #6e6e6e); border-radius: 4px; }
.cv-tramos table { margin-bottom: 8px; }
.cv-tramos td { width: 30%; }
.cv-tramos td:last-child { width: auto; }
.cv-nueva { align-items: center; }
.cv-nueva .ac-filtro { width: 220px; height: 40px; }
.cv-nueva .cv-in { width: 220px; height: 40px; padding: 0 10px; font-size: 14px; border: 1px solid var(--g500, #6e6e6e); border-radius: 4px; text-align: left; }

/* Ficha: cuadradito del color en «Specifiche» (28/09/2026, como la web actual) */
.pdp-specs-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }

/* «Come riciclare» (28/09/2026): pasos con capturas de la web nueva */
.riciclo-passi { padding-left: 1.2em; }
.riciclo-passi li { margin-bottom: 32px; }
.riciclo-img { margin: 12px 0 0; }
.riciclo-img img { display: block; width: 100%; height: auto; border: 1px solid var(--g300, #d6d6d6); border-radius: 6px; }
.riciclo-img--pdf img { max-width: 560px; }

/* Ficha: la descripción fluye en dos columnas como en la web actual (28/09/2026). El prototipo usaba una rejilla
   de 2 columnas con un párrafo en cada una; el ERP suele dar un solo párrafo y la segunda columna quedaba vacía. */
.pdp-desc-cols { display: block; column-count: 2; column-gap: var(--sp-32, 32px); }
.pdp-desc-cols p + p { margin-top: 1em; }
@media (max-width: 900px) {
  .pdp-desc-cols { column-count: 1; }
}

/* Accés: alta de l'app d'autenticació (28/09/2026) */
.admin-card--alta { max-width: 760px; }
.alta-dades { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 12px 0; font-size: 14px; }
.alta-dades dt { font-weight: 600; }
.alta-dades dd { margin: 0; overflow-wrap: anywhere; }
.alta-metodes { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; margin: 16px 0 24px; }
.alta-qr svg { width: 220px; height: 220px; display: block; }
.alta-claus p { margin: 8px 0 4px; font-size: 14px; }
.alta-clau code { font-size: 18px; letter-spacing: .06em; }
.alta-uri code { font-size: 12px; overflow-wrap: anywhere; word-break: break-all; }
@media (max-width: 700px) { .alta-metodes { grid-template-columns: 1fr; } }

/* Ajustes → Administració (28/09/2026): diàleg sudo, contrasenya d'un sol cop, rols */
.sudo-capa { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.sudo-capa[hidden] { display: none; }
.sudo-dialeg { background: var(--white, #fff); border-radius: 8px; padding: 24px; width: min(420px, 100%); box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.sudo-dialeg h2 { margin: 0 0 8px; font-size: 20px; }
.au-clau { border: 2px solid var(--blue, #002D72); border-radius: 6px; padding: 12px 16px; margin: 12px 0; background: var(--blue-10, #EBF0F8); }
.au-clau code { font-size: 18px; letter-spacing: .04em; user-select: all; }
tr.au-inactiu td { color: var(--g500, #6e6e6e); }
.au-taula select { height: 36px; font-size: 13px; padding: 0 8px; border: 1px solid var(--g500, #6e6e6e); border-radius: 4px; }
.au-accions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.rl-rol { margin-bottom: 16px; }
.rl-arbre { margin: 12px 0; }
.rl-arbre label.rl-fill { padding-left: 20px; }
.rl-arbre code { font-size: 11px; color: var(--g500, #6e6e6e); }
.au-taula .au-sel { display: block; width: auto; min-width: 170px; max-width: 220px; height: 36px; padding: 0 8px; font-size: 13px;
  border: 1px solid var(--g500, #6e6e6e); border-radius: 4px; background: var(--white, #fff); text-align: left; }
.admin-wrap .au-taula td { white-space: normal; }
.au-taula td.au-accions { min-width: 180px; }
.au-taula .au-accions .btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; font-size: 11px; }
.au-taula .au-sel { min-width: 140px; max-width: 170px; }
.au-taula th, .au-taula td { padding-left: 6px; padding-right: 6px; }

/* «Personalizzabile» enlazado al configurador (28/09/2026) */
.offer-personalizable--link { cursor: pointer; }
.offer-personalizable--link:hover, .offer-personalizable--link:focus-visible { text-decoration: underline; }
.offer-personalizable--link:focus-visible { outline: 2px solid var(--blue, #002D72); outline-offset: 2px; border-radius: 2px; }

/* «Avvisami»: aire entre el mensaje (ok / error) y el botón (29/09/2026) */
.gdp-avisame-box .gdp-alert { margin: 0 0 20px; text-align: left; }
.gdp-avisame-box .gdp-avisame-cerrar { min-width: 140px; }

/* Cesta: las notas del resumen (próximo descuento, estimación sin sesión) con el mismo margen interior que las filas */
.cart-summary-hint, .cart-summary-note { margin: 0; padding: 4px var(--sp-24, 24px) 12px; font-size: 13px; line-height: 1.45; color: var(--g500, #6e6e6e); }
.cart-summary-hint { color: var(--blue, #002D72); }
@media (max-width: 767px) { .cart-summary-hint, .cart-summary-note { padding-left: var(--sp-16, 16px); padding-right: var(--sp-16, 16px); } }

/* Modales: confirmación (gdpConfirmar) con dos botones y aire bajo cualquier aviso dentro de un modal (29/09/2026) */
.gdp-aviso-botones { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.gdp-aviso-botones .btn { min-width: 120px; }
.gdp-aviso-box .gdp-alert + .btn, .gdp-aviso-box .gdp-alert + .admin-actions { margin-top: 20px; }
.sudo-dialeg .admin-resultado:empty { display: none; }
.sudo-dialeg .admin-actions { margin-top: 16px; }
.sudo-dialeg .admin-hint { margin: 0 0 14px; }
.sudo-dialeg .admin-actions { margin: 16px 0 0; padding: 0; border: 0; }
.sudo-dialeg .admin-resultado:not(:empty) { margin: 10px 0 0; }

/* Mis pedidos: cantidades pendientes de envío (spec «Cantidades no entregadas», 29/09/2026) */
.account-pendiente { display: block; margin-top: 6px; font-size: var(--fs-3xs, 12px); font-weight: 600; color: var(--pill-warn-fg, #8A5800); white-space: normal; }
.account-pendiente a { color: var(--blue, #002D72); font-weight: 700; text-transform: uppercase; text-decoration: underline; margin-left: 4px; }
.account-status--pendiente { background: var(--red-10, #FDECEC); color: var(--red, #A21C1C); }
.account-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; flex: none; }

/* Mis facturas: filtro entre fechas junto al año (29/09/2026) */
.account-filtres { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; margin-bottom: 24px; }
.account-filtres .account-year-filter { margin: 0; }
.account-date-filter { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.account-date-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.account-date-field input { height: 44px; padding: 0 12px; border: 1px solid var(--g500, #6e6e6e); border-radius: 4px; font: inherit; font-weight: 400; background: var(--white, #fff); }
.account-date-filter .btn { height: 44px; }
.account-date-clear { font-size: 13px; color: var(--blue, #002D72); text-decoration: underline; align-self: center; }
.account-date-clear { align-self: flex-end; line-height: 44px; }

/* Mis productos (29/09/2026): el nombre se lleva el espacio (como en el diseño): columnas fijas más estrechas y cuerpo 13 */
@media (min-width: 1025px) {
  .mp-table thead th { padding: 10px 8px; font-size: 11px; letter-spacing: .04em; }
  .mp-table tbody td { padding: 12px 8px; }
  .mp-table th.mp-col-code,  .mp-table td.mp-col-code  { width: 70px; }
  .mp-table th.mp-col-img,   .mp-table td.mp-col-img   { width: 56px; }
  .mp-table th.mp-col-price, .mp-table td.mp-col-price { width: 92px; }
  .mp-table th.mp-col-unit,  .mp-table td.mp-col-unit  { width: 150px; }   /* «Scatola da 2.400 pz» + «24 confezioni per scatola» */
  .mp-table th.mp-col-qty,   .mp-table td.mp-col-qty   { width: 124px; }
  .mp-table th.mp-col-last,  .mp-table td.mp-col-last  { width: 96px; }
  .mp-table th.mp-col-total, .mp-table td.mp-col-total { width: 92px; }
  .mp-table .mp-name { font-size: 13px; }
  .mp-table .mp-code { font-size: 13px; }
}

/* Avisos con varias líneas (productos que no se han podido añadir a la cesta, 30/09/2026) */
.gdp-aviso-msg { white-space: pre-line; }

/* Administrador navegando como un cliente (30/09/2026): etiqueta fija abajo a la izquierda, siempre visible
   (arriba la taparía el header fijo del diseño al hacer scroll; a la derecha, el cajón de la cesta) */
.gdp-suplantacio { position: fixed; left: 16px; bottom: 16px; z-index: 10000; max-width: min(420px, calc(100vw - 32px));
  background: #b3261e; color: #fff; font-size: 13px; line-height: 1.4; padding: 10px 14px; border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25); }
.gdp-suplantacio strong { font-weight: 700; overflow-wrap: anywhere; }
.gdp-suplantacio a { color: #fff; text-decoration: underline; font-weight: 700; margin-left: 6px; }
.admin-client-form { display: grid; gap: 16px; max-width: 460px; margin-top: 24px; }

/* Mis productos · «Unità di vendita» (30/09/2026): la unidad y la conversión en dos líneas (antes «Scatola700 pz») */
.mp-table td.mp-col-unit .qo-unit,
.mp-table td.mp-col-unit .qo-unit-sub { display: block; }
.mp-table td.mp-col-unit .qo-unit-sub { margin-top: 2px; line-height: 1.3; }

/* Pedido: línea de un producto que no está en ninguna categoría de la web (30/09/2026): sin enlace ni «Reordina» */
.order-line-noweb { margin: 4px 0 0; font-size: 12px; color: var(--g500, #6b7280); }

/* Informazioni account (30/09/2026, como el diseño «Información de la cuenta»): asterisco rojo en los obligatorios,
   separadores, interruptor «Cambia password» apagado y plegado, contraseñas a media anchura con la seguridad y Salva
   a la derecha */
.account-req { font-style: normal; color: var(--red, #d6262f); margin-left: 3px; }
.account-info-sep { border: 0; border-top: 1px solid var(--g200, #dfe2e8); margin: 24px 0; }
.account-info-switch { font-size: 13px; align-items: center; }
.account-info-switch .checkout-switch-ui { margin-top: 0; }
.account-password-block { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--sp-16, 16px); row-gap: 24px; margin-top: 20px; }
.account-password-block > * { grid-column: 1; }
.account-password-block[hidden] { display: none; }
.account-password-strength { margin: 8px 0 0; font-size: var(--fs-3xs, 12px); color: var(--g500, #6b7280); }
.account-password-strength strong { color: var(--black, #111); margin-left: 4px; }
.account-info-form .checkout-field-eye,
.account-info-form .checkout-field--password .checkout-field-eye svg { color: var(--g500, #6b7280); }
.account-info-actions { display: flex; justify-content: flex-end; }
@media (max-width: 767px) { .account-password-block { grid-template-columns: 1fr; } }
/* El ojo de «mostra password»: la regla del diseño posiciona también el svg de dentro del botón y el desplazamiento
   se sumaba (el ojo quedaba sobre el borde inferior, también en el acceso) */
.checkout-field-eye svg { position: static; transform: none; top: auto; right: auto; }

/* Paso 1 del checkout: «Se non hai un account, puoi acquistare come ospite» (spec 20230216) */
.account-guest { margin: 16px 0 0; text-align: center; font-size: 14px; }
.account-guest a { color: var(--blue, #13296b); text-decoration: underline; text-underline-offset: 2px; }

/* Paso 1 del checkout sin sesión: «Se non hai un account, puoi acquistare come ospite» bajo «Crea un account» */
.checkout-guest { margin-top: var(--sp-24, 24px); }
.checkout-guest a { color: var(--blue, #13296b); text-decoration: underline; text-underline-offset: 2px; }
.checkout-step-alert { width: 100%; }

/* Textos legales en modal (registro: privacidad y condiciones), como el de la web actual */
.gdp-legale { z-index: 10002; }
.gdp-legale-box { background: #fff; border-radius: 4px; width: 100%; max-width: 860px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.gdp-legale-head { display: flex; justify-content: flex-end; padding: 10px 12px; border-bottom: 1px solid var(--g200, #e5e7eb); }
.gdp-legale-x { background: none; border: 0; padding: 6px; cursor: pointer; color: var(--g500, #6b7280); line-height: 0; }
.gdp-legale-x:hover { color: var(--black, #111); }
.gdp-legale-body.text-page { max-width: none; overflow-y: auto; padding: 8px 32px 24px; flex: 1 1 auto; }
.gdp-legale-body .cat-banner-title { font-size: var(--fs-2xl, 28px); margin-top: 16px; }
.gdp-legale-body p, .gdp-legale-body li { font-size: var(--fs-base, 15px); line-height: 1.6; }
.gdp-legale-foot { display: flex; justify-content: flex-end; padding: 14px 16px; border-top: 1px solid var(--g200, #e5e7eb); }
@media (max-width: 600px) {
  .gdp-legale { padding: 0; }
  .gdp-legale-box { max-height: 100vh; height: 100%; border-radius: 0; }
  .gdp-legale-body.text-page { padding: 8px 16px 16px; }
}

/* Paso 2 del checkout (spec 20220623): título «Dati di contatto» en Empresa; nombre de la dirección fijo (empresa) */
.checkout-contact-title { margin-top: var(--sp-8, 8px); }
.checkout-field input[readonly] { color: var(--g500, #6b7280); cursor: default; }

/* Menú del móvil en dos niveles (Gerard, 02/10/2026): la raíz abre un panel con sus hijas por encima del menú */
.drawer-cat { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-12, 12px); width: 100%; padding: var(--sp-16, 16px) 0; border: 0; border-bottom: 1px solid var(--g100, #eee); background: none; font: inherit; font-size: var(--fs-lg, 18px); font-weight: 600; color: var(--black, #1a1a1a); text-align: left; cursor: pointer; }
.drawer-cat:hover { color: var(--blue, #002d72); }
.drawer-cat .gdp-chevron, .drawer-sub-back .gdp-chevron { width: 16px; height: 16px; flex-shrink: 0; }
.drawer-sub { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; background: var(--white, #fff); overflow-y: auto; }
.drawer-sub[hidden] { display: none; }
.drawer-sub-back { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: var(--sp-12, 12px); width: 100%; padding: var(--sp-16, 16px) var(--sp-24, 24px); border: 0; border-bottom: 2px solid var(--blue, #002d72); background: var(--g50, #f5f5f5); font: inherit; font-size: var(--fs-md, 16px); font-weight: 700; color: var(--black, #1a1a1a); text-align: left; cursor: pointer; }
.drawer-sub-nav { padding: 0 var(--sp-24, 24px) var(--sp-24, 24px); border-top: 0; }
.drawer-sub-nav a { font-size: var(--fs-md, 16px); font-weight: 600; padding: var(--sp-16, 16px) 0; }
.drawer-sub-nav .drawer-sub-all { text-transform: uppercase; letter-spacing: .02em; }
.mobile-drawer.has-sub .drawer-body { overflow: hidden; }

/* Ajustes → SEO (02/10/2026) */
.admin-mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.aseo-filtros { display: flex; flex-wrap: wrap; gap: var(--sp-12, 12px); align-items: flex-end; margin: var(--sp-16, 16px) 0; }
.aseo-filtros label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.aseo-filtros input, .aseo-filtros select { height: 40px; padding: 0 10px; border: 1px solid var(--g500, #6e6e6e); border-radius: 4px; font: inherit; }
.aseo-table { table-layout: fixed; width: 100%; }
.aseo-table th:first-child, .aseo-table td:first-child { width: 34%; }
.qo-table.aseo-table td { vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.aseo-campos { display: flex; flex-direction: column; gap: var(--sp-8, 8px); }
.aseo-campo { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--g600, #555); }
.aseo-campo input, .aseo-campo textarea, .aseo-campo select { width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--g500, #6e6e6e); border-radius: 4px; font: inherit; font-size: 13px; font-weight: 400; color: var(--black, #1a1a1a); background: var(--white, #fff); }
.aseo-campo input, .aseo-campo select { height: 36px; }
.aseo-campo textarea { min-height: 60px; resize: vertical; }
.aseo-pie { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-12, 12px); }
.aseo-campo--robots { width: 220px; max-width: 100%; }
.aseo-url { display: block; font-size: 12px; color: var(--g500, #6e6e6e); word-break: break-all; max-width: 260px; }
.aseo-origen { display: inline-block; margin-top: 4px; font-size: 11px; color: var(--g500, #6e6e6e); }
.aseo-cuenta { font-size: 11px; color: var(--g500, #6e6e6e); }
.aseo-cuenta.is-largo { color: var(--red, #c00); }
.aseo-paginas { display: flex; gap: var(--sp-8, 8px); align-items: center; margin-top: var(--sp-16, 16px); }

/* Enlaces a los textos legales dentro de las casillas del registro (accés i pas 1 del checkout): que se vea que se
   pueden pulsar (02/10/2026) */
a[data-legale] { color: var(--blue, #002d72); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; cursor: pointer; }
a[data-legale]:hover, a[data-legale]:focus-visible { color: var(--blue-dark, #001f4f); text-decoration-thickness: 2px; }

/* Páginas de contenido copiadas de la web actual (02/10/2026): sector, guías, catálogos y ayuda */
.page-contenido .text-page.gdp-cms { max-width: 1100px; }
.gdp-cms-banner { position: relative; height: 260px; overflow: hidden; background: var(--g100, #eee); }
.gdp-cms-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gdp-cms-banner-titulo { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); margin: 0; padding: var(--sp-16, 16px) var(--sp-48, 48px); background: var(--white, #fff); font-size: var(--fs-xl, 24px); font-weight: 700; color: var(--blue, #002d72); }
.gdp-cms img { max-width: 100%; height: auto; }
.gdp-cms table { width: 100%; border-collapse: collapse; margin: var(--sp-16, 16px) 0; font-size: var(--fs-sm, 14px); }
.gdp-cms th, .gdp-cms td { border: 1px solid var(--g100, #e5e5e5); padding: 8px 10px; text-align: left; vertical-align: top; }
.gdp-cms th { background: var(--g50, #f5f5f5); }
.gdp-cms .sectors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-16, 16px); margin: var(--sp-24, 24px) 0; }
.gdp-cms .gdp-cms-productos { margin: var(--sp-24, 24px) 0; }
.gdp-cms .gdp-cms-productos:not(.visible) { min-height: 360px; }
@media (max-width: 899px) { .gdp-cms .sectors-grid { grid-template-columns: repeat(2, 1fr); } .gdp-cms-banner { height: 180px; } .gdp-cms-banner-titulo { padding: 10px 24px; font-size: 20px; } }
@media (max-width: 600px) { .gdp-cms table { display: block; overflow-x: auto; } }
/* Productes dins de les pàgines de contingut: les mateixes targetes i columnes que els llistats (`cat-grid`, posat per
   contenido.js). Sense el subratllat dels enllaços del text (auditoria del 07/10/2026). */
.gdp-cms .gdp-cms-productos.cat-grid { margin: var(--sp-24, 24px) 0; }
.gdp-cms .gdp-cms-productos .offer-card, .gdp-cms .gdp-cms-productos .offer-card * { text-decoration: none; }
.gdp-cms .gdp-cms-productos .offer-card { min-width: 0; }
.gdp-cms .sector-card-name { overflow-wrap: anywhere; }
.gdp-cms-embed { position: relative; width: 100%; padding-top: max(60%, 324px); margin: var(--sp-24, 24px) 0; }
.gdp-cms-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Tarjetas de categoría dentro de las páginas de contenido: como en las landings (foto cuadrada que llena, sin subrayado) */
.gdp-cms .sector-card { text-decoration: none; color: inherit; }
.gdp-cms .sector-card-img img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.gdp-cms .sector-card-name { text-decoration: none; }
/* Condiciones del ERP (dirección de fuera) dentro de la ventana de textos legales */
.gdp-legale-frame { width: 100%; height: 65vh; border: 0; display: block; background: var(--white, #fff); }
.gdp-legale-fuera { margin: var(--sp-8, 8px) 0 0; font-size: var(--fs-sm, 14px); }

/* Descuento de línea en la cesta (página y cajón), como en el detalle del pedido (Gerard, 02/10/2026): etiqueta «−N%» en
   la esquina de la foto y el importe de la línea sin descuento tachado encima del importe final */
.cart-item-img, .cart-page-item-img { position: relative; }
.cart-line-badge { font-size: 11px; padding: 2px 6px; border-radius: 6px; }
.cart-page-item-img .cart-line-badge { font-size: var(--fs-xs, 12px); padding: var(--sp-4, 4px) 8px; }
.cart-line-old { display: block; font-size: var(--fs-sm, 14px); color: var(--red, #c4161c); text-decoration: line-through; line-height: 1.2; }
.cart-item-prices { display: flex; flex-direction: column; align-items: flex-end; }
.cart-item-prices .cart-line-old { font-size: 12px; }

/* Carrito del header al pasar el ratón (02/10/2026): el cajón sale como desplegable bajo el botón, sin oscurecer ni
   bloquear la página; el botón sigue visible y lleva a la cesta */
.cart-drawer.is-hover { pointer-events: none; }
.cart-drawer.is-hover .cart-drawer-backdrop { opacity: 0 !important; }
.cart-drawer.is-hover.is-open .cart-drawer-panel { pointer-events: all; bottom: auto; max-height: calc(100vh - 120px); border-radius: var(--radius, 8px) 0 0 var(--radius, 8px); box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.cart-pill { cursor: pointer; }

/* «Chi siamo» de la web italiana en PRE (scripts/importar_pre.py, 05/10/2026): las reglas que PRE añade a su página */
.page-chi-siamo .ed-title, .page-chi-siamo .ed-hero-title { padding-top: .2em; line-height: 1.1; overflow: visible; }
.page-chi-siamo .ed-label, .page-chi-siamo .ed-hero-eyebrow { display: block; }
.page-chi-siamo .ed-editorial + .ed-grid-4 { margin-top: 48px; }
.page-chi-siamo .ed-section--green, .page-chi-siamo .ed-section--green .ed-fig { background: #1F5A38; }
.page-chi-siamo .ed-counter--decimal::before { content: ","; }
@media (max-width: 991px) {
  .page-chi-siamo .ed-editorial + .ed-grid-4 { margin-top: 32px; }
  .page-chi-siamo .ed-grid-4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; height: auto; }
  .page-chi-siamo .ed-grid-4 .ed-tile { width: auto; max-width: none; height: auto; min-height: 0; margin: 0; aspect-ratio: 3 / 4; overflow: hidden; }
  .page-chi-siamo .ed-grid-4 .ed-tile img { width: 100%; height: 100%; object-fit: cover; }
}

/* Ficha: precio anterior tachado cuando hay descuento, delante del precio, como en la web italiana en PRE (05/10/2026) */
.pdp-price-old { font-size: var(--fs-base); color: var(--red); text-decoration: line-through; }

/* Pie: títulos de columna como <p class="footer-h"> (como PRE; los h4 sin h2/h3 delante eran un error de
   accesibilidad, 05/10/2026), con el mismo estilo que los h4 del diseño */
.footer-col .footer-h, .footer-cert-group .footer-h {
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.6); line-height: normal; margin: 0 0 var(--sp-16);
}
.footer-cert-group .footer-h { margin-bottom: var(--sp-12); }
@media (max-width: 720px) { .footer-col .footer-h { margin-bottom: var(--sp-8); } }

/* Logos de certificaciones y distinciones del pie: el tamaño de la web en producción (www.garciadepou.com/it, medido el
   05/10/2026), el mismo en escritorio y móvil (el diseño los reducía a 56–88 px de alto) */
.footer .gdp-logo-iso      { width: auto; height: 87px; object-fit: contain; }
.footer .gdp-logo-fsc      { width: auto; height: 120px; object-fit: contain; }
.footer .gdp-logo-pefc     { width: auto; height: 150px; object-fit: contain; }
.footer .gdp-logo-award    { width: 150px; height: 61px; }
.footer .gdp-logo-weforest { width: 100px; height: 100px; }
.footer .gdp-logo-acompartir { width: 159px; height: 80px; }
.footer .gdp-logo-cepyme   { width: 80px;  height: 80px; }
.footer [class^="gdp-logo-"] { max-width: none; max-height: none; object-fit: contain; display: block; }
.footer-cert-group > a, .footer-distinctions-list > a { display: inline-block; }

/* Ajustes → Informes (06/10/2026) */
.inf-filtros { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin: 16px 0 24px; }
.inf-filtros label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm, 14px); }
.inf-filtros input, .inf-filtros select { min-height: 38px; }
.inf-table td, .inf-table th { white-space: nowrap; }
.inf-table td:nth-child(2) { white-space: normal; }
.inf-num { text-align: right; font-variant-numeric: tabular-nums; }
.inf-barra-col { width: 30%; min-width: 120px; }
.inf-barra { display: block; height: 12px; border-radius: 2px; background: #0a3d91; min-width: 2px; }
.inf-dos { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; margin-top: 8px; }

/* Home: la imagen del banner de portadas también enlaza (06/10/2026) */
.portadas-banner-link { display: block; width: 100%; height: 100%; }

/* «Le nostre copertine» (/it/copertine-catalogo, 06/10/2026): línea de tiempo de portadas, como en PRE */
.gdp-tl-intro { max-width: 860px; margin: 0 auto 8px; }
.gdp-tl {
    position: relative;
    margin: 40px 0;
    padding: 10px 0;
    
}

.gdp-tl:before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(0,45,114,0.18);
    transform: translateX(-1px);
}

/* ITEMS */
.gdp-tl-item {
    position: relative;
    width: 50%;
    padding: 0 40px 80px 40px;
    box-sizing: border-box;
}

.gdp-tl-left { left: 0; text-align: right; }
.gdp-tl-right { left: 50%; text-align: left; }

/* PUNTO CENTRALE */
.gdp-tl-item:before {
    content: "";
    position: absolute;
    top: 34px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #fff;
    border: 2px solid #002d72;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 4;
}

.gdp-tl-left:before { right: -8px; }
.gdp-tl-right:before { left: -8px; }

/* CONNETTORE */
.gdp-tl-connector {
    position: absolute;
    top: 41px;
    height: 1px;
    width: 40px;
    background: rgba(0,45,114,0.18);
}
.gdp-tl-left .gdp-tl-connector { right: 0; }
.gdp-tl-right .gdp-tl-connector { left: 0; }

/* TIPOGRAFIA */
.gdp-tl-year {
    display: block;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #002d72;
    margin: 0;
    line-height: 1;
}

.gdp-tl-author {
    margin: 5px 0 15px 0;
    font-size: 22px;
    color: #002d72;
    font-weight: 600;
    line-height: 1.2;
}

/* CARD */
.gdp-tl-card {
    display: inline-block;
    text-align: left;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 14px;
    padding: 12px;
    max-width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.gdp-tl-img {
    width: 100%;
    display: block;
    border-radius: 8px;
    transition: transform .3s ease;
}

.gdp-tl-card:hover .gdp-tl-img {
    transform: scale(1.02);
}

/* TOOLTIP DESCRIZIONE */
.gdp-tl-desc {
    position: absolute;
    top: 100px;
    width: min(380px, 40vw);
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(0,45,114,0.15);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateY(10px);
    transition: all .25s ease;
    pointer-events: none;
    text-align: left;
    z-index: 20;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.gdp-tl-left .gdp-tl-desc { left: calc(100% + 20px); }
.gdp-tl-right .gdp-tl-desc { right: calc(100% + 20px); }

.gdp-tl-item:hover .gdp-tl-desc {
    opacity: 1;
    transform: translateY(0);
}

.gdp-tl-toplink { margin-top: 10px; font-size: 12px; text-align: right; }
.gdp-tl-toplink a { color: #999; text-decoration: none; }
.gdp-tl-toplink a:hover { color: #002d72; }

@media(max-width:900px){
    .gdp-tl:before { left: 20px; transform: none; }
    .gdp-tl-item { width: 100%; left: 0!important; text-align: left!important; padding: 0 0 40px 50px; }
    .gdp-tl-item:before { left: 13px; right: auto; }
    .gdp-tl-connector { display: none; }
    .gdp-tl-year { font-size: 32px; }
    .gdp-tl-author { font-size: 18px; }
    .gdp-tl-desc { 
        position: static; 
        width: auto; 
        opacity: 1; 
        transform: none; 
        pointer-events: auto; 
        margin-top: 15px;
        background: #f9f9f9;
    }
}
.gdp-tl-desc:focus-within, .gdp-tl-item:focus-within .gdp-tl-desc { opacity: 1; transform: translateY(0); }

/* Impresión de la ficha de producto («Stampa la scheda completa», 06/10/2026): la página tal cual, compacta, con el logo
   arriba, precio y datos; sin lo que no sirve en papel (cabecera y pie de la web, compra, sliders, galetas y xat) */
.print-solo { display: none; }
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; }
  .print-solo { display: flex !important; justify-content: space-between; align-items: center; border-bottom: 1px solid #ccd5e3;
                padding-bottom: 6mm; margin-bottom: 6mm; font-size: 10pt; color: #002d72; }
  .print-solo img { height: 12mm; width: auto; }
  .pdp-print-wrap, .pdp-sticky-bar, .pdp-actions, .pdp-options, .pdp-thumbs, .pdp-img-nav, .pdp-ficha, .pdp-purchase--shipping,
  .pdp-variants, .pdp-recent, .pdp-bundle, .swiper-btn, .offers-header-actions,
  .cky-consent-container, .cky-btn-revisit-wrapper, .cky-modal, #livechat-wrapper, chat-oct8ne, .gdp-toasts, .gdp-suplantacio,
  .cat-banner-bc, nav[aria-label="Percorso di navigazione"] { display: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; visibility: visible !important; }
  main, section, .pdp-main, .pdp-main-wrap, .pdp-layout { min-height: 0 !important; height: auto !important; padding-top: 0 !important; margin-top: 0 !important; }
  .pdp-layout { display: grid !important; grid-template-columns: 7cm 1fr !important; gap: 8mm !important; align-items: start !important; }
  .pdp-layout > * { width: auto !important; max-width: none !important; flex: none !important; padding: 0 !important; }
  .pdp-gallery { position: static !important; display: block !important; }
  .pdp-main-img { max-width: 7cm; aspect-ratio: auto !important; break-inside: avoid; }
  .pdp-accordion-body { display: block !important; }
  .pdp-accordion-chevron { display: none !important; }
  .pdp-details { padding-top: 6mm !important; }
  .pdp-details-grid, .pdp-details-grid > *, .pdp-details-main { display: block !important; width: auto !important; max-width: none !important;
                                                                flex: none !important; position: static !important; }
  .pdp-accordion { margin: 0 0 4mm !important; border: 0 !important; }
  .pdp-accordion-head { padding: 0 0 2mm !important; }
  .pdp-accordion-body { padding: 0 !important; }
  .pdp-specs-row, .pdp-accordion-head { break-inside: avoid; break-after: avoid; }
  a[href]::after { content: none !important; }
}

/* Cesta: precio unitario y descuento como en la web actual (Gerard, 07/10/2026): tachado, banderita roja «-N%», precio
   nuevo y unidad; a la derecha, el total de la línea. La etiqueta ya no va sobre la foto. */
.cart-page-item-price--cols { flex-direction: row; align-items: flex-start; gap: var(--sp-24, 24px); }
.cart-unit-col, .cart-total-col { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.cart-unit-old { font-size: var(--fs-3xs, 12px); color: var(--g500); text-decoration: line-through; line-height: 1.2; }
.cart-disc-flag { display: inline-block; background: var(--red, #c4161c); color: #fff; font-size: var(--fs-xs, 12px); font-weight: 700;
  line-height: 1; padding: 4px 8px 4px 14px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 7px 50%); }
.cart-unit-price { font-size: var(--fs-sm, 14px); font-weight: 600; line-height: 1.2; }
@media (max-width: 600px) {
  .cart-page-item-price--cols { gap: var(--sp-16, 16px); }
}

/* Capa del buscador: añadir a la cesta desde la tarjeta (07/10/2026) */
.dfd-card-link { display: flex; flex-direction: column; flex: 1; text-decoration: none; color: inherit; }
.dfd-card-buy { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dfd-card-buy .qty-selector { flex: 0 0 auto; }
.dfd-card-buy .qty-input { width: 56px; }
.dfd-card-unit { margin-top: 10px; font-size: 13px; color: #6e6e6e; }
.dfd-card-add { margin-left: auto; }
.dfd-card-nostock { margin-top: 14px; font-size: 13px; color: #6e6e6e; }

/* Panel «Aggiunto al carrello» mientras el ERP devuelve la cesta */
.cart-confirm-loading { position: static; display: flex; justify-content: center; padding: 48px 0; background: none; }

/* Panel «Aggiunto al carrello»: botón a la cesta también arriba y subtotal de la cesta abajo (07/10/2026) */
.cart-confirm-top { padding: var(--sp-16, 16px) var(--sp-24, 24px); border-bottom: 1px solid var(--g100); }
.cart-confirm-top .btn { width: 100%; justify-content: center; }
.cart-confirm-subtotal { margin-bottom: var(--sp-12, 12px); }

/* Cajón de la cesta mientras el ERP recalcula (cambio de cantidad o quitar una línea): spinner dentro del cajón */
.cart-drawer.is-loading .cart-drawer-panel::after { content: ""; position: absolute; inset: 0; z-index: 5; cursor: progress;
  background: rgba(255,255,255,.65) url("/static/img/logos/shield-gdp.svg") center / 44px 60px no-repeat; animation: gdp-cajon-carga 1.1s ease-in-out infinite; }
@keyframes gdp-cajon-carga { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }

/* NEW / descuento sobre las fotos pequeñas (sugerencias del panel y del cajón, capa del buscador) — 07/10/2026 */
.cart-confirm-added-media { position: relative; }
.cart-confirm-added-media .offer-badge--new { top: 2px; left: 2px; }
.cart-confirm-added-media .offer-badge--new img { width: 26px; height: 26px; object-fit: contain; }
.cart-confirm-added-media .offer-badge--discount { font-size: 10px; padding: 2px 12px 2px 6px; }
.dfd-card-image .offer-badge--discount { top: -8px; left: -8px; }
.dfd-card-image .offer-badge--new { top: -8px; left: -8px; }
.dfd-card-image .offer-badge--new img { height: 48px; width: 48px; object-fit: contain; }   /* como en la ficha */
.recent-card-img { position: relative; }
/* El segell NEW no hereta la mida de la foto (`.recent-card-img img` = 100 %): com a la fitxa, 48 px */
.recent-card-img .offer-badge--new img { width: 48px; height: 48px; object-fit: contain; }

/* Fitxa: «Stampa la scheda completa» a la columna estreta — el text sortia del botó (07/10/2026) */
.pdp-print-wrap .btn { padding: 10px var(--sp-12, 12px); height: auto; min-height: 44px; white-space: normal; text-align: center; line-height: 1.3; max-width: 100%; }
.pdp-print-wrap .btn svg { flex-shrink: 0; }

/* Fitxa sense estoc al mòbil: el bloc d'avisos sobresortia 2 px (auditoria 07/10/2026); els botons poden fer dues línies */
.pdp-actions--oos > * { min-width: 0; max-width: 100%; }
.pdp-oos-ctas .btn { white-space: normal; height: auto; min-height: 44px; padding-block: 10px; text-align: center; line-height: 1.3; }
/* Textos legals: les URL llargues no surten de la pàgina al mòbil */
.text-page { overflow-wrap: anywhere; }
