﻿/*
Plugin Name: ALSINA - Mobile Producto V3
Description: Ajustes exclusivos de ficha de producto mobile.
Version: 3.0
*/
@media (max-width:767px){
body.single-product .alsina-product-layout,
body.single-product .alsina-product-left,
body.single-product .alsina-product-right,
body.single-product .alsina-galeria-externa,
body.single-product .alsina-stage-host,
body.single-product .alsina-main-stage{
 width:100%!important;max-width:100%!important;min-width:0!important;
 box-sizing:border-box!important;
}
body.single-product .alsina-product-layout{
 display:block!important;padding-left:12px!important;padding-right:12px!important;
}
body.single-product .alsina-product-left,
body.single-product .alsina-product-right{
 flex:none!important;flex-basis:auto!important;margin-left:0!important;margin-right:0!important;
}
body.single-product .alsina-galeria-externa{
 display:flex!important;flex-direction:column!important;
}
body.single-product .alsina-stage-host{order:1!important;}
body.single-product .alsina-thumbs{
 order:2!important;width:100%!important;max-width:100%!important;min-width:0!important;
 margin:6px 0 8px!important;padding:0!important;gap:6px!important;
}
body.single-product .alsina-main-stage{
 height:350px!important;min-height:350px!important;max-height:350px!important;
 display:flex!important;align-items:center!important;justify-content:center!important;
 margin:0!important;padding:0!important;
}
body.single-product .alsina-main-stage img{
 display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:350px!important;
 object-fit:contain!important;object-position:center!important;margin:0!important;
}
body.single-product .summary{width:100%!important;max-width:100%!important;margin:0!important;padding:0!important}
body.single-product .product_title{font-size:26px!important;line-height:1.08!important;margin:8px 0 14px!important}
body.single-product .variations{width:100%!important;max-width:100%!important;margin:10px 0 12px!important}
body.single-product .variations tbody{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;width:100%!important}
body.single-product .variations tr{display:block!important;width:100%!important;min-width:0!important}
body.single-product .variations th,body.single-product .variations td{display:block!important;width:100%!important;padding:0!important}
body.single-product .variations select{width:100%!important;max-width:100%!important;height:44px!important;min-width:0!important}
body.single-product form.cart{width:100%!important;max-width:100%!important}
body.single-product .woocommerce-variation-add-to-cart{width:100%!important;max-width:100%!important}
}

/* V3.1 - cierre geometria mobile producto */
@media (max-width:767px){
html body.single-product .alsina-product-layout{
 width:100%!important;max-width:100%!important;min-width:0!important;
}
html body.single-product .alsina-product-left,
html body.single-product .alsina-product-right{
 width:100%!important;max-width:100%!important;min-width:0!important;
}
html body.single-product .alsina-stage-host,
html body.single-product .alsina-main-stage{
 height:350px!important;min-height:350px!important;max-height:350px!important;
}
html body.single-product .alsina-k6-panel,
html body.single-product form.variations_form.cart,
html body.single-product .single_variation_wrap,
html body.single-product .woocommerce-variation-add-to-cart,
html body.single-product table.variations{
 width:100%!important;max-width:100%!important;min-width:0!important;
 box-sizing:border-box!important;
}
html body.single-product form.variations_form.cart{
 margin-left:0!important;margin-right:0!important;
}
html body.single-product .single_add_to_cart_button{
 max-width:100%!important;box-sizing:border-box!important;
}
}

/* V3.2 - formulario compra contenido al ancho real */
@media (max-width:767px){
html body.single-product .alsina-k6-panel > *,
html body.single-product form.variations_form.cart > *,
html body.single-product .single_variation_wrap,
html body.single-product .single_variation_wrap > *,
html body.single-product .woocommerce-variation-add-to-cart,
html body.single-product table.variations{
 width:100%!important;max-width:100%!important;min-width:0!important;
 box-sizing:border-box!important;
}
html body.single-product .woocommerce-variation-add-to-cart{
 display:flex!important;flex-wrap:wrap!important;gap:8px!important;
 align-items:center!important;
}
html body.single-product .woocommerce-variation-add-to-cart .quantity{
 flex:0 0 auto!important;margin:0!important;
}
html body.single-product .single_add_to_cart_button{
 flex:1 1 190px!important;width:auto!important;min-width:0!important;
 max-width:100%!important;margin:0!important;
}
}

/* V3.3 - eliminar desplazamiento lateral real en ficha mobile */
@media (max-width:767px){
html,body{max-width:100%!important;overflow-x:clip!important}
body.single-product .alsina-product-layout,
body.single-product .alsina-product-left,
body.single-product .alsina-product-right,
body.single-product .alsina-k6-panel,
body.single-product .alsina-k6-ship,
body.single-product .alsina-k6-ship-row{
 width:100%!important;max-width:100%!important;min-width:0!important;
 box-sizing:border-box!important;
}
body.single-product .alsina-k6-ship-row{
 display:flex!important;flex-wrap:wrap!important;gap:8px!important;
}
body.single-product .alsina-k6-ship-row input,
body.single-product .alsina-k6-ship-row select{
 flex:1 1 150px!important;min-width:0!important;max-width:100%!important;
 box-sizing:border-box!important;
}
body.single-product .alsina-k6-ship-row .alsina-k6-calc{
 flex:1 1 120px!important;width:auto!important;max-width:100%!important;
 margin:0!important;box-sizing:border-box!important;
}
body.single-product .alsina-marquee-wrap,
body.single-product .alsina-marquee-viewport{
 width:100%!important;max-width:100%!important;overflow:hidden!important;
}
body.single-product .alsina-nav-simple,
body.single-product .alsina-nav-producto,
body.single-product .alsina-nav-categorias-wrap{
 width:100%!important;max-width:100%!important;overflow-x:auto!important;
 overflow-y:hidden!important;
}
}

