/* Identidad Gestab. Se carga después del CSS común y sólo para esta tienda.
   No cambia medidas/disposición, imágenes, campañas guardadas ni reglas de venta. */
:root {
  --primary: #005BA5;
  --primary-dark: #003F73;
  --primary-light: #EAF4FC;
  --secondary: #EF7900;
  --secondary-dark: #A84E00;
  --secondary-light: #FFF2E6;
  --background: #F7F9FC;
  --surface: #FFFFFF;
  --text-primary: #1F2937;
  --text-secondary: #64748B;
  --border: #E2E8F0;

  --on-primary: #FFFFFF;
  --on-secondary: #1F2937;
  --link-color: var(--primary);
  --heading-color: var(--primary-dark);
  --surface-muted: var(--background);
  --text-on-tint: #475569;
  --control-border: var(--text-secondary);
  --purchase-hover: #E87500;
  --purchase-active: #E37100;
  --focus-ring: var(--primary);
  --footer-link: var(--primary-light);
  --error: #B91C1C;
  --error-bg: #FEF2F2;
  --success: #047857;
  --success-bg: #ECFDF5;
  --warning: #92400E;
  --warning-bg: #FFFBEB;
  --shadow: 0 8px 24px rgb(31 41 55 / 6%);
  --control-shadow: 0 0 0 3px rgb(0 91 165 / 15%);
  color-scheme: light;
}

/* El modo noche conserva su función con equivalentes de contraste alto. */
html.dark-mode {
  --background: #0B1220;
  --surface: #111C2D;
  --surface-elevated: #17263A;
  --surface-hover: #1D3047;
  --border: #2C4058;
  --primary: #60B7FF;
  --primary-hover: #8DCCFF;
  --primary-soft: #132F4B;
  --secondary: #FF9A3C;
  --secondary-hover: #FFAB5C;
  --secondary-soft: #382818;
  --text-primary: #F1F5F9;
  --text-secondary: #A8B5C7;
  --text-muted: #94A3B8;
  --text-on-accent: #17202B;
  --success: #4ADE80;
  --error: #F87171;
  --warning: #FBBF24;
  --surface-muted: var(--surface-elevated);
  --text-on-tint: var(--text-secondary);
  --link-color: var(--primary);
  --heading-color: var(--text-primary);
  --primary-light: var(--primary-soft);
  --secondary-light: var(--secondary-soft);
  --secondary-dark: #FFD0A1;
  --on-secondary: var(--text-on-accent);
  --purchase-hover: var(--secondary-hover);
  --purchase-active: var(--secondary);
  --control-border: #758CA8;
  --focus-ring: var(--link-color);
  --footer-link: var(--primary);
  --error-bg: #451D2C;
  --success-bg: #143A30;
  --warning-bg: #3D321C;
  --shadow: none;
  --control-shadow: 0 0 0 3px var(--primary-soft);
  color-scheme: dark;
}

/* Puente a los nombres que ya consume site.css. */
body.theme-corporativo, body.theme-comercial {
  --bg: var(--background);
  --panel: var(--surface);
  --line: var(--border);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --brand-blue: var(--primary);
  --brand-orange: var(--secondary);
  --brand-white: var(--on-primary);
  --brand-link: var(--link-color);
  --accent-main: var(--primary);
  --accent-soft: var(--primary-light);
  --cta-main: var(--secondary);
  color: var(--text-primary);
  background: var(--background);
}
html.dark-mode body { color: var(--text-primary); background: var(--background); }
.ambient-lines, .home-scene::before, .home-b2b-glow { opacity: 0; }
.surface, .panel, .glass-pill, .catalog-filters-drawer, .catalog-filter-block,
.deal-card, .stat-card, .category-tile, .spotlight-card, .product-home-card,
.home-new-grid .product-home-card, .home-featured-grid .product-home-card,
.home-order-flow, .home-b2b-card-main, .home-b2b-card-media, .enterprise-solution,
.checkout-steps, .checkout-sticky-bar,
html.dark-mode :is(.surface, .panel, .glass-pill, .deal-card, .stat-card, .category-tile,
  .spotlight-card, .product-home-card, .catalog-filters-drawer, .catalog-filter-block,
  .checkout-steps, .checkout-sticky-bar) {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-primary);
}
.surface, .product-home-card, .product-card { box-shadow: var(--shadow); }
.stat-card-feature::before { background: none; }
.stat-card-feature { --feature-rgb: var(--accent-rgb); }
.mini-media, .category-media, .category-media-fallback { background: var(--surface-muted); }

