/* CreatiMarket · Tienda pública responsive v1
   Sobrescribe solo distribución/presentación. No modifica datos ni eventos de ventas.
*/
html{max-width:100%;overflow-x:clip}
body{min-width:0;max-width:100%;overflow-x:clip}
.tv-wrap,.tv-shop-layout,.tv-shop-layout>main{min-width:0}
.tv-mobile-filter-toggle{display:none}
.tv-sidebar,.tv-card,.tv-checkout-modal,.tv-cart-panel{min-width:0}
.tv-gallery-open{min-width:0}
.tv-grid>.tv-card{width:100%;min-width:0}
.tv-card .tv-price-row{min-width:0}
.tv-cart-panel,.tv-checkout-modal{overscroll-behavior:contain}
.tv-card .tv-name,.tv-card .tv-meta{overflow-wrap:anywhere}
.tv-checkout-modal .tv-checkout-body{min-width:0}
.tv-slide img{min-width:0}

/* Tablet: filtros compactos en panel desplegable y catálogo adaptable. */
@media(max-width:1024px){
  .tv-wrap{padding:20px 18px 108px}
  .tv-header{padding:20px;border-radius:18px;gap:12px}
  .tv-title{font-size:clamp(23px,3.4vw,32px);line-height:1.12}
  .tv-subtitle{font-size:13px;line-height:1.4}
  .tv-home{margin:14px 0}
  .tv-toolbar{margin:12px 0;padding:12px;border-radius:16px}
  .tv-shop-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
  .tv-mobile-filter-toggle{display:flex;width:100%;align-items:center;gap:10px;background:#18243a;color:#f5f8ff;border:1px solid #3a4d6d;border-radius:13px;padding:13px 15px;text-align:left;font-weight:950;cursor:pointer;min-height:51px}
  .tv-mobile-filter-hint{margin-left:auto;font-size:12px;font-weight:600;color:#a8bbd6;text-align:right;min-width:0}
  .tv-mobile-filter-chevron{font-size:23px;line-height:1;color:#31d77b;transform:translateY(-2px);transition:transform .15s}
  .tv-mobile-filter-toggle[aria-expanded="true"] .tv-mobile-filter-chevron{transform:rotate(180deg)}
  .tv-mobile-filter-toggle:focus-visible{outline:3px solid #31d77b;outline-offset:2px}
  .tv-sidebar{display:none;position:static;top:auto;width:100%;max-height:min(63dvh,560px);overflow:auto;overscroll-behavior:contain;padding:14px;border-radius:14px;scrollbar-width:thin}
  .tv-sidebar.is-open{display:block}
  .tv-side-block:first-child{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .tv-side-block:first-child .tv-side-title{grid-column:1/-1}
  .tv-side-filter{margin:0;min-height:42px;font-size:13px;white-space:normal;line-height:1.25}
  .tv-side-block:nth-child(2){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .tv-side-block:nth-child(2) .tv-side-title{grid-column:1/-1}
  .tv-cat-filter{min-width:0;margin:0}
  .tv-cat-filter span:last-child{overflow-wrap:anywhere}
  .tv-grid{grid-template-columns:repeat(auto-fill,minmax(196px,1fr));gap:14px}
  .tv-card .tv-body{grid-template-rows:minmax(44px,auto) minmax(18px,auto) minmax(27px,auto) 1fr minmax(46px,auto);min-width:0}
  .tv-arrival{max-height:none}
  .tv-grid>.tv-card{height:auto;min-height:410px}
  .tv-grid>.tv-card .tv-imgbox{height:auto;aspect-ratio:1/1.10}
  .tv-grid>.tv-card .tv-body{display:flex;flex-direction:column;min-height:175px;gap:7px;flex:1}
  .tv-card .tv-name{min-height:2.3em}
  .tv-card .tv-price-row{margin-top:auto;align-self:stretch}
  .tv-upcoming-card .tv-upcoming-body{min-height:175px}
  .tv-products-head h2{font-size:21px}
  .tv-section-sub{line-height:1.4}
  .tv-floating-cart{right:18px;bottom:calc(16px + env(safe-area-inset-bottom,0px));padding:12px 19px;min-height:48px}
  .tv-cart-panel{height:100dvh;max-width:min(440px,100vw)}
  .tv-checkout-modal{max-width:calc(100vw - 30px)}
}

/* Celulares: dos tarjetas por fila, filtros ocultables y compra sin desbordes. */
@media(max-width:600px){
  .tv-wrap{padding:10px 10px 100px}
  .tv-header{padding:14px 15px;border-radius:15px;min-height:75px}
  .tv-title{font-size:clamp(21px,6.1vw,26px);letter-spacing:-.035em}
  .tv-subtitle{font-size:11px;margin-top:5px;line-height:1.3}
  .tv-actions.public-actions{display:none} /* Carrito fijo inferior ya disponible */
  .tv-home{gap:9px;margin:10px 0}
  .tv-slider,.tv-slide img,.tv-hero-empty{min-height:174px}
  .tv-slider{border-radius:15px}
  .tv-hero-info{left:14px;right:48px;bottom:26px;max-width:unset}
  .tv-hero-info h1{font-size:clamp(18px,5.5vw,24px);line-height:1.05}
  .tv-hero-info p{font-size:12px;margin-top:5px;line-height:1.3}
  .tv-slider-nav{width:30px;height:30px;font-size:22px}
  .tv-slider-nav.prev{left:5px}.tv-slider-nav.next{right:5px}
  .tv-slider-dots{bottom:7px}
  .tv-banner{border-radius:12px}.tv-banner img{height:78px}
  .tv-toolbar{margin:10px 0;padding:8px;border-radius:14px}
  .tv-input{padding:12px 13px;font-size:16px;border-radius:10px;min-height:46px}
  .tv-mobile-filter-toggle{padding:10px 12px;font-size:13px;gap:7px;min-height:46px}
  .tv-mobile-filter-hint{font-size:11px;max-width:42%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .tv-sidebar{max-height:min(67dvh,550px)}
  .tv-side-block:nth-child(2){grid-template-columns:1fr}
  .tv-cat-filter{min-height:42px}
  .tv-products-head{margin:3px 0 10px}
  .tv-products-head h2{font-size:19px}
  .tv-section-sub{font-size:11px;line-height:1.4}
  .tv-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;align-items:stretch}
  .tv-grid>.tv-card{height:auto;min-height:0;border-radius:12px;box-shadow:0 8px 20px #0006}
  .tv-grid>.tv-card .tv-imgbox{height:auto;aspect-ratio:1/1.12;flex:none}
  .tv-grid>.tv-card .tv-body{display:flex;flex-direction:column;gap:6px;padding:9px 9px 10px;min-height:170px;flex:1}
  .tv-grid>.tv-card .tv-name{font-size:13px;line-height:1.22;min-height:2.44em;max-height:3.66em;-webkit-line-clamp:3;overflow-wrap:anywhere}
  .tv-grid>.tv-card .tv-meta{font-size:10px;min-height:1.1em;max-height:1.1em}
  .tv-grid>.tv-card .tv-stock-row{gap:4px;min-height:22px}
  .tv-badge{font-size:9px;padding:5px 6px;line-height:1.08}
  .tv-new-pill{font-size:9px;margin-left:0;padding:5px 6px}
  .tv-grid>.tv-card .tv-arrival{font-size:10px;line-height:1.25;max-height:none;min-width:0;flex:0 0 auto;margin:2px 0 4px}
  .tv-arrival-more{font-size:9px;white-space:normal}
  .tv-grid>.tv-card .tv-price-row{gap:4px;min-height:38px}
  .tv-price-main{font-size:clamp(17px,5.2vw,23px);letter-spacing:-.025em;min-width:0;overflow-wrap:normal;white-space:nowrap}
  .tv-price-main .desde{font-size:10px;margin-bottom:2px}
  .tv-add-cart{width:36px;height:36px;font-size:22px;min-width:36px}
  .tv-photos-label{bottom:5px;left:5px;font-size:9px;padding:4px 6px}
  .tv-type-picker{left:4px;right:4px;bottom:40px;padding:7px;border-radius:10px}
  .tv-type-title{font-size:11px}.tv-type-option{font-size:11px;padding:8px;gap:4px;white-space:normal}
  .tv-upcoming-card .tv-upcoming-body{gap:5px;min-height:180px;padding:9px}
  .tv-upcoming-card .tv-interest-btn{padding:9px 5px;font-size:11px}
  .tv-upcoming-card .tv-no-sale,.tv-upcoming-card .tv-interest-count{font-size:10px}
  .tv-upcoming-card .tv-launch-badge{font-size:10px;white-space:normal}
  .tv-floating-cart{left:50%;right:auto;bottom:calc(12px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);min-width:190px;justify-content:center;padding:12px 20px;border-radius:999px;box-shadow:0 9px 32px #000b}
  .tv-toast{bottom:calc(74px + env(safe-area-inset-bottom,0px));max-width:calc(100vw - 24px);border-radius:14px;text-align:center;font-size:12px}
  .tv-cart-panel{width:100vw;max-width:100vw;height:100dvh;border-left:0}
  .tv-cart-head,.tv-cart-foot{padding:13px 15px}
  .tv-cart-items{padding:10px 12px}
  .tv-cart-actions{gap:8px}
  .tv-checkout-modal,.tv-checkout-modal.open{left:0;right:0;top:0;width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;transform:none;border:0;border-radius:0;overflow-y:auto;overscroll-behavior:contain}
  .tv-checkout-head{position:sticky;top:0;z-index:2;background:#111827;padding:13px 14px}
  .tv-checkout-head h2{font-size:19px}
  .tv-checkout-body{padding:11px;gap:10px}
  .tv-check-section{padding:11px;border-radius:13px}
  .tv-client-grid,.tv-mini-grid{grid-template-columns:1fr}
  .tv-order-row{grid-template-columns:minmax(0,1fr) auto}
  .tv-order-name,.tv-cart-name{overflow-wrap:anywhere}
  .tv-photo-modal{width:100%;max-height:calc(100dvh - 12px)}
  .tv-photo-stage{height:min(60dvh,480px)}
}
@media(max-width:350px){
  .tv-wrap{padding-left:7px;padding-right:7px}
  .tv-grid{gap:7px}
  .tv-grid>.tv-card .tv-body{padding:8px 7px}
  .tv-price-main{font-size:17px}
  .tv-add-cart{width:33px;height:33px;min-width:33px}
  .tv-stock-row{gap:3px}
  .tv-badge{font-size:8.5px}
}
@media(prefers-reduced-motion:reduce){
 .tv-mobile-filter-chevron{transition:none}
}
