/* Ficha de producto: la del lienzo "Ferretería Burgos — Web" (ProductoNuevo y ProductoNuevoMovil). */
html:has(body.bb-pagina-producto),body.bb-pagina-producto{margin:0;background:#f3f3f1}
.pn-w{--m:max(80px,calc((100vw - 1280px) / 2));display:flex;flex-direction:column;gap:80px;padding:140px var(--m) 80px;box-sizing:border-box;background:#fff;font-family:"Geist",Arial,sans-serif;color:#171717;-webkit-font-smoothing:antialiased}
.admin-bar .pn-w{padding-top:172px}
.pn-w h1,.pn-w h2,.pn-w h3,.pn-w p{margin:0}
.pn-w a{color:#171717}.pn-w a:hover{color:#567d12}
.pn-w svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.pn-w .woocommerce-message,.pn-w .woocommerce-error,.pn-w .woocommerce-info{list-style:none;margin:0 0 -48px;padding:14px 16px;background:#fff;border:1px solid #e2e2df;border-radius:12px;font-size:14px}
.pn-h2{font-size:24px;line-height:1.2;letter-spacing:-.02em;font-weight:700}
.pn-cab{display:flex;align-items:baseline;justify-content:space-between;gap:24px;margin-bottom:24px}
.pn-w .pn-mas{font-size:14px;font-weight:500;color:#171717;text-decoration:none;display:inline-flex;align-items:center;gap:4px}
.pn-w .pn-btn{white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;gap:8px;height:48px;padding:0 24px;border:0;border-radius:8px;background:#171717;color:#fff;font:600 15px/1 "Geist",Arial,sans-serif;text-decoration:none;cursor:pointer;box-sizing:border-box}
.pn-w .pn-btn:hover{background:#cfe77a;color:#171717}
.pn-w .pn-btn-2{background:#fff;color:#171717;box-shadow:inset 0 0 0 1px #d4d4d0}
.pn-w .pn-btn-2:hover{background:#fff;color:#171717;box-shadow:inset 0 0 0 1px #171717}

.pn-miga{display:flex;flex-wrap:wrap;gap:8px;font-size:13px;color:#717171;margin-bottom:-48px}
.pn-w .pn-miga a{color:#717171;text-decoration:none}.pn-w .pn-miga a:hover{color:#171717}

.pn-ficha{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:24px;align-items:start}
.pn-galeria{grid-column:1 / span 7;display:flex;flex-direction:column;gap:12px;min-width:0}
.pn-foto-grande{position:relative;aspect-ratio:1 / .82;border-radius:12px;background:#f3f3f1;display:flex;align-items:center;justify-content:center;overflow:hidden}
.pn-w .pn-foto-grande img{width:76%;height:76%;object-fit:contain;mix-blend-mode:multiply;animation:pn-foto-entra .35s ease both}
@keyframes pn-foto-entra{from{opacity:0;transform:scale(.98)}to{opacity:1;transform:none}}
.pn-w .pn-foto-flecha{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;padding:0;border:0;border-radius:50%;background:#fff;color:#171717;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 1px 2px rgba(23,23,23,.06),0 4px 12px rgba(23,23,23,.08);opacity:0;transition:opacity .2s,background .2s}
.pn-foto-grande:hover .pn-foto-flecha,.pn-foto-flecha:focus-visible{opacity:1}
.pn-w .pn-foto-flecha:hover{background:#ececea}
.pn-foto-flecha svg{width:18px!important;height:18px!important}
.pn-foto-ant{left:16px}.pn-foto-sig{right:16px}
.pn-foto-num{position:absolute;right:16px;bottom:16px;padding:4px 10px;border-radius:999px;background:rgba(255,255,255,.85);font-size:12px;font-weight:600;color:#555}
.pn-miniaturas{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.pn-w .pn-miniaturas button{aspect-ratio:1 / 1;padding:0;border:1px solid transparent;border-radius:8px;background:#f3f3f1;cursor:pointer;display:flex;align-items:center;justify-content:center;overflow:hidden;transition:border-color .2s}
.pn-w .pn-miniaturas button img{width:76%;height:76%;object-fit:contain;mix-blend-mode:multiply}
.pn-w .pn-miniaturas button:hover{border-color:#a3a3a0}
.pn-w .pn-miniaturas button[aria-pressed="true"]{border-color:#171717}

.pn-info{grid-column:9 / span 4;position:sticky;top:140px;display:flex;flex-direction:column;gap:20px;min-width:0}
.pn-info-cab{display:flex;flex-direction:column;gap:8px}
.pn-info-cab small{font-size:13px;color:#717171}
.pn-mc{text-transform:uppercase;letter-spacing:.04em;font-weight:700;color:#171717}
.pn-info h1{font-size:30px;line-height:1.15;letter-spacing:-.025em;font-weight:700;color:#171717;text-transform:none}
.pn-info-precio{display:flex;flex-direction:column;gap:4px;padding:20px 0;border-top:1px solid #ececea;border-bottom:1px solid #ececea}
.pn-info-precio strong{font-size:32px;font-weight:700;letter-spacing:-.02em}
.pn-iva{font-style:normal;font-size:13px;font-weight:500;color:#717171;letter-spacing:0;margin-left:6px}
.pn-info-precio p{font-size:14px;color:#555}
.pn-stock{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:500;color:#1f7a3a}
.pn-stock::before{content:"";width:8px;height:8px;border-radius:50%;background:#1f9d4a}
.pn-stock.pn-sin-stock{color:#717171}.pn-stock.pn-sin-stock::before{background:#a3a3a0}
.pn-incluye{display:flex;flex-direction:column;gap:6px;font-size:14px;color:#444}
.pn-incluye b{font-size:13px;color:#171717}
.pn-compra{display:grid;grid-template-columns:120px 1fr;gap:12px;margin:0}
.pn-cant{display:flex;align-items:center;justify-content:space-between;height:48px;padding:0 6px;box-sizing:border-box;border:1px solid #d4d4d0;border-radius:8px}
.pn-w .pn-cant button{width:34px;height:34px;padding:0;border:0;border-radius:6px;background:transparent;font-size:18px;cursor:pointer;color:#171717}
.pn-w .pn-cant button:hover{background:#f3f3f1}
.pn-cant input{width:40px;border:0;background:transparent;text-align:center;font:600 15px "Geist",Arial,sans-serif;color:#171717;-moz-appearance:textfield;appearance:textfield}
.pn-cant input::-webkit-outer-spin-button,.pn-cant input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.pn-compra .pn-btn-2{grid-column:1 / -1}
.pn-entrega{display:flex;flex-direction:column;border:1px solid #ececea;border-radius:12px}
.pn-entrega div{display:flex;gap:12px;align-items:flex-start;padding:14px 16px;font-size:14px;line-height:1.4}
.pn-entrega div+div{border-top:1px solid #ececea}
.pn-entrega svg{width:20px!important;height:20px!important;stroke-width:1.6!important;margin-top:1px}
.pn-entrega span{display:block;font-size:13px;color:#717171}
.pn-pagos{display:flex;align-items:center;gap:16px}
.pn-w .pn-pagos img{height:20px;max-width:72px;object-fit:contain;filter:grayscale(1);opacity:.6}

.pn-detalle{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:24px;padding-top:48px;border-top:1px solid #ececea}
.pn-detalle>div:first-child{grid-column:1 / span 6;display:flex;flex-direction:column;gap:14px}
.pn-texto,.pn-texto p{font-size:15px;line-height:1.65;color:#444}
.pn-texto p+p{margin-top:12px}
.pn-texto ul{margin:0;padding-left:18px;line-height:1.8}
.pn-detalle>div:last-child{grid-column:8 / span 5;display:flex;flex-direction:column;gap:14px}
.pn-tabla{display:flex;flex-direction:column;border-top:1px solid #ececea}
.pn-tabla div{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:12px 0;border-bottom:1px solid #ececea;font-size:14px}
.pn-tabla span{color:#717171}

/* Lleva también: la tarjeta de la búsqueda, cinco por fila */
.pn-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:20px}
.pn-grid .bs-prod{font-family:"Geist",Arial,sans-serif}
.pn-grid .bs-precio{margin-top:auto;width:100%;display:grid;grid-template-columns:minmax(0,1fr) 32px;align-items:center;gap:10px;min-height:64px;padding:10px 12px 10px 16px;box-sizing:border-box;border:1px solid #d4d4d0;border-radius:8px;background:#fff;color:#171717;font:inherit;text-align:left;cursor:pointer;transition:background .2s ease,border-color .2s ease,color .2s ease}
.pn-grid .bs-prod:hover .bs-precio:not(:disabled){background:#5c5c58;border-color:#5c5c58;color:#fff}
.pn-grid .bs-prod .bs-precio:not(:disabled):hover{background:#4a4a46;border-color:#4a4a46}
.pn-grid .bs-precio:disabled{cursor:default;color:#8a8a86}
.pn-grid .bs-opc,.pn-grid .bs-chip{display:none}

.pn-compra-fija{display:none}

@media (min-width:901px) and (max-width:1199px){
.pn-galeria{grid-column:1 / span 6}
.pn-info{grid-column:7 / span 6}
.pn-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.pn-grid .bs-iva{display:block;margin:2px 0 0}
}
@media (max-width:900px){
.pn-w{--m:16px;gap:56px;padding-top:112px;padding-bottom:96px}
.admin-bar .pn-w{padding-top:158px}
.pn-miga{margin-bottom:-36px;font-size:12px}
.pn-ficha,.pn-detalle{display:flex;flex-direction:column;gap:24px}
.pn-galeria{width:100%}
.pn-info{position:static;width:100%}
.pn-info h1{font-size:24px}
.pn-foto-grande{aspect-ratio:1 / 1}
.pn-w .pn-foto-flecha{opacity:1;width:36px;height:36px}
.pn-miniaturas{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:0 16px}
.pn-miniaturas::-webkit-scrollbar{display:none}
.pn-w .pn-miniaturas button{flex:0 0 64px;width:64px}
.pn-detalle{padding-top:32px;gap:32px}
.pn-detalle>div{width:100%}
.pn-detalle .pn-h2,.pn-cab .pn-h2{font-size:20px}
.pn-cab{margin-bottom:16px}
.pn-grid{display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;margin:0 -16px;padding:0 16px 4px}
.pn-grid::-webkit-scrollbar{display:none}
.pn-grid .bs-prod{flex:0 0 72%;scroll-snap-align:start}
/* En el teléfono la compra queda abajo, siempre a mano */
.pn-compra-fija{position:fixed;left:0;right:0;bottom:0;z-index:900;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:rgba(255,255,255,.94);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-top:1px solid #ececea}
.pn-compra-fija div{display:flex;flex-direction:column;gap:1px;min-width:0}
.pn-compra-fija b{font-size:18px;font-weight:700;letter-spacing:-.01em}
.pn-compra-fija span{font-size:12px;color:#717171;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pn-w .pn-compra-fija .pn-btn{height:44px;padding:0 18px;font-size:14px}
.bb-pagina-producto .bb-pie{padding-bottom:96px}
}
.pn-w .bs-img img{width:78%;height:78%;max-width:none;object-fit:contain}

/* ---- Página del carrito (misma cara que la ficha) ---- */
html:has(body.bb-pagina-carrito),body.bb-pagina-carrito{margin:0;background:#f3f3f1}
.cr-cuerpo{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:24px;align-items:start;transition:opacity .2s}
.cr-cuerpo.cr-ocupado{opacity:.55;pointer-events:none}
.cr-cargando{grid-column:1 / -1;font-size:15px;color:#717171}
.cr-lista{grid-column:1 / span 8;display:flex;flex-direction:column;min-width:0}
.cr-cab{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding-bottom:20px;border-bottom:1px solid #ececea}
.cr-cab>div{display:flex;flex-direction:column;gap:6px}
.cr-cab h1{font-size:30px;line-height:1.1;letter-spacing:-.025em;font-weight:700;color:#171717}
.cr-cab span{font-size:14px;color:#717171}
.pn-w .cr-vaciar,.pn-w .cr-cupon-abrir{padding:0;border:0;background:transparent;font:500 13px "Geist",Arial,sans-serif;color:#171717;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.pn-w .cr-vaciar:hover,.pn-w .cr-cupon-abrir:hover{color:#567d12}
.cr-item{display:grid;grid-template-columns:96px minmax(0,1fr) 120px 120px 32px;align-items:center;gap:20px;padding:20px 0;border-bottom:1px solid #ececea}
.pn-w .cr-foto{width:96px;height:96px;border-radius:10px;background:#f3f3f1;display:flex;align-items:center;justify-content:center;overflow:hidden}
.pn-w .cr-foto img{width:80%;height:80%;max-width:none;object-fit:contain;mix-blend-mode:multiply}
.cr-datos{display:flex;flex-direction:column;gap:4px;min-width:0}
.cr-datos small{font-size:12px;color:#717171}
.pn-w .cr-nombre{font-size:15px;font-weight:500;line-height:1.35;color:#171717;text-decoration:none;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.pn-w .cr-nombre:hover{text-decoration:underline;color:#171717}
.cr-unidad{font-size:13px;color:#717171}
.cr-item .pn-cant b{font-size:15px;font-weight:600}
.pn-w .cr-item .pn-cant button:disabled{opacity:.3;cursor:default;background:transparent}
.cr-linea{font-size:18px;font-weight:700;text-align:right;white-space:nowrap}
.pn-w .cr-quitar{width:32px;height:32px;padding:0;border:0;border-radius:50%;background:transparent;color:#717171;display:flex;align-items:center;justify-content:center;cursor:pointer}
.pn-w .cr-quitar:hover{background:#f3f3f1;color:#171717}
.cr-seguir{align-self:flex-start;margin-top:20px}
.cr-resumen{grid-column:9 / span 4;position:sticky;top:140px;display:flex;flex-direction:column;gap:16px;padding:24px;border:1px solid #ececea;border-radius:16px;background:#fff;min-width:0}
.cr-filas{display:flex;flex-direction:column;gap:10px;font-size:14px}
.cr-filas div{display:flex;justify-content:space-between;gap:12px}
.cr-filas span{color:#555}
.cr-suave{font-weight:500;color:#717171}
.cr-desc b{color:#567d12}
.cr-total{display:flex;flex-direction:column;gap:4px;padding:16px 0;border-top:1px solid #ececea;border-bottom:1px solid #ececea}
.cr-total>span{font-size:13px;color:#717171}
.cr-total strong{font-size:32px;font-weight:700;letter-spacing:-.02em}
.cr-total small{font-size:13px;color:#717171}
.cr-cupones{display:flex;flex-wrap:wrap;gap:8px}
.pn-w .cr-chip{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 8px 0 12px;border:0;border-radius:999px;background:#f5fae6;font:600 12px "Geist",Arial,sans-serif;letter-spacing:.04em;color:#171717;cursor:pointer}
.pn-w .cr-chip:hover{background:#e6e6e3}
.cr-chip svg{width:14px!important;height:14px!important}
.cr-cupon form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:0}
.cr-cupon input{height:48px;min-width:0;padding:0 14px;box-sizing:border-box;border:1px solid #d4d4d0;border-radius:8px;font:15px "Geist",Arial,sans-serif;color:#171717;text-transform:uppercase}
.cr-cupon input:focus{outline:0;border-color:#171717}
.cr-cupon p{margin:8px 0 0;font-size:13px;color:#b42318}
.pn-w .cr-pagar{width:100%}
.cr-resumen .pn-btn-2{width:100%}
.cr-resumen .pn-entrega{margin-top:4px}
.cr-vacio{display:block}
.cr-vacio>div{display:flex;flex-direction:column;align-items:flex-start;gap:14px;padding:48px 0 16px;max-width:560px}
.cr-vacio h1{font-size:36px;line-height:1.1;letter-spacing:-.03em;font-weight:700}
.cr-vacio p{font-size:15px;line-height:1.55;color:#555}
.cr-vacio-acc{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px}
@media (min-width:901px) and (max-width:1199px){
.cr-lista{grid-column:1 / span 7}
.cr-resumen{grid-column:8 / span 5}
.cr-item{grid-template-columns:80px minmax(0,1fr) 110px 32px;row-gap:8px}
.pn-w .cr-foto{width:80px;height:80px}
.cr-item .cr-linea{grid-column:2;grid-row:2;text-align:left}
.cr-item .pn-cant{grid-column:3;grid-row:1 / span 2}
.cr-item .cr-quitar{grid-column:4;grid-row:1 / span 2}
}
@media (max-width:900px){
.cr-cuerpo{display:flex;flex-direction:column;gap:32px}
.cr-lista,.cr-resumen{width:100%;box-sizing:border-box}
.cr-resumen{position:static;padding:20px 16px}
.cr-cab h1{font-size:26px}
.cr-item{grid-template-columns:72px minmax(0,1fr) 32px;grid-template-rows:auto auto;gap:10px 14px;padding:16px 0}
.pn-w .cr-foto{width:72px;height:72px;grid-row:1 / span 2}
.cr-datos{grid-column:2}
.cr-item .cr-quitar{grid-column:3;grid-row:1;align-self:start}
.cr-item .pn-cant{grid-column:2;grid-row:2;width:120px;height:40px}
.cr-item .cr-linea{grid-column:2 / span 2;grid-row:2;justify-self:end;align-self:center;font-size:16px}
.cr-vacio h1{font-size:28px}
.cr-vacio-acc{flex-direction:column;align-self:stretch}
}
/* El punto de "Con stock" respira: crece y se apaga un halo verde, suave y lento */
.pn-stock:not(.pn-sin-stock)::before{box-shadow:0 0 0 0 rgba(31,157,74,.45);animation:pn-respira 2.4s ease-in-out infinite}
@keyframes pn-respira{0%{transform:scale(1);box-shadow:0 0 0 0 rgba(31,157,74,.45);opacity:1}50%{transform:scale(.82);box-shadow:0 0 0 6px rgba(31,157,74,0);opacity:.7}100%{transform:scale(1);box-shadow:0 0 0 0 rgba(31,157,74,0);opacity:1}}
@media (prefers-reduced-motion:reduce){.pn-stock::before{animation:none!important}}
.cr-problema{display:flex;flex-direction:column;gap:4px;margin-bottom:20px;padding:14px 16px;border-left:3px solid #b42318;border-radius:8px;background:#fdf3f2;font-size:14px;line-height:1.45;color:#444}
.cr-problema strong{color:#171717;font-size:14px}
.pn-w .cr-pagar-no{background:#e6e6e3;color:#8a8a86;cursor:default}
.pn-w .cr-pagar-no:hover{background:#e6e6e3;color:#8a8a86}