/* Los fondos calculados por ColorThief no deben teñir la foto o su tarjeta.
   !important aquí es deliberado: prevalece sobre esos estilos inline. */
.product-card, .product-card.is-active, .product-image-frame,
.product-gallery-main, .product-home-media, .spotlight-main-image-frame,
.home-new-grid .catalog-item-media, .home-featured-grid .catalog-item-media,
html.dark-mode :is(.product-card, .product-card.is-active, .product-image-frame,
  .product-gallery-main, .product-home-media, .spotlight-main-image-frame) {
  background: var(--surface) !important;
}
.product-card.is-active, .product-gallery-thumb.is-active { border-color: var(--primary); }
.product-card.is-active { box-shadow: var(--control-shadow); }
.product-gallery-thumb { background: var(--surface); border-color: var(--border); }
h1, h2, h3, h4, .section-title { color: var(--heading-color); }
.product-home-name, .catalog-item-title, .spotlight-card-title, .deal-name,
.category-name, .stat-value, .stat-feature-title, .home-b2b-title,
.enterprise-solution-title, .checkout-item-name, .home-order-flow-title {
  color: var(--text-primary);
}
.text-slate-400, .text-slate-500, .text-slate-600, .text-gray-500,
html.dark-mode :is(.text-slate-400, .text-slate-500, .text-slate-600, .text-gray-500) {
  color: var(--text-secondary) !important;
}
.text-slate-700, .text-slate-800, .text-slate-900,
html.dark-mode :is(.text-slate-700, .text-slate-800, .text-slate-900) {
  color: var(--text-primary) !important;
}
.product-home-cat, .catalog-item-brand, .product-home-stock, .spotlight-card-brand,
.deal-label, .stat-kicker, .stat-feature-copy, .home-b2b-subtitle,
.enterprise-solution-text, .checkout-sticky-total-label, .checkout-delivery-group-meta,
.home-featured-grid .catalog-item-brand { color: var(--text-secondary); }
.product-description-html { color: var(--text-secondary); }
.product-description-html :is(h2,h3,h4,strong,b) { color: var(--text-primary); }
.product-description-html blockquote { background: var(--surface-muted); color: var(--text-primary); }
.text-brand-link, .text-blue-700, .section-link, .category-cta, .deal-link,
.product-home-link, .catalog-item-link, .product-description-html a,
.stat-online, .stat-icon, .home-featured-grid .catalog-item-link,
html.dark-mode .text-brand-link { color: var(--link-color) !important; }
.text-brand-link:hover, .section-link:hover, .product-home-link:hover,
.catalog-item-link:hover, .product-description-html a:hover { text-decoration: underline; }
html :is(.catalog-item-price, .product-home-price, .deal-price, .checkout-item-price,
  .checkout-item-line, .checkout-sticky-total-amount, .detail-price-wrap,
  #detail-price, #detail-unit-price, #product-detail-price-main, #product-detail-unit-price) {
  color: var(--text-primary) !important;
}
.detail-price-wrap, .detail-purchase-main { background: var(--surface) !important; border-color: var(--border); }

/* Encabezado blanco, navegación azul y carrito comercial reconocible. */
.site-header, .top-strip, html.dark-mode .site-header, html.dark-mode .top-strip {
  background: var(--surface); border-color: var(--border); color: var(--link-color);
}
.nav-chip, .account-pill, .mobile-search-shell, .catalog-search-shell,
.catalog-filters-close, .spotlight-nav-btn,
html.dark-mode :is(.nav-chip, .account-pill, .mobile-search-shell, .catalog-search-shell, .catalog-filters-close) {
  background: var(--surface); border-color: var(--control-border); color: var(--link-color);
  box-shadow: none;
}
.nav-chip:hover, .account-pill:hover { background: var(--primary-light); border-color: var(--primary); }
.nav-chip[href="/catalogo"], .home-category-stack-head {
  background: var(--primary); color: var(--on-primary); border-color: var(--primary);
}
.home-category-stack-head :is(.section-title,.section-link) { color: var(--on-primary) !important; }
.home-category-stack-head .section-link:hover { color: var(--on-primary) !important; }
.site-header :is(.bx, .top-strip-link) { color: inherit; }
.mobile-search-shell, .catalog-search-shell { color: var(--link-color); }
.mobile-search-shell .bx, .catalog-search-shell .bx { color: var(--link-color) !important; }
.account-pill-count:where(:not(.mobile-tab-badge)), .cart-toast-count, .catalog-filter-badge {
  background: var(--secondary); color: var(--on-secondary); border-color: var(--secondary-dark);
}

