/* Merka2 v1.4: menú global permanente, subpáginas integradas y vista ampliada de producto.
   Sólo se carga en index.html; NO en /tiendas/informatica ni /tiendas/jardineria. */
#homeView[hidden],#categoryView[hidden],#embeddedVendorTop[hidden],#embeddedMore[hidden],#embeddedEmpty[hidden],#categoryMega[hidden]{display:none!important}
body{overflow-x:hidden}
.header{position:sticky;top:0;z-index:90;box-shadow:0 5px 25px #06152a23!important}
.nav{z-index:38}
#categoryView{min-height:65vh;background:var(--t-bg,#f1f5f9);padding-bottom:40px}
.embedded-banner{background:linear-gradient(105deg,var(--t-dark,#092538) 0%,var(--t-primary,#036a86) 75%,var(--t-dark,#092538) 100%);position:relative;overflow:hidden;border-bottom:7px solid var(--t-highlight,#ffce44);color:white}
.embedded-banner::before{content:"";position:absolute;width:450px;height:450px;border:80px solid #fff1;border-radius:50%;right:-60px;top:-250px;pointer-events:none}
.embedded-banner-inner{min-height:245px;display:flex;justify-content:space-between;align-items:center;gap:25px;padding:38px 0}
.embedded-title-block{position:relative;z-index:1}.embedded-breadcrumb{display:flex;align-items:center;gap:13px;font-weight:800;font-size:12px;color:#fffdf9;margin-bottom:22px}
.embedded-breadcrumb a{color:#fff;text-decoration:underline;text-underline-offset:4px}.embedded-eyebrow{font-size:12px;font-weight:900;letter-spacing:2px;color:#fff7;margin:0 0 11px}
#embeddedTitle{font-size:clamp(38px,4vw,70px);line-height:1.05;color:white;margin:0 0 12px;letter-spacing:-1px}
#embeddedSubtitle{font-size:16px;line-height:1.65;max-width:900px;color:#fffde4!important;margin:0}
.embedded-title-art{width:140px;height:140px;display:grid;place-items:center;font-size:85px;background:#ffffff1c;border:2px solid #ffffff66;border-radius:28px;transform:rotate(-8deg);box-shadow:0 18px 50px #0003;flex:none}
.embedded-shell{padding-top:26px}.embedded-toolbar{display:flex;align-items:center;gap:15px;background:var(--t-card,#fff);padding:16px;border:2px solid var(--t-primary,#0a6177);border-radius:20px;box-shadow:0 12px 28px #06152a19;flex-wrap:wrap}
.embedded-search{display:flex;align-items:center;gap:10px;min-width:260px;flex:1;min-height:57px;background:#fff;border:2px solid var(--t-primary,#0a6177);border-radius:12px;padding:3px 4px 3px 16px}
.embedded-search:focus-within{outline:3px solid var(--t-highlight,#ffc52b)}.embedded-mag{font-size:31px;font-weight:900;color:#126c87}
.embedded-search input{border:0;outline:none;background:transparent;min-width:0;flex:1;font-size:16px;color:#17293c;padding:10px 0}
.embedded-search button{border:0;border-radius:9px;padding:13px 20px;background:var(--t-highlight,#ffc43d);color:var(--t-on-highlight,#151515);font-size:15px;font-weight:900;white-space:nowrap;cursor:pointer}
.embedded-toolbar select{min-height:56px;max-width:240px;min-width:165px;border:2px solid var(--t-primary,#0a6177);border-radius:11px;padding:11px 12px;background:#fff;color:#153347;font-weight:800}
.embedded-vendor-top{display:inline-flex;align-items:center;justify-content:center;min-height:56px;padding:12px 20px;background:var(--t-dark,#12344b);color:#fff!important;border-radius:11px;font-weight:900;text-align:center}
.embedded-vendor-top:hover{filter:brightness(1.15)}.embedded-info-row{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap;margin:25px 0 15px}.embedded-info-row p{font-size:15px;font-weight:900;color:var(--t-dark,#153145);margin:0}.embedded-scope{font-size:12px;background:var(--t-highlight,#f5cc55);color:var(--t-on-highlight,#142236);border-radius:30px;padding:10px 15px;font-weight:900}
.embedded-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;align-items:stretch}
.embedded-grid .upgraded-product{height:100%}
.upgraded-product{display:flex;flex-direction:column;min-width:0;overflow:hidden;border-radius:20px;background:var(--t-card,#fff);border:2px solid var(--t-primary,#0d6077)}
.upgraded-product .product-image{padding:0;position:relative;height:235px;min-height:235px;overflow:hidden;background:#e9f0f2!important}
.product-photo-button{border:0;padding:0;background:transparent;width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:zoom-in;position:relative}
.product-photo-button img{display:block;object-fit:cover;width:100%;height:100%;transition:transform .2s ease}.product-photo-button:hover img{transform:scale(1.07)}.product-photo-button .img-fallback{font-size:70px;color:#164354}
.upgraded-product .badge{position:absolute;top:12px;left:12px;z-index:2;pointer-events:none}
.upgraded-product .product-body{padding:18px!important;display:flex;flex-direction:column;flex:1;gap:8px;color:var(--t-card-ink,#123344)}
.upgraded-product .product-strap{letter-spacing:.2px;text-transform:uppercase;font-size:10px!important;font-weight:900;min-height:12px}
.upgraded-product h3{font-size:17px!important;line-height:1.33;min-height:46px;margin:0!important;color:var(--t-card-ink,#152e40)}
.upgraded-product h3 a,.product-name-button{font:inherit;color:inherit;background:transparent;border:0;padding:0;text-align:left;cursor:pointer}
.upgraded-product h3 a:hover,.product-name-button:hover{text-decoration:underline}
.upgraded-product .product-body p{font-size:12px;line-height:1.45;min-height:49px;max-height:50px;overflow:hidden;margin:0}
.upgraded-product .price{font-size:17px!important;margin:5px 0!important;font-weight:950;color:var(--t-card-ink,#203246)!important}
.upgraded-product .price del{display:block;color:#6f757a!important;font-size:12px}
.upgraded-product .product-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:auto}
.upgraded-product .product-actions button{min-height:41px;padding:8px 6px;font-size:11px;border-radius:9px;white-space:normal;font-weight:900;line-height:1.3}
.upgraded-product .product-actions .product-details-btn{grid-column:1 / -1;background:var(--t-highlight,#f2bd3e);color:var(--t-on-highlight,#17263c);border:2px solid var(--t-primary,#0a566a);cursor:pointer}
.upgraded-product .product-actions .add-buy{background:#ffcd43!important;color:#1a2536!important;border:2px solid #a96c00!important}
.upgraded-product .product-actions .add-order{background:#167fe1!important;color:white!important;border:2px solid #0752a6!important}
.upgraded-product .product-actions .add-order:only-of-type{grid-column:1 / -1}
.upgraded-product .go-seller{font-size:11px;line-height:1.4;color:var(--t-card-ink,#1c4055);font-weight:900;margin-top:5px;text-decoration:underline;text-underline-offset:3px}
.embedded-empty{background:var(--t-card,#fff);border:2px dashed var(--t-primary,#087d8e);text-align:center;padding:40px;border-radius:18px;margin-top:18px}.embedded-empty b{font-size:22px}.embedded-empty p{margin:15px 0}.embedded-bottom{display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;margin:25px 0}.embedded-bottom .btn{min-height:45px}.embedded-whatsapp{background:#128454!important;color:white!important}.embedded-note{padding:14px 19px;color:var(--t-dark,#1c4153);background:var(--t-panel,#dcecef);border-radius:12px;font-size:12px;line-height:1.7}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}

/* Mini carrusel de fotos inmediatamente después del video; cada tarjeta abre su categoría */
.mini-offers{padding:25px 0 30px;background:var(--t-panel,#e9f1f0);border-top:7px solid var(--t-highlight,#f5b942);border-bottom:3px solid var(--t-primary,#0a5971)}
.mini-offers-header{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:18px}
.mini-overline{font-size:11px;letter-spacing:2px;font-weight:900;color:var(--t-dark,#17394b)}.mini-offers h2{font-size:clamp(22px,2.4vw,37px);font-weight:950;letter-spacing:-.7px;color:var(--t-dark,#17394b);margin:3px 0}.mini-offers h2 small{font-weight:600;font-size:clamp(12px,1.1vw,17px);letter-spacing:0}.mini-offers p{font-size:12px;margin:6px 0;color:var(--t-panel-ink,#32485a)}
.mini-offers-controls{display:flex;gap:7px}.mini-offers-controls button{border:2px solid var(--t-primary,#0b7182);background:var(--t-highlight,#ffc43d);border-radius:10px;cursor:pointer;color:var(--t-on-highlight,#17252b);font-size:18px;font-weight:900;padding:8px 15px}
.mini-offer-track{display:flex;gap:14px;overflow-x:auto;scroll-behavior:smooth;scroll-snap-type:x mandatory;scrollbar-width:thin;padding:2px 2px 16px}
.mini-offer-item{flex:0 0 clamp(245px,24%,350px);scroll-snap-align:start;display:grid;grid-template-columns:105px minmax(0,1fr) 12px;gap:12px;align-items:center;padding:10px;border:2px solid var(--t-primary,#0a536b);border-radius:13px;background:var(--t-card,#fff)!important;color:var(--t-card-ink,#1b3348)!important;min-height:128px;box-shadow:0 5px 15px #0d243e1e;transition:transform .2s}
.mini-offer-item:hover{transform:translateY(-3px);border-color:var(--t-highlight,#ffca55)}.mini-offer-picture{width:105px;height:100px;background:#e9f2ed;border-radius:9px;overflow:hidden;display:grid;place-items:center}
.mini-offer-picture img{height:100%;width:100%;object-fit:cover}.mini-offer-picture .img-fallback{font-size:54px}.mini-offer-body{display:flex;flex-direction:column;gap:5px;overflow:hidden}.mini-cat-label{text-transform:uppercase;font-size:9px;font-weight:900;letter-spacing:.5px}.mini-offer-body b{font-size:13px;line-height:1.33;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.mini-offer-body small{font-size:12px;font-weight:900;color:var(--t-card-ink,#1f4057)}.mini-open{font-size:20px;font-weight:900}

/* Vista de producto: modal ancho, foto grande, acciones con los colores propios del carrito */
#modalRoot .modal.wide:has(.detail-layout){width:min(1060px,95vw);max-width:1060px;max-height:92vh;overflow-y:auto}
.detail-layout{display:grid;grid-template-columns:minmax(240px,48%) minmax(240px,52%);gap:23px;align-items:start}
.detail-image{width:100%;height:clamp(280px,45vw,490px);position:relative;display:flex;align-items:center;justify-content:center;background:#ecf1ee;border-radius:16px;overflow:hidden;border:3px solid var(--t-primary,#0d6572)}
.detail-image img{max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain}.detail-image .img-fallback{font-size:120px}.detail-offerflag{position:absolute;top:14px;left:14px;background:#fcca3b;color:#172532;padding:8px 10px;font-weight:950;font-size:10px;border-radius:5px}
.detail-info{color:var(--t-card-ink,#162d3a);padding:0 4px}.detail-meta{text-transform:uppercase;font-size:11px;font-weight:900;letter-spacing:.8px;opacity:.8}.detail-info h3{font-size:clamp(23px,2.4vw,35px);line-height:1.1;margin:12px 0 18px;color:inherit!important}.detail-description{font-size:15px;line-height:1.7;color:inherit!important;white-space:pre-wrap}
.detail-price{display:flex;align-items:center;gap:13px;flex-wrap:wrap;border-top:1px solid #768a9860;padding:20px 0 9px;margin-top:18px}.detail-price strong{font-size:clamp(24px,2vw,33px)}.detail-price del{font-size:14px;opacity:.6}.detail-discount{background:#9a2020;color:#fff;border-radius:6px;padding:4px 10px;font-weight:900}
.detail-warning{font-size:12px;color:inherit;opacity:.8;margin:0 0 17px}.detail-actions{display:flex;flex-wrap:wrap;gap:10px}.detail-buy{background:#ffc52e!important;color:#222!important;border:2px solid #9e7100!important;font-weight:900!important}.detail-order{background:#147dd4!important;color:white!important;border:2px solid #0b529c!important;font-weight:900!important}.detail-shoplink{display:block;background:var(--t-panel,#e1edf0);color:var(--t-panel-ink,#19445c);font-weight:900;text-align:center;border-radius:10px;padding:13px;margin:16px 0 8px}.detail-small{font-size:11px;line-height:1.5;opacity:.85;margin-top:10px}
.offer-photo.offer-clickable{display:flex!important;align-items:center;justify-content:center}.offer-photo img{width:100%;height:100%;object-fit:contain}.offer-go-category{display:inline-flex;align-items:center;justify-content:center}

@media(max-width:1200px){.embedded-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.embedded-toolbar{align-items:stretch}.embedded-toolbar select{max-width:none}.mini-offer-item{flex-basis:310px}}
@media(max-width:820px){.embedded-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.embedded-banner-inner{min-height:210px;padding:27px 0}.embedded-title-art{width:95px;height:95px;font-size:58px}.embedded-toolbar select{flex:1}.embedded-vendor-top{flex:1}.mini-offer-item{flex-basis:275px}.detail-layout{grid-template-columns:1fr}.detail-image{height:340px}.detail-info{padding:8px}}
@media(max-width:550px){.embedded-grid{grid-template-columns:1fr}.embedded-banner-inner{padding:24px 0}.embedded-title-art{display:none}.embedded-toolbar{padding:9px}.embedded-search{min-width:100%;order:0}.embedded-toolbar select{min-width:100%}.embedded-vendor-top{width:100%}.embedded-search input{font-size:13px}.embedded-search button{padding:12px 10px}.embedded-info-row{margin:16px 0}.upgraded-product .product-image{height:245px}.upgraded-product h3{min-height:0}.upgraded-product .product-body p{min-height:0}.mini-offers-header{align-items:center}.mini-offers h2 small{display:block}.mini-offer-item{flex-basis:270px}.mini-offers-controls{flex-direction:column}.detail-image{height:300px}.detail-actions .btn{width:100%}}
@media(prefers-reduced-motion:reduce){.mini-offer-track{scroll-behavior:auto}.product-photo-button img{transition:none}.mini-offer-item{transition:none}}

/* Capas de interfaz por encima de la cabecera fija. */
.mega-scrim{z-index:110!important}.category-mega{z-index:111!important}.overlay{z-index:180!important}#homeView>.perks{margin-top:16px}
#categoryView .embedded-banner+div{scroll-margin-top:100px}

/* Título principal de cada subpágina centrado, como solicitó el diseño del Shopping. */
.embedded-title-block{flex:1;text-align:center}.embedded-breadcrumb{justify-content:center}#embeddedSubtitle{margin-inline:auto}.embedded-banner-inner{position:relative}.embedded-title-art{position:absolute;right:0;top:50%;transform:translateY(-50%) rotate(-8deg);opacity:.35;pointer-events:none}
.feature-card.tech{background:radial-gradient(circle at right,#278ca955,transparent 44%),linear-gradient(130deg,#15354b,#14647e)!important}

/* Merka2 v1.5: cinta de transporte infinita bajo el video. La ventana oculta el borde. */
.mini-offers-window{overflow:hidden;position:relative;width:100%;border-radius:13px;mask-image:linear-gradient(to right,transparent,black 2%,black 98%,transparent)}
.mini-offer-track{overflow:visible!important;scroll-snap-type:none!important;scroll-behavior:auto!important;scrollbar-width:none!important;padding:2px 0 13px!important;will-change:transform;touch-action:pan-y;gap:14px!important}
.mini-offer-track::-webkit-scrollbar{display:none}
.mini-offer-item{scroll-snap-align:none!important;transition:background .2s,border-color .2s!important}
@media(prefers-reduced-motion:reduce){.mini-offer-track{transition:none!important;will-change:auto}}
