/* Release 418: Ultra-Performance Canvas 2D Stage & Mobile Ecommerce Architecture */
/* Based on GUIA-RECETAS-RENDIMIENTO-WEB.md (Bloque 1 & Bloque 4) */

body.svp-native-storefront:not(.home):is(.single-product,.post-type-archive-product,.tax-product_cat,.tax-product_brand){background:#0e0b16!important;isolation:isolate}
body.svp-native-storefront:not(.home):is(.single-product,.post-type-archive-product,.tax-product_cat,.tax-product_brand) #content.site-content{position:relative;background:transparent!important}

/* Bloque 1: Contenedor de escena fija aislado con hardware compositing */
.svp-retro-scene{position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none;background:radial-gradient(ellipse at 15% 20%,#46206170,transparent 55%),radial-gradient(ellipse at 90% 60%,#7c20523d,transparent 50%),#080314;contain:strict;transform:translateZ(0)}
#svp-stage-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none;contain:strict}
.svp-retro-scene__glow{position:absolute;top:10%;left:15%;right:15%;height:45%;background:radial-gradient(ellipse at 50% 50%,#8b35d522,transparent 65%);pointer-events:none}
.svp-retro-scene__mask{position:absolute;inset:0;background:radial-gradient(circle at 50% 50%,transparent 55%,#080314 95%);pointer-events:none;z-index:2}
.svp-retro-scene__pixels{display:none!important}
.svp-scene-motion{display:none!important}

/* Regla obligatoria: aislamiento del contenido respecto al fondo */
#page,.site-shell,.site-content{isolation:isolate}

/* Bloque 4: Receta Maestra para Tiendas Ecommerce */
/* 1. Eliminación de los 300 ms de retardo táctil */
a,button,summary,.button,.single_add_to_cart_button,.add_to_cart_button,.woocommerce a.button,.ast-button,.svp-button{touch-action:manipulation;-webkit-tap-highlight-color:transparent}

/* 2. Contención de tarjetas de catálogo y aislamiento de imágenes */
.product-card,body.svp-native-storefront #page ul.products li.product,.woocommerce ul.products li.product{contain:layout paint}
.product-image,body.svp-native-storefront #page ul.products li.product img,.woocommerce ul.products li.product img{isolation:isolate}

/* 3. Contención fuera de pantalla (content-visibility: auto) */
.related.products,.up-sells.products,.site-footer{content-visibility:auto;contain-intrinsic-size:1px 450px}

/* 4. Sliders táctiles sin rebotes de historial */
.product-carousel,.woocommerce-product-gallery,.svp-hero{overscroll-behavior-x:contain}

/* 5. Suavizado de tipografías sobre fondos oscuros (OLED / Dark Mode) */
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}

/* Release 417: Eliminación de 35 backdrop-filters y animaciones infinitas */
.svp-native-wishlist-button,
.svp-mwi-native-wishlist-button,
.svp-native-quick-view,
.ast-quick-view-text,
.svp-archive-best a.svp-archive-best__card,
.ast-shop-product-out-of-stock,
.ast-mobile-popup-overlay,
.astra-mobile-cart-overlay,
.svp-popup-overlay,
.pswp__bg,
.ast-search-box.full-screen,
.svp-mwi-modal__backdrop,
.svp-contact__panel,
.cmplz-soft-cookiewall {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Superficies alfa de alto contraste sin coste de sombreador */
button.svp-mwi-native-wishlist-button,
button.svp-native-wishlist-button {
    background: rgba(255, 255, 255, 0.94) !important;
    border-color: rgba(215, 205, 230, 0.85) !important;
}
.svp-archive-best a.svp-archive-best__card {
    background: #2a1638 !important;
    border: 1px solid #4a2d60 !important;
}
.ast-shop-product-out-of-stock {
    background: rgba(30, 20, 40, 0.88) !important;
}
.ast-quick-view-text.svp-native-quick-view,
.svp-native-quick-view {
    background: rgba(255, 255, 255, 0.94) !important;
    color: #211a2b !important;
}

/* Eliminación de animaciones en bucle continuo */
.copiar-cupon-woo {
    animation: none !important;
}
.svp-skeleton-shimmer,
.svp-skeleton-pending {
    animation: none !important;
}

body.svp-scene-paused #svp-stage-canvas,body.svp-scene-hidden #svp-stage-canvas{display:none!important}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page #secondary{background:transparent!important}
body.svp-native-storefront:not(.home) #secondary :is(.widget,.svp-archive-sidebar-fill__section){background:#fcfbfe;border-radius:14px;padding:16px}
body.svp-native-storefront:not(.home) :is(.woocommerce-result-count,.woocommerce-breadcrumb,.woocommerce-breadcrumb a){color:#e3d6ed}
body.svp-native-storefront.single-product .ast-product-img-summary-wrapper{padding:24px}
.svp-archive-best .svp-carousel__dots{display:none!important}

/* Home: dedicated retro chapter */
body.svp-native-storefront.home .svp-home-featured{position:relative;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 90% 5%,#71277f80,transparent 55%),linear-gradient(125deg,#100d19,#2a173b 75%,#421d4d)!important;border:1px solid #633e7d!important;padding:36px 28px!important;box-shadow:0 18px 42px #28123817}
body.svp-native-storefront.home .svp-home-featured::before{content:"";position:absolute;inset:0;z-index:-1;background:url('retro-pixels-388.svg') right top/auto 100% no-repeat;opacity:.38;pointer-events:none}
body.svp-native-storefront.home .svp-home-featured::after{content:"";position:absolute;inset:auto 0 0 0;width:100%;height:60%;z-index:-1;pointer-events:none;background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201600%20500%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22g%22%20gradientUnits%3D%22userSpaceOnUse%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%22500%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23bd75ff%22%20stop-opacity%3D%220%22%2F%3E%3Cstop%20offset%3D%220.2%22%20stop-color%3D%22%23bd75ff%22%20stop-opacity%3D%220.08%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23bd75ff%22%20stop-opacity%3D%220.28%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cpath%20d%3D%22M800%200L-1600%20500M800%200L-1400%20500M800%200L-1200%20500M800%200L-1000%20500M800%200L-800%20500M800%200L-600%20500M800%200L-400%20500M800%200L-200%20500M800%200L0%20500M800%200L200%20500M800%200L400%20500M800%200L600%20500M800%200L800%20500M800%200L1000%20500M800%200L1200%20500M800%200L1400%20500M800%200L1600%20500M800%200L1800%20500M800%200L2000%20500M800%200L2200%20500M800%200L2400%20500M800%200L2600%20500M800%200L2800%20500M800%200L3000%20500M800%200L3200%20500M0%208H1600M0%2022H1600M0%2044H1600M0%2080H1600M0%20135H1600M0%20215H1600M0%20330H1600M0%20480H1600%22%20fill%3D%22none%22%20stroke%3D%22url%28%23g%29%22%20stroke-width%3D%221.2%22%20vector-effect%3D%22non-scaling-stroke%22%2F%3E%3C%2Fsvg%3E");background-size:100% 100%;background-position:center bottom;background-repeat:no-repeat;transform:none!important;mask-image:none!important;-webkit-mask-image:none!important;animation:none!important}
body.svp-native-storefront.home .svp-home-featured>:is(h2,p){color:#f3eaf9!important}
body.svp-native-storefront.home .svp-home-featured>p:first-child{color:#d5a4ff!important;letter-spacing:.12em}
body.svp-native-storefront.home .svp-home-featured .svp-mini-card{background:#fff!important;border:1px solid #ffffff35;box-shadow:0 8px 24px #0003}
@media(max-width:767px){body.svp-native-storefront.single-product .ast-product-img-summary-wrapper{padding:14px}body.svp-native-storefront.home .svp-home-featured{padding:26px 16px!important}.svp-scene-motion{display:none!important}}
@media(prefers-reduced-motion:reduce){.svp-retro-scene *,.svp-home-featured::after{animation:none!important;transition:none!important;transform:none!important}}

/* Contrast acceptance on the dark canvas */
body.svp-native-storefront:not(.home) .woocommerce-ordering select{background-color:#fcfbfe!important;color:#211a2b!important;border-color:#d8c6e8!important}
body.svp-native-storefront.single-product .svp-review-marquee__header :is(strong,a){color:#f4eafa!important}
body.svp-native-storefront.single-product .svp-review-marquee__header .svp-kicker{color:#d4a5ff!important}
body.svp-native-storefront.single-product :is(.related,.up-sells)>h2{color:#f4eafa!important}
body.svp-native-storefront.single-product #content>.ast-container>.woocommerce-breadcrumb{color:#e3d6ed!important}
@media(max-width:767px){body.svp-native-storefront.home #page .svp-hero button.svp-hero__arrow{top:auto!important;bottom:4px!important;transform:none!important;width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important}}

/* Light product canvas, dark catalogue with explicit surface/foreground pairs */
html body.svp-native-storefront.single-product:not(.home){background:#f8f5fc!important}
body.single-product .svp-retro-scene{background:radial-gradient(ellipse at 10% 20%,#eadcf580,transparent 55%),radial-gradient(ellipse at 90% 65%,#f3dfed75,transparent 50%),#f8f5fc}
body.single-product .svp-retro-scene__glow{background:radial-gradient(ellipse at 35% 45%,#c091e526,transparent 45%)}
body.single-product #svp-stage-canvas{display:none!important}
html body.single-product #page :is(.svp-review-marquee__header strong,.svp-review-marquee__header a,.related>h2,.up-sells>h2,.woocommerce-breadcrumb,.woocommerce-breadcrumb a){color:#33223f!important}
html body.single-product #page .svp-review-marquee__header .svp-kicker{color:#69329b!important}

/* Catalogue: dark surrounding scene, pale panels, ink text inside each panel */
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand){--svp-archive-ink:#261b32;--svp-archive-muted:#62556d;--svp-archive-line:#dfd2eb;--svp-archive-panel:#fcfaff}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) .ast-woocommerce-container{color:#f0e7f7}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page :is(.term-description-bottom,.woocommerce-no-products-found,.woocommerce-info){background:#fcfaff;color:#261b32;border:1px solid #dfd2eb;border-radius:16px;padding:26px;margin-top:28px}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page .term-description-bottom :is(h2,h3,p,li,strong){color:#261b32!important}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page .term-description-bottom a{color:#643198!important;text-decoration:underline;text-underline-offset:3px}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #secondary :is(.widget,.svp-archive-sidebar-fill__section){background:#fcfaff;border:1px solid #dfd2eb;box-shadow:0 8px 24px #00000012}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #secondary :is(h2,h3,p,label,.wc-block-product-filter-chips__label){color:#261b32!important}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #secondary :is(.wc-block-product-filter-rating .star-rating,.wc-block-product-filter-rating .star-rating span){color:var(--svp-stars)!important}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page .svp-category-help{background:#f7f1fd;border:1px solid #dbcaea;color:#33203f;box-shadow:0 4px 16px #0000001a}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page .svp-category-help :is(summary,p){color:#33203f!important}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page ul.products li.product{background:#fff;color:#261b32;border:1px solid #e1d5eb;box-shadow:0 8px 24px #0002;transition:border-color .18s,box-shadow .18s}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page ul.products li.product:hover{border-color:#ac7cd3;box-shadow:0 10px 28px #0003}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page ul.products li.product .astra-shop-summary-wrap{background:#fff;color:#261b32}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page ul.products li.product :is(.woocommerce-loop-product__title,.star-rating .svp-rating-value){color:#261b32!important}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page ul.products li.product .price{color:#482064!important;font-weight:750;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page ul.products li.product .price del{color:#716579!important;font-weight:400;opacity:1}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page ul.products li.product .price ins{color:#482064!important;background:transparent;font-weight:750}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page ul.products li.product .astra-shop-summary-wrap>a.button{background:linear-gradient(115deg,#24152e,#512575 75%,#6d28d9)!important;color:#fff!important;border:1px solid #6d3993!important;font-weight:650}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page ul.products li.product .astra-shop-summary-wrap>a.button:hover{background:#50216e!important;border-color:#a36bd0!important}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page :is(.woocommerce-pagination a.page-numbers,.woocommerce-pagination span.page-numbers){color:#eadef4!important;background:#2c1b3b!important;border:1px solid #805099!important;border-radius:8px}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page .woocommerce-pagination :is(.current,a:hover){background:#e9d8f8!important;color:#3f1c58!important;border-color:#c6a2df!important}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page .svp-products-view-button[aria-pressed=false]{background:#fcfaff!important;color:#4d2868!important;border-color:#d1b9e3!important}
@media(max-width:767px){body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page .term-description-bottom{padding:20px 16px}}
@media(prefers-reduced-motion:reduce){body.svp-native-storefront #page ul.products li.product{transition:none!important}}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #page .svp-products-view-button[aria-pressed=true]{background:linear-gradient(115deg,#24152e,#6d28d9)!important;color:#fff!important;border-color:#c392ea!important;box-shadow:0 0 0 1px #c392ea55}
body.svp-native-storefront:not(.home):is(.post-type-archive-product,.tax-product_cat,.tax-product_brand) #secondary .wc-block-product-filter-checkbox-list__stars-svg{color:var(--svp-stars)!important}
/* Release 419: SVG Symbol Spriting for Reviews & Q&A (>200 KB HTML reduction) */
.cr-voting-svg-sprite {
    width: 15px !important;
    height: 18px !important;
    display: inline-block;
    vertical-align: middle;
}
.cr-voting-cont-uni span.cr-voting-upvote svg.cr-voting-svg-sprite { --cr-vote-int: none; --cr-vote-ext: #18B394; }
.cr-voting-cont-uni span.cr-voting-upvote.cr-voting-active svg.cr-voting-svg-sprite { --cr-vote-int: #00A382; --cr-vote-ext: #00A382; }
.cr-voting-cont-uni span.cr-voting-upvote:hover svg.cr-voting-svg-sprite { --cr-vote-ext: #202020; }

.cr-voting-cont-uni span.cr-voting-downvote svg.cr-voting-svg-sprite { --cr-votedn-int: none; --cr-votedn-ext: #CE2B37; }
.cr-voting-cont-uni span.cr-voting-downvote.cr-voting-active svg.cr-voting-svg-sprite { --cr-votedn-int: #CA2430; --cr-votedn-ext: #CA2430; }
.cr-voting-cont-uni span.cr-voting-downvote:hover svg.cr-voting-svg-sprite { --cr-votedn-ext: #202020; }

.crstar-rating-svg svg.cr-rating-icon-bg,
.crstar-rating-svg svg.cr-rating-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
}
.cr-qna-list-q-icon {
    width: 22px;
    height: 22px;
}
/* 420: interactive product sections must retain their full content and usable controls. */
body.single-product .woocommerce-tabs .svp-section-heading{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere}
body.single-product .woocommerce-tabs .woocommerce-product-attributes{width:100%;max-width:100%;table-layout:fixed}
body.single-product .woocommerce-tabs .woocommerce-product-attributes :is(th,td){overflow-wrap:anywhere;vertical-align:top}
body.single-product .cr-qna-list-q-b-r{display:flex!important;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px}
body.single-product .cr-qna-list-q-b-r .cr-qna-ans-button{height:auto!important;min-height:40px;line-height:1.3!important;white-space:normal!important;padding:8px 12px!important;margin:0!important;max-width:100%;flex:0 1 auto}
body.single-product .cr-qna-list-q-b-r .cr-qna-q-voting{flex:0 0 auto}
@media(max-width:767px){body.single-product .woocommerce-tabs .woocommerce-product-attributes th{width:38%;padding:10px}body.single-product .woocommerce-tabs .woocommerce-product-attributes td{padding:10px}}
body.single-product :is(.woocommerce-tabs,#reviews,#tab-cr_qna,.reviews-section){content-visibility:visible!important;contain-intrinsic-size:none!important}

/* 423: motion control for the active Canvas background; static under reduced motion. */
body.svp-retro-archive button.svp-scene-motion{position:fixed;left:16px;bottom:88px;z-index:18;display:flex!important;align-items:center;justify-content:center;flex-direction:column;gap:3px;padding:5px;font:600 9px/1.15 system-ui,sans-serif;color:#ecddfa;background:#241831f2;border:1px solid #80569a;border-radius:12px;box-shadow:0 4px 16px #0004}
body.svp-retro-archive button.svp-scene-motion:focus-visible{outline:2px solid #c88cf4;outline-offset:3px}
body.svp-retro-archive button.svp-scene-motion[hidden]{display:none!important}
@media(max-width:767px){body.svp-retro-archive button.svp-scene-motion .svp-scene-motion__label{display:none}}
@media(prefers-reduced-motion:reduce){body.svp-retro-archive button.svp-scene-motion{display:none!important}}