/* Acciones generales azules; compra naranja con texto oscuro (AA). */
.btn-primary, .btn-primary-orange, .home-b2b-button,
html.dark-mode .btn-primary {
  background: var(--primary); color: var(--on-primary); border-color: var(--primary);
  box-shadow: none; filter: none;
}
.btn-primary:hover:not(:disabled), .btn-primary-orange:hover:not(:disabled), .home-b2b-button:hover {
  background: var(--primary-dark); color: var(--on-primary); filter: none;
}
.btn-primary:active:not(:disabled) { background: var(--primary-dark); box-shadow: var(--control-shadow); }
.btn-ghost, .qty-btn, .checkout-qty-btn, .catalog-item-mobile-qty,
html.dark-mode :is(.btn-ghost,.qty-btn,.checkout-qty-btn,.catalog-item-mobile-qty) {
  background: var(--surface); color: var(--link-color); border-color: var(--link-color);
}
.btn-ghost:hover:not(:disabled), .qty-btn:hover:not(:disabled), .checkout-qty-btn:hover:not(:disabled) {
  background: var(--primary-light); color: var(--link-color); border-color: var(--link-color);
}
form[action="/carrito/agregar"] .btn-primary, #checkout_submit_btn,
.checkout-sticky-submit, a[href="/checkout"].btn-primary, #mp_fallback_link,
.catalog-card-add-btn, .catalog-item-add, .account-pill[aria-label="Carrito"] {
  background: var(--secondary); color: var(--on-secondary); border-color: var(--secondary-dark);
  box-shadow: none; filter: none;
}
form[action="/carrito/agregar"] .btn-primary:hover:not(:disabled), #checkout_submit_btn:hover:not(:disabled),
.checkout-sticky-submit:hover:not(:disabled), a[href="/checkout"].btn-primary:hover,
#mp_fallback_link:hover, .catalog-card-add-btn:hover:not(:disabled), .catalog-item-add:hover,
.account-pill[aria-label="Carrito"]:hover {
  background: var(--purchase-hover); color: var(--on-secondary); border-color: var(--secondary-dark);
}
form[action="/carrito/agregar"] .btn-primary:active:not(:disabled), #checkout_submit_btn:active:not(:disabled),
.checkout-sticky-submit:active:not(:disabled), .catalog-card-add-btn:active:not(:disabled),
a[href="/checkout"].btn-primary:active { background: var(--purchase-active); }
button:disabled, input:disabled, select:disabled, .btn-primary:disabled,
.catalog-card-add-btn:disabled, .purchase-disabled-inline,
.account-pill.account-pill-disabled, .account-pill.account-pill-disabled:hover {
  background: var(--surface-muted); color: var(--text-secondary); border-color: var(--border);
  box-shadow: none; cursor: not-allowed;
}

/* Filtros y formularios: selección azul y contorno visible, también sin color. */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea,
html.dark-mode :is(input,select,textarea), .filter-search-input, .catalog-sort-select {
  background-color: var(--surface); border-color: var(--control-border); color: var(--text-primary);
  accent-color: var(--primary);
}
input::placeholder, textarea::placeholder { color: var(--text-secondary); opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }
.mobile-search-input, .catalog-search-input { background: transparent !important; color: var(--text-primary); }
.filter-chip { color: var(--text-primary); border-color: var(--control-border); background: var(--surface); }
.filter-chip:hover { color: var(--link-color); background: var(--primary-light); border-color: var(--primary); }
.filter-chip.active { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
.scale-row, .detail-scale-row { background: var(--surface); border-color: var(--border); }
.scale-row.is-active, .detail-scale-row.is-active { background: var(--primary-light); border-color: var(--primary); }
.detail-scale-label, .detail-scale-row.is-active .detail-scale-label { color: var(--text-primary); }
.filter-search-input:focus, .catalog-sort-select:focus { border-color: var(--primary); box-shadow: var(--control-shadow); }
:is(a,button,input,select,textarea,summary,[tabindex]):focus-visible {
  outline: 2px solid var(--focus-ring); outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--on-primary);
}
.catalog-search-shell:focus-within, .mobile-search-shell:focus-within {
  border-color: var(--primary); box-shadow: var(--control-shadow);
}

