/* ============================================================
   Tienda RiegoMan.cl — estilos propios (sobre riegoman.css)
   ============================================================ */
.tn-sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
.rm-nav-toggle{ order:3; }
.tn-cart-btn{ order:4; position:relative; display:inline-flex; align-items:center; justify-content:center; width:46px; height:46px; border-radius:50%; background:var(--rm-black); color:#fff; text-decoration:none; margin-left:12px; flex:0 0 auto; }
.tn-cart-btn:hover{ background:var(--rm-accent); }
.tn-cart-n{ position:absolute; top:-4px; right:-4px; min-width:20px; height:20px; padding:0 5px; border-radius:20px; background:var(--rm-accent); color:#fff; font-size:11px; font-weight:800; display:flex; align-items:center; justify-content:center; border:2px solid #fff; }
.tn-cart-n[data-n="0"]{ display:none; }
.tn-aviso{ background:var(--rm-accent); color:#fff; text-align:center; font-weight:700; font-size:14px; padding:10px 16px; }

/* Hero tienda */
.tn-hero{ padding-bottom:30px; }
.tn-hero h1{ font-size:clamp(38px, 7vw, 84px); }
.tn-hero-sm h1{ font-size:clamp(34px, 6vw, 68px); }
.tn-search{ display:flex; max-width:620px; margin:6px 0 22px; border:2px solid var(--rm-black); border-radius:100px; overflow:hidden; background:#fff; }
.tn-search input{ flex:1; min-width:0; border:0; padding:15px 22px; font:inherit; font-size:15px; outline:none; }
.tn-search button{ border:0; background:var(--rm-black); color:#fff; font:inherit; font-weight:800; padding:0 26px; cursor:pointer; }
.tn-search button:hover{ background:var(--rm-accent); }
.tn-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.tn-chips a{ text-decoration:none; font-size:14px; font-weight:700; border:1.5px solid #d5d5d5; border-radius:100px; padding:9px 16px; background:#fff; }
.tn-chips a small{ color:var(--rm-gray); font-weight:600; margin-left:2px; }
.tn-chips a:hover, .tn-chips a.is-on{ border-color:var(--rm-black); background:var(--rm-black); color:#fff; }
.tn-chips a.is-on small, .tn-chips a:hover small{ color:#bbb; }

.tn-sec{ padding-top:50px; padding-bottom:50px; }
.tn-sec-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.tn-sec-head .rm-section-title{ margin-bottom:28px; }
.tn-more{ font-weight:800; text-decoration:none; color:var(--rm-accent); margin-bottom:34px; }

/* Grilla y tarjetas */
.tn-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap:24px; }
.tn-card{ min-width:0; display:flex; flex-direction:column; background:var(--rm-gray-light); border-radius:18px; overflow:hidden; transition:transform .2s ease, box-shadow .2s ease; }
.tn-card:hover{ transform:translateY(-3px); box-shadow:0 14px 30px rgba(0,0,0,.08); }
.tn-card-img{ position:relative; display:block; aspect-ratio:1/1; background:#e9e6df; }
.tn-card-img img{ width:100%; height:100%; object-fit:cover; display:block; }
.tn-badge{ position:absolute; top:12px; left:12px; background:var(--rm-black); color:#fff; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; padding:6px 10px; border-radius:100px; }
.tn-badge-oferta{ background:#d93025; }
.tn-card-body{ padding:16px 18px 20px; display:flex; flex-direction:column; flex:1; }
.tn-card-cat{ font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; color:var(--rm-accent); margin:0 0 6px; }
.tn-card h3{ font-size:18px; font-weight:900; line-height:1.2; margin:0 0 6px; }
.tn-card h3 a{ text-decoration:none; }
.tn-card-var{ font-size:13px; color:var(--rm-gray); margin:0 0 10px; }
.tn-card-price{ font-size:22px; font-weight:900; margin:auto 0 10px; }
.tn-card-price small{ font-size:13px; font-weight:700; color:var(--rm-gray); }
.tn-consultar{ font-size:16px; color:var(--rm-accent); }
.tn-card-link{ font-size:14px; font-weight:800; text-decoration:none; }
.tn-card-link:hover{ color:var(--rm-accent); }

/* Producto */
.tn-prod{ display:grid; grid-template-columns:minmax(0, 1.1fr) minmax(0, 1fr); gap:48px; padding-top:30px; padding-bottom:40px; align-items:start; }
.tn-gallery{ position:sticky; top:96px; }
.tn-gallery-main{ aspect-ratio:1/1; border-radius:22px; overflow:hidden; background:#e9e6df; }
.tn-gallery-main img{ width:100%; height:100%; object-fit:cover; display:block; }
.tn-thumbs{ display:flex; gap:10px; margin-top:12px; overflow-x:auto; padding-bottom:4px; }
.tn-thumb{ flex:0 0 76px; height:76px; padding:0; border:2px solid transparent; border-radius:12px; overflow:hidden; cursor:pointer; background:none; }
.tn-thumb.is-on{ border-color:var(--rm-black); }
.tn-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.tn-info-cat{ display:inline-block; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.1em; color:var(--rm-accent); text-decoration:none; margin-bottom:10px; }
.tn-info h1{ font-size:clamp(30px, 4vw, 46px); font-weight:900; line-height:1.05; letter-spacing:-.01em; margin:0 0 14px; }
.tn-resumen{ font-size:17px; color:var(--rm-gray); margin:0 0 22px; }
.tn-price{ display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 12px; margin-bottom:6px; }
.tn-price-now{ font-size:38px; font-weight:900; letter-spacing:-.01em; }
.tn-price-old{ font-size:20px; color:var(--rm-gray); text-decoration:line-through; }
.tn-price-old:empty{ display:none; }
.tn-price-unit{ width:100%; font-size:13px; color:var(--rm-gray); }
.tn-stock{ font-size:14px; font-weight:700; margin:0 0 20px; color:#1a7f37; min-height:20px; }
.tn-stock.is-low{ color:#b45309; }
.tn-stock.is-off{ color:#b91c1c; }
.tn-field{ margin-bottom:18px; }
.tn-field > label{ display:block; font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; margin-bottom:8px; }
.tn-select{ width:100%; padding:14px 16px; font:inherit; font-size:16px; border:2px solid var(--rm-black); border-radius:12px; background:#fff; }
.tn-opts{ display:flex; flex-wrap:wrap; gap:8px; }
.tn-opt{ cursor:pointer; }
.tn-opt input{ position:absolute; opacity:0; pointer-events:none; }
.tn-opt span{ display:inline-block; padding:10px 16px; border:2px solid #d5d5d5; border-radius:100px; font-weight:700; font-size:14px; background:#fff; }
.tn-opt input:checked + span{ border-color:var(--rm-black); background:var(--rm-black); color:#fff; }
.tn-opt input:focus-visible + span{ outline:3px solid var(--rm-accent); outline-offset:2px; }
.tn-opt.is-off span{ color:#999; text-decoration:line-through; }
.tn-calc{ background:var(--rm-gray-light); border-radius:14px; padding:16px 18px; margin-bottom:18px; }
.tn-calc label{ display:block; font-weight:800; font-size:14px; margin-bottom:8px; }
.tn-calc-row{ display:flex; align-items:center; gap:10px; }
.tn-calc-row input{ width:140px; padding:10px 12px; font:inherit; font-size:16px; border:2px solid #cfcfcf; border-radius:10px; }
.tn-calc-out{ font-size:14px; color:var(--rm-gray); margin:10px 0 0; }
.tn-calc-out strong{ color:var(--rm-black); }
.tn-calc-out button{ font:inherit; font-size:13px; font-weight:800; color:var(--rm-accent); background:none; border:0; padding:0; cursor:pointer; text-decoration:underline; }
.tn-qty-row{ display:flex; gap:12px; align-items:stretch; flex-wrap:wrap; }
.tn-qty{ display:inline-flex; align-items:center; border:2px solid var(--rm-black); border-radius:100px; overflow:hidden; background:#fff; }
.tn-qty button{ width:46px; height:52px; border:0; background:none; font-size:22px; font-weight:700; cursor:pointer; }
.tn-qty button:hover{ background:var(--rm-gray-light); }
.tn-qty input{ width:64px; border:0; text-align:center; font:inherit; font-size:17px; font-weight:800; -moz-appearance:textfield; }
.tn-qty input::-webkit-inner-spin-button{ -webkit-appearance:none; }
.tn-qty-sm button{ width:36px; height:40px; font-size:18px; }
.tn-qty-sm input{ width:48px; font-size:15px; }
.tn-add{ flex:1; min-width:200px; border:0; cursor:pointer; font-size:16px; text-align:center; }
.tn-add:disabled{ background:#bdbdbd; cursor:not-allowed; }
.tn-total{ font-size:14px; color:var(--rm-gray); margin:10px 0 14px; min-height:20px; }
.tn-total strong{ color:var(--rm-black); }
.tn-wa{ width:100%; text-align:center; }
.tn-wa.is-main{ background:#25d366; border-color:#25d366; color:#fff; }
.tn-perks{ list-style:none; padding:0; margin:26px 0 0; display:grid; gap:10px; font-size:14px; color:var(--rm-gray); }
.tn-perks li{ padding-left:26px; position:relative; }
.tn-perks li::before{ content:"✓"; position:absolute; left:0; top:0; color:var(--rm-accent); font-weight:900; }
.tn-perks strong{ color:var(--rm-black); }
.tn-detail{ display:grid; grid-template-columns:minmax(0, 1.2fr) minmax(0, 1fr); gap:48px; border-top:1px solid #ececec; }
.tn-rich{ font-size:17px; line-height:1.7; color:#333; }
.tn-rich ul{ padding-left:20px; }
.tn-rich li{ margin-bottom:6px; }
.tn-table-wrap{ min-width:0; }
.tn-table{ width:100%; border-collapse:collapse; font-size:14px; }
.tn-table th{ text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.05em; padding:10px 8px; border-bottom:2px solid var(--rm-black); }
.tn-table td{ padding:9px 8px; border-bottom:1px solid #ececec; }
.tn-table td:nth-child(2){ color:var(--rm-gray); font-size:12px; }
.tn-table s{ color:var(--rm-gray); }

/* Carrito y checkout */
.tn-ok{ background:#e7f6ec; color:#14532d; border-radius:12px; padding:14px 18px; font-weight:700; }
.tn-err{ background:#fdecec; color:#8a1c1c; border-radius:12px; padding:14px 18px; font-weight:700; }
.tn-err-txt{ color:#b91c1c; font-size:13px; font-weight:700; }
.tn-cart-list{ display:flex; flex-direction:column; gap:12px; margin:20px 0; }
.tn-line{ display:grid; grid-template-columns:90px minmax(0, 1fr) auto auto 36px; gap:16px; align-items:center; background:var(--rm-gray-light); border-radius:16px; padding:12px; }
.tn-line.is-warn{ outline:2px solid #f59e0b; }
.tn-line img{ width:90px; height:90px; object-fit:cover; border-radius:12px; background:#e9e6df; }
.tn-line-info{ display:flex; flex-direction:column; gap:3px; font-size:14px; color:var(--rm-gray); min-width:0; }
.tn-line-info a{ color:var(--rm-black); text-decoration:none; font-size:16px; }
.tn-line-total{ font-size:18px; min-width:90px; text-align:right; }
.tn-x{ width:36px; height:36px; border-radius:50%; border:0; background:#fff; font-size:22px; cursor:pointer; line-height:1; }
.tn-x:hover{ background:#fdecec; color:#b91c1c; }
.tn-cart-foot{ display:flex; justify-content:space-between; align-items:flex-start; gap:20px; flex-wrap:wrap; }
.tn-cart-foot .rm-btn-outline{ cursor:pointer; background:#fff; font:inherit; font-weight:700; }
.tn-cart-sum{ display:flex; flex-direction:column; align-items:flex-end; gap:8px; }
.tn-cart-sum p{ margin:0; font-size:20px; }
.tn-cart-sum small{ color:var(--rm-gray); }
.tn-btn-off{ background:#e5e5e5; color:#777; }
.tn-checkout{ display:grid; grid-template-columns:minmax(0, 1.5fr) minmax(0, 1fr); gap:40px; align-items:start; margin-top:20px; }
.tn-fs{ border:0; padding:0; margin:0 0 30px; min-width:0; }
.tn-fs legend{ font-size:20px; font-weight:900; margin-bottom:16px; padding:0; }
.tn-checkout .rm-row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.tn-checkout .rm-field{ min-width:0; }
.tn-checkout label{ font-size:13px; font-weight:700; }
.tn-checkout input[type=text], .tn-checkout input[type=email], .tn-checkout input[type=tel], .tn-checkout select, .tn-checkout textarea{
  width:100%; padding:13px 14px; font:inherit; font-size:15px; border:2px solid #d5d5d5; border-radius:10px; background:#fff; }
.tn-checkout input:focus, .tn-checkout select:focus, .tn-checkout textarea:focus{ outline:none; border-color:var(--rm-accent); }
.tn-has-err input, .tn-has-err select{ border-color:#dc2626 !important; }
.tn-checkout .rm-full{ margin-top:16px; }
.tn-radio{ display:flex; gap:12px; align-items:flex-start; border:2px solid #e2e2e2; border-radius:14px; padding:14px 16px; margin-bottom:10px; cursor:pointer; }
.tn-radio:has(input:checked){ border-color:var(--rm-black); background:var(--rm-gray-light); }
.tn-radio input{ margin-top:4px; accent-color:var(--rm-black); width:18px; height:18px; }
.tn-radio span{ display:flex; flex-direction:column; gap:3px; }
.tn-radio small{ color:var(--rm-gray); font-size:13px; }
.tn-dir{ margin-top:14px; }
.tn-check{ display:flex; gap:10px; align-items:flex-start; font-size:14px; cursor:pointer; }
.tn-check input{ margin-top:3px; width:18px; height:18px; accent-color:var(--rm-black); }
.tn-ck-side{ position:sticky; top:96px; background:var(--rm-gray-light); border-radius:20px; padding:24px; display:flex; flex-direction:column; gap:10px; }
.tn-ck-side small{ color:var(--rm-gray); font-size:12px; }
.tn-ck-side > a{ font-size:14px; }
.tn-sum{ list-style:none; padding:0; margin:0 0 6px; display:flex; flex-direction:column; gap:8px; font-size:14px; }
.tn-sum li{ display:flex; justify-content:space-between; gap:12px; }
.tn-sum li span{ color:#333; }
.tn-sum-row{ display:flex; justify-content:space-between; margin:0; font-size:15px; }
.tn-sum-total{ font-size:20px !important; border-top:2px solid var(--rm-black); padding-top:10px; }
.tn-sum-lg{ max-width:640px; font-size:16px; }
.tn-pay{ border:0; cursor:pointer; font-size:16px; width:100%; text-align:center; margin-top:8px; }

@media (max-width:900px){
  .tn-prod, .tn-detail, .tn-checkout{ grid-template-columns:1fr; gap:28px; }
  .tn-gallery, .tn-ck-side{ position:static; }
  .tn-line{ grid-template-columns:70px minmax(0, 1fr) 36px; grid-template-areas:"img info x" "img qty total"; }
  .tn-line img{ width:70px; height:70px; grid-area:img; }
  .tn-line-info{ grid-area:info; }
  .tn-line .tn-qty{ grid-area:qty; justify-self:start; }
  .tn-line-total{ grid-area:total; }
  .tn-x{ grid-area:x; }
}
@media (max-width:600px){
  .tn-checkout .rm-row{ grid-template-columns:1fr; }
  .tn-price-now{ font-size:32px; }
  .tn-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
  .tn-card-body{ padding:12px 12px 16px; }
  .tn-card h3{ font-size:15px; }
  .tn-card-price{ font-size:17px; }
  .tn-search button{ padding:0 18px; }
  .tn-cart-btn{ width:42px; height:42px; }
}
[hidden]{ display:none !important; }
@media (max-width:600px){
  .tn-hero .rm-hero-sub{ font-size:17px; }
  .tn-chips{ flex-wrap:nowrap; overflow-x:auto; margin:0 -24px; padding:0 24px 6px; scrollbar-width:none; }
  .tn-chips a{ flex:0 0 auto; }
}

/* RM-PROMO-CSS:INICIO */
#rm-promo{ display:flex; flex-direction:column; align-items:flex-end; gap:10px; transition:opacity .3s ease; }
#rm-promo-list{ display:flex; flex-direction:column; align-items:flex-end; gap:8px; }
.rm-promo-item{ display:flex; align-items:center; gap:9px; text-decoration:none; border-radius:100px; padding:6px 16px 6px 6px; box-shadow:0 6px 18px rgba(0,0,0,.22); white-space:nowrap; transform:translateX(130%); animation:rmPromoIn .6s cubic-bezier(.2,.9,.3,1.2) forwards 1.2s; transition:padding .25s ease, box-shadow .25s ease; }
.rm-promo-caj{ animation-delay:1.4s; }
.rm-promo-item svg{ width:32px; height:32px; flex:0 0 32px; display:block; transition:transform .3s ease; }
.rm-promo-item:hover svg{ transform:rotate(-8deg) scale(1.08); }
.rm-promo-txt{ display:flex; flex-direction:column; line-height:1.1; }
.rm-promo-txt b{ font-size:13.5px; font-weight:800; }
.rm-promo-txt small{ font-size:11px; font-weight:600; opacity:.8; max-height:0; overflow:hidden; transition:max-height .25s ease, margin .25s ease; }
.rm-promo-item:hover .rm-promo-txt small, .rm-promo-item:focus-visible .rm-promo-txt small{ max-height:16px; margin-top:2px; }
.rm-promo-item:hover{ box-shadow:0 10px 26px rgba(0,0,0,.3); }
.rm-promo-pro{ background:#062a31; color:#fff; border:1px solid rgba(94,234,212,.4); }
.rm-promo-pro b{ color:#5eead4; }
.rm-promo-caj{ background:#fffaf0; color:#1d2a16; border:1px solid #d9c9a6; }
.rm-promo-caj b{ color:#2f7d32; }
#rm-promo-toggle{ display:none; }
html.rmp-on #rm-promo{ opacity:0; pointer-events:none; }
#rm-promo.is-hello .rm-promo-item{ animation:rmPromoHello .7s ease 2; }
@keyframes rmPromoIn{ to{ transform:none; } }
@keyframes rmPromoHello{ 0%,100%{ transform:none; } 40%{ transform:translateX(-8px); } }
@media (max-width:600px){
  #rm-promo-toggle{ display:flex; align-items:center; gap:5px; font:inherit; font-size:12px; font-weight:800; color:#04252b; background:linear-gradient(90deg,#5eead4,#a3e635); border:0; border-radius:100px; padding:9px 13px; box-shadow:0 6px 18px rgba(0,0,0,.25); cursor:pointer; }
  #rm-promo-list{ display:none; }
  #rm-promo.is-open #rm-promo-list{ display:flex; }
  #rm-promo.is-open .rm-promo-item{ animation:rmPromoIn .35s cubic-bezier(.2,.9,.3,1.2) forwards; }
  #rm-promo.is-open .rm-promo-caj{ animation-delay:.06s; }
  .rm-promo-txt small{ max-height:16px; margin-top:2px; }
}
@media (prefers-reduced-motion: reduce){ .rm-promo-item{ animation:none !important; transform:none !important; } }
/* RM-PROMO-CSS:FIN */
