/* =====================================================================
   HAT-TRICK — MODO OSCURO (html[data-theme="dark"])
   Se carga después de las hojas de cada página. Paleta:
   fondo #0f0f0f · superficie #181818 · superficie 2 #222 · borde #2a2a2a
   texto #ececec · texto suave #9ca3af · rojo de marca #E30613
   ===================================================================== */

/* Botón luna / sol (en todas las páginas) */
.theme-btn{
    width:38px;height:38px;border-radius:50%;border:none;cursor:pointer;flex-shrink:0;
    display:inline-flex;align-items:center;justify-content:center;
    background:rgba(255,255,255,.14);color:#fff;transition:background .2s,color .2s;
}
.theme-btn:hover{background:#fff;color:#E30613}
.theme-btn svg{width:18px;height:18px}
.theme-btn .ic-sol{display:none}
html[data-theme="dark"] .theme-btn .ic-luna{display:none}
html[data-theme="dark"] .theme-btn .ic-sol{display:block}

html[data-theme="dark"]{color-scheme:dark}
/* Modo claro forzado: sin esto, con Windows en oscuro el navegador pinta el texto de los campos en blanco */
html:not([data-theme="dark"]){color-scheme:light}
html[data-theme="dark"] body{background:#0f0f0f;color:#ececec}

/* ---------------- TIENDA (index / galería / producto) ---------------- */
html[data-theme="dark"] .catalog h2,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .colaboradores-title,
html[data-theme="dark"] .about h2{color:#fff}
html[data-theme="dark"] .subsection-title{background:#222;color:#fff}
html[data-theme="dark"] .products-loading,
html[data-theme="dark"] .search-count{color:#9ca3af}

/* Tarjetas de producto */
html[data-theme="dark"] .product{background:#181818;border-color:#2a2a2a}
html[data-theme="dark"] .product:hover{border-color:#3a3a3a;box-shadow:none}
html[data-theme="dark"] .product-info{background:#181818}
html[data-theme="dark"] .product-info h3,
html[data-theme="dark"] .product-link{color:#fff}
html[data-theme="dark"] .product-info p,
html[data-theme="dark"] .product-info ul li{color:#9ca3af}
html[data-theme="dark"] .product-img{background:#111}
html[data-theme="dark"] .product-dots{background:#181818}
html[data-theme="dark"] .product-dot{background:#3a3a3a}
html[data-theme="dark"] .product-dot.active{background:#E30613}
html[data-theme="dark"] .size-chip{background:#262626;color:#e5e5e5}
html[data-theme="dark"] .product-sizes:hover .size-chip{background:#2f2f2f}
html[data-theme="dark"] .size-chip--more{background:transparent;border-color:#3a3a3a;color:#9ca3af}
html[data-theme="dark"] .product-action .product-price small{color:#6b7280}
html[data-theme="dark"] .btn-add{background:#fff;color:#0A0A0A}
html[data-theme="dark"] .btn-add:hover{background:#E30613;color:#fff}
html[data-theme="dark"] .product-talla-select{background:#222;color:#ececec;border-color:#2a2a2a}

/* Características, nosotros, galería+pedido, colaboradores */
html[data-theme="dark"] .feat-card{background:#181818;border-color:#2a2a2a}
html[data-theme="dark"] .feat-card h3{color:#fff}
html[data-theme="dark"] .feat-card p{color:#9ca3af}
html[data-theme="dark"] .feat-icon{background:rgba(227,6,19,.14)}
html[data-theme="dark"] .about .container{background:#181818;border-color:#2a2a2a}
html[data-theme="dark"] .about-text{color:#c9c9c9}
html[data-theme="dark"] .about-eyebrow{background:rgba(227,6,19,.14)}
html[data-theme="dark"] .cta-duo .cta-galeria-inner{background:#181818;border:1px solid #2a2a2a}
html[data-theme="dark"] .colaborador-item{background:#181818;border-color:#2a2a2a}
html[data-theme="dark"] .colaborador-nombre{color:#fff}
html[data-theme="dark"] .colaborador-url{background:#222;border-color:#2a2a2a;color:#c9c9c9}

/* Menú desplegable */
@media (min-width:1025px){
    html[data-theme="dark"] .mega-menu{background:#181818;border-color:#2a2a2a;box-shadow:0 12px 28px rgba(0,0,0,.5)}
    html[data-theme="dark"] .mega-menu a{color:#ececec}
    html[data-theme="dark"] .mega-menu a:hover{background:#222;color:#fff}
    html[data-theme="dark"] .mega-title{color:#6b7280}
}

/* Carrito lateral */
html[data-theme="dark"] .cart,
html[data-theme="dark"] .cart-footer{background:#141414;color:#ececec}
html[data-theme="dark"] .cart-header,html[data-theme="dark"] .cart-footer{border-color:#2a2a2a}
html[data-theme="dark"] .cart-item{background:#1e1e1e}
html[data-theme="dark"] .cart-item-qty{background:#2a2a2a}
html[data-theme="dark"] .coupon-input-row input{background:#1e1e1e;border-color:#2a2a2a;color:#ececec}

/* Página de galería */
html[data-theme="dark"] .gal-hero{background:#0f0f0f}
html[data-theme="dark"] .gal-hero::after{background:linear-gradient(to bottom,#0f0f0f,transparent)}
html[data-theme="dark"] .gal-hero h1{color:#fff}
html[data-theme="dark"] .gal-hero p{color:#9ca3af}
html[data-theme="dark"] .gal-card{background:#181818}

/* Página de producto */
html[data-theme="dark"] .breadcrumb a{color:#c9c9c9}
html[data-theme="dark"] .breadcrumb span{color:#6b7280}
html[data-theme="dark"] .prod-info h1{color:#fff}
html[data-theme="dark"] .prod-desc,html[data-theme="dark"] .prod-iva{color:#9ca3af}
html[data-theme="dark"] .prod-option label,html[data-theme="dark"] .prod-quantity label{color:#9ca3af}
html[data-theme="dark"] .talla-chip{background:#181818;border-color:#333;color:#ececec}
html[data-theme="dark"] .talla-chip:hover{border-color:#fff}
html[data-theme="dark"] .talla-chip.active{background:#fff;border-color:#fff;color:#0A0A0A}
html[data-theme="dark"] .qty-control{background:#181818;border-color:#333}
html[data-theme="dark"] .qty-control button,html[data-theme="dark"] .qty-control input{color:#ececec}
html[data-theme="dark"] .qty-control button:hover{background:#222;color:#fff}
html[data-theme="dark"] .variant-pill{background:#222;color:#c9c9c9}
html[data-theme="dark"] .variant-pill strong{color:#fff}
html[data-theme="dark"] .btn-add-cart{background:#fff;color:#0A0A0A}
html[data-theme="dark"] .btn-add-cart:hover{background:#E30613;color:#fff}
html[data-theme="dark"] .prod-extra-item{background:#181818;border-color:#2a2a2a;color:#c9c9c9}
html[data-theme="dark"] .prod-thumb{background:#222}

/* ---------------- FORMULARIO DE PEDIDOS ---------------- */
html[data-theme="dark"] .pu-header-title{color:#fff}
html[data-theme="dark"] .pu-header-sub{color:#9ca3af}
html[data-theme="dark"] .pu-header-icon{background:#181818;border-color:#2a2a2a}
html[data-theme="dark"] .pu-stepper-btn{background:#181818;border-color:#2a2a2a;color:#9ca3af}
html[data-theme="dark"] .pu-stepper-btn span{background:#262626;color:#9ca3af}
html[data-theme="dark"] .pu-stepper-btn:hover{border-color:#3a3a3a;color:#fff}
html[data-theme="dark"] .pu-stepper-btn.active{background:#E30613;border-color:#E30613;color:#fff}
html[data-theme="dark"] .pu-stepper-btn.active span{background:#fff;color:#E30613}
html[data-theme="dark"] .pu-stepper-btn.done{color:#ececec}
html[data-theme="dark"] .pu-stepper-btn.done span{background:#fff;color:#0A0A0A}
html[data-theme="dark"] .pu-section,
html[data-theme="dark"] .pu-dblock,
html[data-theme="dark"] .pu-kpi{background:#181818;border-color:#2a2a2a;color:#ececec}
html[data-theme="dark"] .pu-label{color:#9ca3af}
html[data-theme="dark"] .pu-section-title,
html[data-theme="dark"] .pu-design-title,
html[data-theme="dark"] .pu-dblock-title,
html[data-theme="dark"] .pu-kpi-val{color:#fff}
html[data-theme="dark"] .pu-design-sub,
html[data-theme="dark"] .pu-dblock-sub,
html[data-theme="dark"] .pu-kpi-label{color:#9ca3af}
html[data-theme="dark"] .pu-design-header-icon,
html[data-theme="dark"] .pu-kpi-icon{background:rgba(227,6,19,.14)}
html[data-theme="dark"] .pu-input,
html[data-theme="dark"] .pu-textarea{background:#111;border-color:#2a2a2a;color:#ececec}
html[data-theme="dark"] .pu-input:hover,html[data-theme="dark"] .pu-textarea:hover{border-color:#3a3a3a}
html[data-theme="dark"] .pu-input:focus,html[data-theme="dark"] .pu-textarea:focus{border-color:#E30613}
html[data-theme="dark"] select.pu-input{background-color:#111}
html[data-theme="dark"] .pu-btn-ghost{background:#181818;border-color:#333;color:#ececec}
html[data-theme="dark"] .pu-btn-ghost:hover{border-color:#fff}
html[data-theme="dark"] .pu-btn-next{background:#fff;color:#0A0A0A}
html[data-theme="dark"] .pu-btn-next:hover{background:#E30613;color:#fff}
html[data-theme="dark"] .pu-btn-add,html[data-theme="dark"] .pu-btn-add--portero{background:transparent;border-color:#3a3a3a;color:#ececec}
html[data-theme="dark"] .pu-btn-add:hover{border-color:#E30613;color:#fff}
html[data-theme="dark"] .pu-btn-preview{background:transparent;border-color:#fff;color:#fff}
html[data-theme="dark"] .pu-btn-preview:hover{background:#fff;color:#0A0A0A}
/* Catálogo, diseños y logos */
html[data-theme="dark"] .pu-catalog-item{background:#111;border-color:#2a2a2a}
html[data-theme="dark"] .pu-catalog-item.selected{border-color:#E30613}
html[data-theme="dark"] .pu-design-card,
html[data-theme="dark"] .pu-logo-slot{background:#141414;border-color:#2a2a2a}
html[data-theme="dark"] .pu-design-card-header,
html[data-theme="dark"] .pu-logo-slot-header{background:#141414;border-color:#2a2a2a;color:#ececec}
html[data-theme="dark"] .pu-dropzone{background:#111;border-color:#333;color:#9ca3af}
html[data-theme="dark"] .pu-dropzone:hover{background:#151515;border-color:#E30613}
html[data-theme="dark"] .pu-logo-slot-drop:hover{background:#151515}
/* Tablas */
html[data-theme="dark"] .pu-table tbody tr{border-color:#232323}
html[data-theme="dark"] .pu-table tbody td{border-color:#232323;color:#ececec}
html[data-theme="dark"] .pu-table input[type="text"],
html[data-theme="dark"] .pu-table input[type="number"],
html[data-theme="dark"] .pu-table select{color:#ececec}
html[data-theme="dark"] .pu-table input::placeholder{color:#6b7280}
html[data-theme="dark"] .pu-table input[type="text"]:focus,
html[data-theme="dark"] .pu-table input[type="number"]:focus,
html[data-theme="dark"] .pu-table select:focus{background:#111;box-shadow:inset 0 0 0 1.5px #3a3a3a}
html[data-theme="dark"] .pu-table select option{background:#181818;color:#ececec}
html[data-theme="dark"] .pu-table input[type="checkbox"]{background:#111;border-color:#3a3a3a}
/* Ventanas: envío, alerta, visor de diseños, vista previa del PDF */
html[data-theme="dark"] .pu-modal{background:#181818;color:#ececec}
html[data-theme="dark"] .pu-modal-header{border-color:#2a2a2a}
html[data-theme="dark"] .pu-modal-header h3{color:#fff}
html[data-theme="dark"] .pu-preview,
html[data-theme="dark"] .pu-modal-note{background:#111;border-color:#2a2a2a;color:#c9c9c9}
html[data-theme="dark"] .pu-alert-card{background:#181818}
html[data-theme="dark"] .pu-alert-title,html[data-theme="dark"] .pu-alert-list li{color:#fff}
html[data-theme="dark"] .pu-alert-msg,html[data-theme="dark"] .pu-alert-sub{color:#9ca3af}
html[data-theme="dark"] .pu-alert-list{border-color:#2a2a2a}
html[data-theme="dark"] .pu-alert-list li{border-color:#232323}
html[data-theme="dark"] .pu-alert-list li::before{border-color:#4b5563}
html[data-theme="dark"] .pu-alert-icon{background:rgba(227,6,19,.14)}
html[data-theme="dark"] .pu-alert-btn{background:#fff;color:#0A0A0A}
html[data-theme="dark"] .pu-alert-btn:hover{background:#E30613;color:#fff}
html[data-theme="dark"] .pu-lightbox-content{background:#181818}
html[data-theme="dark"] .pu-lightbox-carousel{background:#111}
html[data-theme="dark"] .pu-lightbox-name{color:#fff}
html[data-theme="dark"] .pu-lightbox-close{background:#262626;color:#fff}
html[data-theme="dark"] .pu-lb-thumb{background:#222}
html[data-theme="dark"] .pu-lb-sendto{border-color:#2a2a2a}
html[data-theme="dark"] .pu-lb-sendto-btn{background:#181818;border-color:#333;color:#ececec}
html[data-theme="dark"] .pu-lb-sendto-btn:hover{background:#fff;border-color:#fff;color:#0A0A0A}
html[data-theme="dark"] .pu-pdf-head{background:#181818;color:#fff}
html[data-theme="dark"] .pu-pdf-modal{background:#0b0b0b}

/* ---- Formulario: elementos que se perdían en oscuro ---- */
html[data-theme="dark"] .pu-dblock-title svg,
html[data-theme="dark"] .pu-logo-slot-header svg{background:rgba(227,6,19,.16);color:#ff4d58}
html[data-theme="dark"] .pu-logo-slot-header span{color:#ececec}
html[data-theme="dark"] .pu-logo-slot-header small{background:#222;border-color:#333;color:#c9c9c9}
html[data-theme="dark"] .pu-catalog-name{background:#222;color:#ececec}
html[data-theme="dark"] .pu-dropzone svg{color:#9ca3af;opacity:1}
html[data-theme="dark"] .pu-dropzone-text{color:#c9c9c9}
html[data-theme="dark"] .pu-dropzone-text strong{color:#fff}
html[data-theme="dark"] .pu-dropzone-hint{color:#9ca3af}
html[data-theme="dark"] .pu-logo-slot-drop{color:#6b7280}
html[data-theme="dark"] .pu-design-card-header span{color:#ececec}
html[data-theme="dark"] .pu-extra-logos,html[data-theme="dark"] .pu-dropzone--sm{color:#c9c9c9}

/* ===== Selección sin contorno rojo: negro en claro, blanco en oscuro ===== */
.pu-catalog-item.selected,.pu-lb-thumb.active,.prod-thumb.active{border-color:#0A0A0A!important}
html[data-theme="dark"] .pu-catalog-item.selected,
html[data-theme="dark"] .pu-lb-thumb.active,
html[data-theme="dark"] .prod-thumb.active{border-color:#fff!important}
.pu-dropzone:hover,.pu-btn-add:hover,.search-bar-wrap:focus-within{border-color:#9ca3af}
html[data-theme="dark"] .pu-dropzone:hover,html[data-theme="dark"] .pu-btn-add:hover{border-color:#6b7280}

/* ===== Autocompletado del navegador sin fondo azul ===== */
input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,
select:-webkit-autofill,textarea:-webkit-autofill{
    -webkit-box-shadow:0 0 0 1000px #fff inset!important;-webkit-text-fill-color:#1a1a1a!important;
    caret-color:#1a1a1a;transition:background-color 9999s ease-out 0s;
}
html[data-theme="dark"] input:-webkit-autofill,html[data-theme="dark"] input:-webkit-autofill:hover,
html[data-theme="dark"] input:-webkit-autofill:focus,html[data-theme="dark"] select:-webkit-autofill,
html[data-theme="dark"] textarea:-webkit-autofill{
    -webkit-box-shadow:0 0 0 1000px #111 inset!important;-webkit-text-fill-color:#ececec!important;caret-color:#ececec;
}

/* ===== Campo activo (al escribir): sin contorno rojo ===== */
.form-group input:focus,.form-group select:focus,.form-group textarea:focus,.pu-input:focus,.pu-textarea:focus{border-color:#1a1a1a!important;box-shadow:none!important;outline:none}
html[data-theme="dark"] .form-group input:focus,html[data-theme="dark"] .form-group select:focus,html[data-theme="dark"] .form-group textarea:focus,html[data-theme="dark"] .pu-input:focus,html[data-theme="dark"] .pu-textarea:focus{border-color:#9ca3af!important}
html[data-theme="dark"] .pu-ocr{background:#1c1314;border-color:#5a2a2e}
html[data-theme="dark"] .pu-ocr-icon{background:rgba(227,6,19,.14)}
html[data-theme="dark"] .pu-ocr-title{color:#fff}
html[data-theme="dark"] .pu-ocr-sub,html[data-theme="dark"] .pu-ocr-estado{color:#9ca3af}
html[data-theme="dark"] .pu-ocr-estado.ok{color:#34d399}
html[data-theme="dark"] .pu-row-ocr input[type="text"],html[data-theme="dark"] .pu-row-ocr input[type="number"]{background:#231d10}
