/*
Theme Name: Tienda del Insumo - Renovado
Theme URI: https://tiendadelinsumo.com.ar/
Author: Tienda del Insumo
Description: Tema personalizado con catálogo WooCommerce, promociones reales y diseño optimizado.
Version: 0.4.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: tdi-renovado
*/

:root{
  --magenta:#ff008c;
  --yellow:#ffe600;
  --orange:#ff7a00;
  --blue:#0a7cff;
  --green:#25d366;
  --black:#090b10;
  --text:#111318;
  --muted:#6b7586;
  --line:#e7ebf1;
  --soft:#f4f7fb;
  --shadow:0 12px 30px rgba(17,24,39,.10);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Arial,sans-serif;
  color:var(--text);
  background:#fff;
  overflow-x:hidden;
  padding-bottom:calc(78px + env(safe-area-inset-bottom));
}
a{text-decoration:none;color:inherit}
img{display:block;max-width:100%}
button,input{font:inherit}

.wrap{max-width:430px;margin:0 auto;background:#fff;min-height:100vh}
.top{position:sticky;top:0;z-index:50;background:#fff;border-bottom:1px solid var(--line)}
.topbar{display:flex;align-items:center;gap:10px;padding:10px 14px}
.logo{min-width:92px;font-weight:900;line-height:.94;font-size:18px}
.logo small{display:block;font-size:7px;letter-spacing:1px;margin-top:5px;color:#6c7483}
.search{flex:1;display:flex;align-items:center;overflow:hidden;border:1px solid #ced7e3;border-radius:999px;background:#f8faff}
.search input{flex:1;min-width:0;height:40px;border:0;outline:0;background:transparent;padding:0 12px;font-size:14px}
.search button{width:42px;height:40px;border:0;background:var(--magenta);color:#fff;font-size:18px}
.cart{width:42px;height:42px;border:1px solid var(--line);border-radius:14px;background:#fff;display:grid;place-items:center;position:relative;flex:0 0 auto}
.cart .n{position:absolute;right:-4px;top:-4px;width:19px;height:19px;border-radius:50%;background:var(--magenta);color:#fff;display:grid;place-items:center;font-size:10px;font-weight:900;border:2px solid #fff}
.nav{display:flex;gap:16px;overflow-x:auto;white-space:nowrap;background:#0a0d12;color:#fff;padding:11px 14px;font-size:11px;font-weight:900;text-transform:uppercase;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.nav::-webkit-scrollbar{display:none}

.hero-grid{display:grid;grid-template-columns:1fr}
.hero-copy{padding:22px 16px 18px}
.hero-copy h1{margin:0;font-size:46px;line-height:.88;letter-spacing:-2px;font-weight:900;text-transform:uppercase}
.mark{display:inline-block;padding:2px 6px;color:#fff;background:linear-gradient(90deg,var(--magenta),var(--yellow))}
.hero-copy p{margin:12px 0 16px;font-size:16px;line-height:1.45}
.benefits{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:15px}
.benefit{background:var(--soft);border-radius:14px;padding:10px 11px;font-size:12px;font-weight:800}
.cta{display:block;text-align:center;padding:15px;border-radius:999px;color:#fff;font-weight:900;background:linear-gradient(90deg,var(--magenta),#ff0068);box-shadow:0 12px 24px rgba(255,0,140,.18)}
.years{margin-top:10px;text-align:center;font-style:italic;font-weight:900}
.hero-media img{width:100%;height:auto}

.offer{background:linear-gradient(90deg,var(--magenta),#ff005f 60%,var(--yellow));color:#fff;padding:14px}
.offer-top{display:flex;justify-content:space-between;align-items:center;gap:12px}
.offer-title{font-size:25px;line-height:.92;font-weight:900;text-transform:uppercase}
.offer-title span{color:var(--yellow)}
.offer-tag{background:#111;color:#ffb100;padding:8px 10px;font-size:12px;font-weight:900;transform:rotate(-2deg)}
.timer{margin-top:11px;display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.timer-box{background:#111;border-radius:10px;padding:8px 4px;text-align:center}
.timer-box strong{display:block;font-size:19px}
.timer-box span{font-size:9px;letter-spacing:.5px}
.offer a{margin-top:11px;display:block;text-align:center;background:var(--yellow);color:#111;font-weight:900;border-radius:999px;padding:13px}

.categories{padding:14px;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.category{min-height:132px;background:#f1f5fa;border-radius:16px;padding:12px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;text-align:center;font-weight:900;font-size:12px}
.category .media{flex:1;min-height:70px;width:100%;display:grid;place-items:center;font-size:42px}
.category .media img{max-height:72px;object-fit:contain}

.section{padding:8px 14px 22px}
.section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:12px}
.section-head h2{margin:0;font-size:23px;line-height:1}
.section-head a{font-size:11px;font-weight:800;color:#005cc7}
.products{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.product{position:relative;background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.badge{position:absolute;left:8px;top:8px;z-index:2;padding:6px 7px;border-radius:4px;background:var(--magenta);color:#fff;font-size:8px;font-weight:900}
.badge.yellow{background:var(--yellow);color:#111}
.badge.blue{background:var(--blue)}
.product-image{height:145px;padding:20px 10px 8px;background:#fff;display:grid;place-items:center}
.product-image img{width:100%;height:100%;object-fit:contain}
.product-body{padding:10px}
.product-title{min-height:42px;font-size:11px;line-height:1.3;font-weight:700}
.old{margin-top:7px;color:#98a0af;font-size:10px;text-decoration:line-through}
.price-row{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.price{color:var(--magenta);font-weight:900;font-size:19px}
.off{background:var(--yellow);padding:4px 5px;border-radius:3px;font-size:8px;font-weight:900}
.shipping{margin:7px 0;color:#10a34c;font-size:9px;font-weight:800}
.product button{width:100%;border:0;border-radius:7px;background:linear-gradient(90deg,var(--magenta),#ff006a);color:#fff;padding:10px 6px;font-size:11px;font-weight:900}

.banners{padding:0 14px 14px;display:grid;grid-template-columns:1fr;gap:12px}
.banner{border-radius:18px;overflow:hidden;box-shadow:var(--shadow);border:1px solid var(--line);background:#fff}
.banner img{width:100%;height:auto;display:block}

.black-counter{
  background:#050608;
  color:#fff;
  padding:22px 14px 24px;
}
.black-counter .head{
  display:flex;align-items:end;justify-content:space-between;gap:10px;margin-bottom:14px;
}
.black-counter h2{
  margin:0;
  font-size:30px;
  line-height:.92;
  letter-spacing:-1px;
  text-transform:uppercase;
}
.black-counter h2 span{color:var(--yellow)}
.black-counter .sub{
  margin-top:6px;
  color:#bfc7d6;
  font-size:13px;
  line-height:1.45;
}
.black-tag{
  background:linear-gradient(90deg,var(--magenta),var(--orange));
  border-radius:999px;
  padding:8px 11px;
  font-size:10px;
  font-weight:900;
  white-space:nowrap;
}
.counter-boxes{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  margin:16px 0 14px;
}
.counter-item{
  background:#0d1016;
  border:1px solid rgba(255,255,255,.06);
  border-radius:14px;
  padding:12px 6px;
  text-align:center;
}
.counter-item strong{
  display:block;
  font-size:23px;
  line-height:1;
}
.counter-item span{
  display:block;
  margin-top:5px;
  font-size:9px;
  letter-spacing:.7px;
  color:#b9c2d3;
}
.counter-progress{
  height:8px;
  border-radius:999px;
  overflow:hidden;
  background:#171b22;
  margin-bottom:14px;
}
.counter-progress b{
  display:block;height:100%;
  width:68%;
  background:linear-gradient(90deg,var(--magenta),var(--yellow));
}
.counter-actions{
  display:grid;grid-template-columns:1fr 1fr;gap:8px;
}
.counter-actions a{
  text-align:center;padding:13px;border-radius:12px;font-weight:900;
}
.counter-actions .a1{background:var(--yellow);color:#111}
.counter-actions .a2{background:var(--green);color:#fff}

.trust{padding:0 14px 16px;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.trust-item{min-height:54px;background:#f3f6fb;border-radius:12px;padding:10px;display:flex;align-items:center;gap:8px;font-size:10px;font-weight:700}
.trust-item span{font-size:20px}

.wa{position:fixed;right:14px;bottom:calc(92px + env(safe-area-inset-bottom));z-index:80;display:flex;align-items:center;gap:10px;min-width:196px;max-width:calc(100vw - 26px);padding:9px 16px 9px 10px;border-radius:999px;background:linear-gradient(135deg,#ecfff3 0%,#bff7d0 100%);border:3px solid #fff;box-shadow:0 14px 34px rgba(9,63,31,.22);color:#083e20;font-weight:1000;letter-spacing:.25px}
.wa:hover{transform:translateY(-1px)}
.wa-ico{width:42px;height:42px;border-radius:50%;background:#25D366;display:grid;place-items:center;box-shadow:0 8px 18px rgba(37,211,102,.30);flex:0 0 42px}
.wa svg{width:23px;height:23px;fill:#fff}
.wa-text{font-size:14px;line-height:1.1;white-space:nowrap}

.bottom{position:fixed;left:0;right:0;bottom:0;z-index:75;background:#fff;border-top:1px solid #dde3ec;padding-bottom:env(safe-area-inset-bottom)}
.bottom-inner{max-width:430px;margin:0 auto;display:grid;grid-template-columns:repeat(6,1fr);min-height:72px}
.bottom a{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;font-size:9px;color:#111318}
.bottom .ico{font-size:19px}
.bottom .bn{position:absolute;top:6px;right:22%;width:18px;height:18px;border-radius:50%;background:var(--magenta);color:#fff;display:grid;place-items:center;font-size:8px;font-weight:900}

.popup-toggle{position:fixed;opacity:0;pointer-events:none}
.popup-overlay{position:fixed;inset:0;z-index:100;background:rgba(0,0,0,.62);display:flex;align-items:center;justify-content:center;padding:16px}
.popup-toggle:not(:checked) + .popup-overlay{display:none}
.popup{width:100%;max-width:420px;background:#fff;border-radius:24px;overflow:hidden}
.popup-head{position:relative;padding:24px;color:#fff;background:linear-gradient(135deg,var(--magenta),#ff005b 60%,var(--yellow))}
.popup-head h3{margin:0 0 8px;font-size:33px;line-height:.94}
.popup-head p{margin:0;line-height:1.45}
.close{position:absolute;top:10px;right:10px;width:36px;height:36px;border:0;border-radius:50%;background:rgba(255,255,255,.18);color:#fff;font-size:20px;display:grid;place-items:center;cursor:pointer}
.popup-actions{padding:16px;display:grid;grid-template-columns:1fr;gap:8px}
.popup-actions a{text-align:center;padding:13px;border-radius:10px;font-weight:900}
.offer-btn{background:var(--yellow);color:#111}
.wa-btn{background:var(--green);color:#fff}

@media(min-width:768px){
  .wrap{max-width:1100px}
  .hero-grid{grid-template-columns:1fr 1fr;align-items:center}
  .hero-media{order:2}
  .hero-copy{order:1;padding:36px}
  .hero-copy h1{font-size:72px}
  .benefits{grid-template-columns:repeat(4,1fr)}
  .categories{grid-template-columns:repeat(4,1fr)}
  .products{grid-template-columns:repeat(4,1fr)}
  .banners{grid-template-columns:1.5fr 1fr}
  .trust{grid-template-columns:repeat(5,1fr)}
  .black-counter .head{align-items:center}
  .counter-boxes{grid-template-columns:repeat(4,120px)}
  .bottom-inner{max-width:1100px}
}

/* Correcciones de diagramación y contenido */
.hero-grid{min-width:0;overflow:hidden}.hero-copy{min-width:0}.hero-copy h1{overflow-wrap:normal;word-break:normal}.hero-media{overflow:hidden;min-width:0}.hero-media img{height:auto;width:100%;object-fit:contain}.hero-copy .benefits{align-items:stretch}
.banner{min-width:0}.banner img{width:100%;height:auto;object-fit:contain}.banners{align-items:stretch}.offer-desc{font-size:14px;line-height:1.45;margin:12px 0 4px}.product{display:flex;flex-direction:column;min-width:0}.product-body{display:flex;flex-direction:column;flex:1}.product-title{display:block;overflow-wrap:anywhere;min-height:44px}.product-image{overflow:hidden}.product-action{display:block;margin-top:auto;padding:12px 7px;background:#ff008c;color:white;text-align:center;border-radius:9px;font-weight:900;font-size:12px}.product .price{font-size:17px}.product .price del{font-size:12px;color:#777}.product .price ins{text-decoration:none}.tdi-admin-note{grid-column:1/-1;background:#fff5da;border-radius:12px;padding:16px}.offer-tag{transform:none}.black-counter .head{align-items:flex-start}.black-tag{white-space:normal;text-align:center}.counter-boxes{grid-template-columns:repeat(4,minmax(0,1fr))}.counter-item{min-width:0}.counter-item strong{font-variant-numeric:tabular-nums}
/* Modal de cupón con alto contraste */
.tdi-modal[hidden]{display:none!important}.tdi-modal{position:fixed;inset:0;z-index:9999;background:rgba(1,4,12,.88);backdrop-filter:blur(9px);display:flex;justify-content:center;align-items:center;padding:18px;overflow-y:auto}.tdi-modal-open{overflow:hidden}.tdi-modal-panel{width:min(100%,455px);max-height:calc(100vh - 30px);overflow-y:auto;position:relative;background:#fff;border:5px solid #ffe600;border-radius:24px;box-shadow:0 25px 90px #0009,0 0 0 5px #ff008c;isolation:isolate;text-align:center}.tdi-modal-close{position:absolute;z-index:5;right:10px;top:10px;border:0;width:40px;height:40px;border-radius:50%;background:#fff;color:#111;font-size:28px;cursor:pointer}.tdi-modal-top{background:linear-gradient(140deg,#11131b 8%,#39001f 60%,#a40055 100%);padding:20px 22px 22px;color:#fff}.tdi-sparkle{display:block;font-size:24px;color:#ffe600}.tdi-kicker{display:block;color:#ffe600;font-size:14px;font-weight:900;letter-spacing:1.5px;margin-top:4px}.tdi-main-discount{display:flex;justify-content:center;align-items:baseline;gap:9px;line-height:1;margin:8px 0}.tdi-main-discount strong{font-size:clamp(70px,18vw,105px);letter-spacing:-5px;color:#ffe600;text-shadow:5px 5px 0 #ff008c}.tdi-main-discount span{font-size:43px;font-weight:1000;color:white}.tdi-modal-top h2{font-size:clamp(21px,5vw,29px);line-height:1.07;margin:6px 0;font-weight:1000}.tdi-modal-top p{margin:8px 0 0;font-size:16px}.tdi-modal-body{padding:18px 24px 22px}.tdi-code-label{font-weight:900;color:#222;font-size:12px;letter-spacing:2px;margin:0 0 6px}.tdi-code{font-size:clamp(30px,8vw,40px);font-weight:1000;letter-spacing:3px;border:3px dashed #ff008c;border-radius:12px;background:#fff7c4;padding:10px;margin-bottom:10px}.tdi-copy{width:100%;border:0;border-radius:14px;color:white;background:#f00087;font-size:19px;font-weight:900;cursor:pointer;padding:15px}.tdi-copy:hover{background:#c70070}.tdi-extra{background:#111;color:white;padding:11px 12px;border-radius:12px;margin:14px 0 9px;font-size:14px;line-height:1.4}.tdi-extra b{color:#ffe600}.tdi-terms{font-size:12px;color:#626977;line-height:1.4}.tdi-no-thanks{background:none;border:0;text-decoration:underline;color:#525969;cursor:pointer;padding:6px;font-size:13px}
@media(min-width:768px){.hero-copy h1{font-size:clamp(49px,5vw,70px);line-height:1.02;letter-spacing:-1px}.hero-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.banner img{object-fit:contain}.counter-boxes{grid-template-columns:repeat(4,minmax(0,120px))}}
@media(max-width:390px){.hero-copy h1{font-size:40px}.black-counter h2{font-size:26px}.counter-item{padding:10px 3px}.counter-item strong{font-size:20px}}

@media(max-width:560px){.wa{right:10px;bottom:calc(84px + env(safe-area-inset-bottom));min-width:172px;padding:8px 12px 8px 9px}.wa-ico{width:38px;height:38px;flex-basis:38px}.wa-text{font-size:13px}}