/* Promociones suaves: el naranja intenso se reserva a acciones de compra. */
.promo-strip, .promo-tile-orange, .deal-card-secondary, .home-b2b-cta,
.store-mode-banner, .purchase-disabled-card, .catalog-mode-chip,
.detail-discount-chip, .detail-scale-discount, .home-new-badge,
.badge-oferta, .badge-destacado, .product-badge, .catalog-low-stock-badge,
.home-b2b-kicker, .enterprise-solution-stat {
  background: var(--secondary-light); color: var(--secondary-dark); border-color: var(--secondary-dark);
  box-shadow: none;
}
.purchase-disabled-copy, .purchase-disabled-card .bx { color: var(--secondary-dark); }
.promo-tile-orange :is(.promo-mini,.promo-title,.promo-link) { color: var(--secondary-dark); }
.promo-tile-light, html.dark-mode .promo-tile-light { background: var(--surface); color: var(--text-primary); }
.promo-tile-blue, .hero-main, .spotlight-main { background: var(--primary-dark); color: var(--on-primary); }
.promo-tile-blue :is(.promo-mini,.promo-title,.promo-link), .hero-main :is(h1,h2,.hero-subtitle,.hero-eyebrow),
.spotlight-main :is(.spotlight-title,.spotlight-price,.spotlight-brand,.spotlight-badge) { color: var(--on-primary); }
.home-new-grid .catalog-item-link, .home-new-grid .catalog-item-link:hover,
.home-featured-grid .catalog-item-link:hover { background: transparent; color: var(--link-color); box-shadow: none; }
.home-new-grid .catalog-item-media { border-color: var(--border); }
.home-new-grid .product-home-card:hover { box-shadow: var(--shadow); }
.home-b2b-point { background: var(--surface); color: var(--text-primary); border-color: var(--border); }
.home-b2b-point .bx, .home-b2b-card-list .bx { color: var(--secondary-dark); }
.home-b2b-subtitle { color: var(--text-on-tint); }
.enterprise-solution-icon { background: var(--primary-light); color: var(--link-color); }
.enterprise-solution-icon-orange { background: var(--secondary-light); color: var(--secondary-dark); }
.home-order-step.is-active .home-order-step-icon { background: var(--secondary); color: var(--on-secondary); border-color: var(--secondary-dark); }
.home-order-step.is-active .home-order-step-title { color: var(--secondary-dark); }
.home-order-track::before { background: var(--border); }