/* V3.4 - alinear hijos Woo/K6 al panel mobile real (318px) */
@media (max-width:767px){
html body.single-product .alsina-product-right .alsina-k6-panel form.variations_form.cart table.variations,
html body.single-product .alsina-product-right .alsina-k6-panel form.variations_form.cart table.variations tbody,
html body.single-product .alsina-product-right .alsina-k6-panel .alsina-k6-ship,
html body.single-product .alsina-product-right .alsina-k6-panel .alsina-k6-ship-row{
 width:100%!important;
 max-width:100%!important;
 min-width:0!important;
 box-sizing:border-box!important;
}
html body.single-product .alsina-product-right .alsina-k6-panel form.variations_form.cart .single_variation_wrap,
html body.single-product .alsina-product-right .alsina-k6-panel form.variations_form.cart .woocommerce-variation-add-to-cart{
 width:100%!important;
 max-width:100%!important;
 min-width:0!important;
 box-sizing:border-box!important;
}
html body.single-product .alsina-product-right .alsina-k6-panel form.variations_form.cart .single_add_to_cart_button{
 max-width:calc(100% - 115px)!important;
 box-sizing:border-box!important;
}
}

/* V3.5 - box model real: elimina los 17px extra */
@media (max-width:767px){
html body.single-product form.variations_form.cart table.variations,
html body.single-product form.variations_form.cart table.variations tbody,
html body.single-product form.variations_form.cart table.variations tr,
html body.single-product form.variations_form.cart table.variations th,
html body.single-product form.variations_form.cart table.variations td,
html body.single-product form.variations_form.cart table.variations select,
html body.single-product .alsina-k6-panel .alsina-k6-ship,
html body.single-product .alsina-k6-panel .alsina-k6-ship-row,
html body.single-product .alsina-k6-panel .alsina-k6-cp,
html body.single-product .alsina-k6-panel .alsina-k6-calc{
 box-sizing:border-box!important;
}
html body.single-product form.variations_form.cart table.variations,
html body.single-product form.variations_form.cart table.variations tbody,
html body.single-product .alsina-k6-panel .alsina-k6-ship,
html body.single-product .alsina-k6-panel .alsina-k6-ship-row{
 width:100%!important;max-width:100%!important;min-width:0!important;
 padding-left:0!important;padding-right:0!important;
}
html body.single-product .alsina-k6-panel .alsina-k6-ship-row{
 grid-template-columns:minmax(0,1fr) minmax(105px,42%)!important;
}
html body.single-product .alsina-k6-panel .alsina-k6-cp,
html body.single-product .alsina-k6-panel .alsina-k6-calc{
 width:100%!important;max-width:100%!important;min-width:0!important;
}
}


/* V3.6b - centrado visual mobile: margen lateral real 16px */
@media (max-width:767px){
html body.single-product main{
 padding-left:16px!important;
 padding-right:16px!important;
}
html body.single-product .alsina-product-layout{
 width:100%!important;
 max-width:100%!important;
 padding-left:0!important;
 padding-right:0!important;
 margin-left:0!important;
 margin-right:0!important;
 box-sizing:border-box!important;
}
html body.single-product .alsina-product-left,
html body.single-product .alsina-product-right{
 width:100%!important;
 max-width:100%!important;
 margin-left:0!important;
 margin-right:0!important;
}
}

/* V3.7 - anclaje final panel compra mobile al viewport */
@media (max-width:767px){
html body.single-product .alsina-product-right,
html body.single-product .alsina-product-right .alsina-k6-panel,
html body.single-product .alsina-product-right .alsina-k6-panel form.variations_form.cart,
html body.single-product .alsina-product-right .alsina-k6-panel form.variations_form.cart > *,
html body.single-product .alsina-product-right .alsina-k6-panel .single_variation_wrap,
html body.single-product .alsina-product-right .alsina-k6-panel .woocommerce-variation-add-to-cart,
html body.single-product .alsina-product-right .alsina-k6-panel .alsina-k6-ship,
html body.single-product .alsina-product-right .alsina-k6-panel .alsina-k6-benefits{
 width:calc(100vw - 32px)!important;
 max-width:calc(100vw - 32px)!important;
 min-width:0!important;
 box-sizing:border-box!important;
}
html body.single-product .alsina-product-right .alsina-k6-panel table.variations,
html body.single-product .alsina-product-right .alsina-k6-panel table.variations tbody,
html body.single-product .alsina-product-right .alsina-k6-panel .alsina-k6-ship-row{
 width:100%!important;max-width:100%!important;min-width:0!important;
 box-sizing:border-box!important;
}
}

/* V3.8 - neutraliza flex-basis desktop de columnas WP en mobile */
@media (max-width:767px){
html body.single-product .alsina-product-layout{
 display:block!important;
 width:100%!important;max-width:100%!important;min-width:0!important;
}
html body.single-product .alsina-product-layout > .alsina-product-left,
html body.single-product .alsina-product-layout > .alsina-product-right{
 display:block!important;
 flex:none!important;
 flex-basis:auto!important;
 flex-grow:0!important;
 flex-shrink:1!important;
 width:100%!important;
 max-width:100%!important;
 min-width:0!important;
 box-sizing:border-box!important;
}
html body.single-product .alsina-product-right > .alsina-k6-panel{
 width:100%!important;max-width:100%!important;min-width:0!important;
 box-sizing:border-box!important;
}
html body.single-product .alsina-product-right form.variations_form.cart{
 width:100%!important;max-width:100%!important;min-width:0!important;
}
}