/* Feedback semántico separado de los colores de marca. */
.text-red-600, .text-red-700, .product-stock-status.is-unavailable,
html.dark-mode .product-stock-status.is-unavailable, .btn-ghost.text-red-600 { color: var(--error) !important; }
.bg-red-50, .checkout-delete-btn { background: var(--error-bg); color: var(--error); border-color: var(--error); }
.text-emerald-700, .text-emerald-600, .product-stock-status.is-available,
html.dark-mode .product-stock-status.is-available { color: var(--success) !important; }
.bg-emerald-50 { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.checkout-step.is-done { color: var(--success); }
.checkout-step.is-done .checkout-step-num { background: var(--success); color: var(--surface); border-color: var(--success); }
.status-preparacion { background: var(--warning-bg); color: var(--warning); }
.checkout-step { color: var(--text-secondary); }
.checkout-step.is-active { color: var(--link-color); }
.badge-nuevo, .badge-mas-vendido, .badge-despacho, .badge-retiro, .badge-rm,
html.dark-mode :is(.badge-nuevo,.badge-mas-vendido,.badge-despacho,.badge-retiro,.badge-rm) {
  background: var(--primary-light); color: var(--link-color); border-color: var(--control-border);
}
.badge-envio-gratis, html.dark-mode .badge-envio-gratis { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.status-badge.status-recibido, html.dark-mode .status-badge.status-recibido {
  background: var(--primary-light); color: var(--link-color); border-color: var(--control-border);
}
.status-badge.status-preparacion, html.dark-mode .status-badge.status-preparacion { background: var(--warning-bg); color: var(--warning); }
.status-badge.status-despachado, .status-badge.status-entregado,
html.dark-mode :is(.status-badge.status-despachado,.status-badge.status-entregado) { background: var(--success-bg); color: var(--success); }

/* Utilidades del CSS común, sin recolorear mensajes semánticos. */
[class~="bg-white"], [class~="bg-white/80"], [class~="bg-white/85"],
html.dark-mode :is(.bg-white,.bg-slate-50) { background: var(--surface) !important; }
.bg-slate-50, [class~="bg-slate-50/65"], [class~="bg-slate-50/70"] { background: var(--surface-muted); }
.border-slate-200, .border-slate-300, html.dark-mode :is(.border-slate-200,.border-slate-300) { border-color: var(--border); }
input.border-slate-300, select.border-slate-300, textarea.border-slate-300 { border-color: var(--control-border); }

/* El CSS compartido conserva los estilos de la isla móvil. */
.cart-toast, html.dark-mode .cart-toast { background: var(--primary-dark); color: var(--on-primary); border-color: var(--primary); }
.cart-toast-icon { background: var(--secondary-light); color: var(--secondary-dark); }
.web-bg footer { background: var(--surface); color: var(--text-primary); border-color: var(--border); }
footer .text-slate-500 { color: var(--text-secondary) !important; }
footer a, footer a:hover { color: var(--link-color); }
footer a:hover { text-decoration: underline; }

/* Reemplazar excepciones nocturnas del tema anterior por los mismos tokens. */
html.dark-mode :is(.category-media,.category-media-fallback,.home-b2b-card-media) { background: var(--surface-muted); border-color: var(--border); }
html.dark-mode :is(.home-b2b-card-main,.enterprise-solution,.home-b2b-point,.home-order-flow) { background: var(--surface); border-color: var(--border); }
html.dark-mode .home-category-stack-head { background: var(--primary); }
html.dark-mode .promo-tile-blue { background: var(--primary-dark) !important; border-color: var(--control-border) !important; }
html.dark-mode :is(.promo-tile-orange,.home-b2b-cta,.home-b2b-kicker,.enterprise-solution-stat,
  .product-badge,.detail-discount-chip,.detail-scale-discount) {
  background: var(--secondary-light) !important; color: var(--secondary-dark) !important; border-color: var(--secondary-dark) !important;
}
html.dark-mode :is(.promo-tile-blue,.promo-tile-orange) :is(.promo-mini,.promo-title,.promo-link) { color: inherit !important; }
html.dark-mode :is(.qty-btn,.product-gallery-thumb,.btn-ghost,.scale-row,.detail-scale-row) {
  background: var(--surface) !important; border-color: var(--control-border) !important; color: var(--text-primary) !important;
}
html.dark-mode :is(.scale-row,.detail-scale-row).is-active { background: var(--primary-light) !important; border-color: var(--focus-ring) !important; }
html.dark-mode .detail-scale-row .detail-scale-label { color: var(--text-primary) !important; }
html.dark-mode .btn-ghost { color: var(--link-color) !important; }
html.dark-mode .btn-ghost.text-red-600 { color: var(--error) !important; }
html.dark-mode .catalog-item-add { background: var(--secondary) !important; color: var(--on-secondary) !important; border-color: var(--secondary-dark) !important; }
html.dark-mode :is(.stat-online,.category-cta,.section-link,.deal-link,.product-home-link) { color: var(--link-color) !important; }
html.dark-mode .home-category-stack-head .section-link { color: var(--on-primary) !important; }
html.dark-mode .home-order-step.is-done .home-order-step-icon { background: var(--primary); color: var(--on-primary); border-color: var(--focus-ring); }
html.dark-mode .home-order-step.is-active .home-order-step-icon { background: var(--secondary); color: var(--on-secondary); border-color: var(--secondary-dark); box-shadow: none; }
html.dark-mode .home-order-step.is-active .home-order-step-title { color: var(--secondary-dark); }
html.dark-mode .order-mini-step.is-active { background: var(--secondary); }
html.dark-mode .detail-image-badges .badge-oferta { background: var(--secondary-light) !important; color: var(--secondary-dark); }
html.dark-mode .detail-image-badges :is(.badge-nuevo,.badge-mas-vendido,.badge-despacho,.badge-retiro,.badge-rm) { background: var(--primary-light) !important; color: var(--link-color); }
html.dark-mode .detail-image-badges .badge-envio-gratis { background: var(--success-bg) !important; color: var(--success); }

/* La inactividad prevalece sobre el contexto comercial y las reglas nocturnas. */
html[data-store] :is(button,input,select,textarea):disabled {
  background: var(--surface-muted) !important; color: var(--text-secondary) !important;
  border-color: var(--border) !important; box-shadow: none; cursor: not-allowed;
}

/* Typography is shared by both appearances. */
body.theme-corporativo, body.theme-comercial, .gw-banner {
  --font-display: Manrope, sans-serif;
  font-family: Inter, sans-serif;
}
:is(h1,h2,h3,h4,.font-display,.spotlight-price,.deal-price,.stat-value,.home-b2b-title,
  .product-home-price,.catalog-item-price,.checkout-sticky-total-amount,.gw-banner-price,
  #detail-price,#product-detail-price-main) { font-family: var(--font-display); }

:is(.stat-feature-copy, .home-b2b-subtitle, .store-mode-banner) { overflow-wrap: anywhere; }

html.dark-mode .site-header .top-strip { background: var(--surface-elevated); }
/* The shared legacy theme marks these backgrounds as important. */
html.dark-mode .site-header { background: var(--surface) !important; border-color: var(--border) !important; }
html.dark-mode :is(.glass-pill,.nav-chip,.account-pill,.panel,.deal-card,.stat-card,
  .category-tile,.promo-tile-light,.product-home-card,.spotlight-card,.status-step,
  .checkout-delivery-group,.checkout-item-card) {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}
html.dark-mode :is(.guest-account-menu,.catalog-filters-drawer) {
  background: var(--surface-elevated) !important;
}
html.dark-mode :is(input,select,textarea):not(:disabled):not(:where(
  [type="checkbox"],[type="radio"],[type="hidden"],.catalog-search-input,.mobile-search-input)) {
  background: var(--surface) !important;
  border-color: var(--control-border) !important;
  color: var(--text-primary) !important;
}
html.dark-mode :is(.catalog-search-input,.mobile-search-input) { background: transparent !important; }
html.dark-mode :is(.catalog-search-shell,.mobile-search-shell) {
  background: var(--surface-elevated) !important;
  border-color: var(--control-border) !important;
}
html.dark-mode :is(.category-tile,.product-card,.product-home-card,.nav-chip,.account-pill):hover {
  background-color: var(--surface-hover) !important;
}
html.dark-mode .account-pill.account-pill-disabled { background: var(--surface-elevated) !important; }
html.dark-mode .guest-account-menu a:hover { background: var(--surface-hover); color: var(--primary-hover); }
html.dark-mode :is(.text-slate-400,.text-slate-500,.text-gray-500) { color: var(--text-muted) !important; }
html.dark-mode :is(.nav-chip[href="/catalogo"],.home-category-stack-head,.btn-primary,
  .btn-primary-orange,.home-b2b-button,.filter-chip.active,
  .home-order-step.is-done .home-order-step-icon) { color: var(--text-on-accent); }
html.dark-mode .home-category-stack-head :is(.section-title,.section-link) { color: var(--text-on-accent) !important; }
html.dark-mode :is(.btn-primary,.btn-primary-orange,.home-b2b-button):is(:hover,:active):not(:disabled) {
  background: var(--primary-hover);
  color: var(--text-on-accent);
}
html.dark-mode .site-header .nav-chip[href="/catalogo"] { background: var(--primary) !important; }
html.dark-mode .site-header .nav-chip[href="/catalogo"]:hover { background: var(--primary-hover) !important; }
html.dark-mode .site-header .account-pill[aria-label="Carrito"] {
  background: var(--secondary) !important;
  color: var(--text-on-accent);
}
html.dark-mode .site-header .account-pill[aria-label="Carrito"]:hover { background: var(--secondary-hover) !important; }
html.dark-mode .checkout-step.is-active .checkout-step-num { color: var(--text-on-accent); }
html.dark-mode :is(form[action="/carrito/agregar"] .btn-primary,#checkout_submit_btn,
  .checkout-sticky-submit,a[href="/checkout"].btn-primary,#mp_fallback_link,.catalog-card-add-btn):not(:disabled) {
  background: var(--secondary);
  color: var(--text-on-accent);
}
html.dark-mode :is(form[action="/carrito/agregar"] .btn-primary,#checkout_submit_btn,
  .checkout-sticky-submit,a[href="/checkout"].btn-primary,#mp_fallback_link,.catalog-card-add-btn):hover:not(:disabled) {
  background: var(--secondary-hover);
}
html.dark-mode .catalog-item-add:hover:not(:disabled) { background: var(--secondary-hover) !important; }
html.dark-mode :is(.section-link,.category-cta,.product-home-link,.catalog-item-link):hover { color: var(--primary-hover) !important; }
html.dark-mode .home-category-stack-head .section-link:hover { color: var(--text-on-accent) !important; }
html.dark-mode .web-bg footer { background: var(--background) !important; border-color: var(--border) !important; color: var(--text-primary); }
html.dark-mode footer .text-slate-500 { color: var(--text-secondary) !important; }
html.dark-mode .gw-banner-product-button {
  background: var(--surface);
  border-color: var(--control-border);
  color: var(--text-primary);
  box-shadow: none;
}
html.dark-mode .gw-banner-product-button strong { color: var(--text-primary); }
html.dark-mode .gw-banner-product-button:is(:hover,:focus-visible) {
  background: var(--surface-hover);
  border-color: var(--primary);
}
html.dark-mode :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible {
  box-shadow: 0 0 0 3px var(--background);
}
html.dark-mode :is(.catalog-search-shell,.mobile-search-shell,.glass-pill):focus-within {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Beneficios de la portada de Gestab. */
html .home-benefits .stat-card-feature {
  min-height: 0;
  padding: 16px;
  gap: 6px;
  border-radius: 14px;
  box-shadow: none;
  transition: none;
  /* El fondo y el borde del tema oscuro común usan !important. */
  background: var(--surface) !important;
  border-color: var(--border) !important;
}
.home-benefits .stat-card-feature::before { content: none; }
.home-benefits .stat-card-feature:hover { transform: none; }
.home-benefits .home-benefit-icon {
  justify-self: start;
  width: 18px;
  height: 18px;
  color: var(--secondary-dark);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html.dark-mode .home-benefits .home-benefit-icon { color: var(--secondary); }
.home-benefits .stat-feature-title {
  max-width: none;
  margin: 0;
  font-size: .9375rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.home-benefits .stat-feature-copy {
  max-width: none;
  font-size: .8125rem;
  line-height: 1.4;
}

/* Categorías de la portada de Gestab. */
.home-category-stack-section .home-category-stack-head {
  position: relative;
  top: auto;
  z-index: auto;
  align-items: center;
  padding: 16px 20px;
  margin-bottom: 12px;
  border-radius: 14px;
  backdrop-filter: none;
}
.home-category-stack-head .section-title {
  margin: 0;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.2;
}
.home-category-stack-head .section-link { flex: none; }
.home-category-stack-section .category-grid-home-stack {
  --category-columns: 2;
  --category-image-height: 144px;
  display: grid;
  grid-template-columns: repeat(var(--category-columns), minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 0;
}
.home-category-stack-section .category-grid-home-stack .category-tile {
  position: relative;
  top: auto;
  z-index: auto;
  min-width: 0;
  margin: 0;
  padding: 10px;
  gap: 8px;
  align-content: start;
  border-radius: 14px;
}
.home-category-stack-section .category-tile:not(:hover):not(:focus-visible) { box-shadow: none; }
.home-category-stack-section .category-grid-home-stack .category-media { height: var(--category-image-height); }
.home-category-stack-section .category-media img { padding: 2px; }
.home-category-stack-section .category-grid-home-stack .category-copy { padding: 0; gap: 4px; }
.home-category-stack-section .category-name {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.2;
}
.home-category-stack-section .category-cta { font-size: .75rem; font-weight: 600; line-height: 1.25; }

@media (min-width: 640px) {
  .home-category-stack-section .category-grid-home-stack {
    --category-columns: 3;
    --category-image-height: 156px;
  }
}
@media (min-width: 960px) {
  .home-category-stack-section .category-grid-home-stack { --category-columns: 4; }
}
@media (min-width: 1100px) {
  .home-category-stack-section .home-category-stack-head { padding: 16px 24px; }
  .home-category-stack-section .category-grid-home-stack {
    --category-columns: 5;
    --category-image-height: 174px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-store] { scroll-behavior: auto; }
  :is(.site-header,.category-tile,.product-card,.product-home-card,.spotlight-card,
    .home-b2b-cta,.ambient-lines,.cart-toast,.gw-banner-product-button) {
    animation: none !important;
    transition: none !important;
  }
}
