/* Glowtto · Refino puntual de tienda: bolsa, scroll y radios.
   Solo presentación. Los precios/cantidades siguen viniendo de StoreModel y Supabase. */
:root{
 --glow-radius-sm:8px;
 --glow-radius-md:11px;
 --glow-radius-lg:16px;
 --glow-sticky-offset:96px;
}
html{scroll-behavior:smooth}
#shopView section[id],#catalogStart,#productForm,#perfumeDiscovery,#glowShopCategories,
#shopView .ys-discover-head,#shopView #productsGrid{scroll-margin-top:var(--glow-sticky-offset)!important}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
/* Un sistema pequeño / mediano / detalle, sin cambiar colores ni tipografía. */
#shopView{
 --gl-radius-control:var(--glow-radius-sm);
 --gl-radius-card:var(--glow-radius-md);
 --gl-radius-panel:var(--glow-radius-lg);
 --store-radius:var(--glow-radius-md);
}
#shopView #productsGrid>.product,
#shopView .fragrance-card,
#shopView .glow-makeup-home-card,
#shopView .ys-category-card,
#shopView .ys-quick-card,
#shopView .glow-makeup-product-field{border-radius:var(--glow-radius-md)}
#shopView #productsGrid .product-body{
 padding:clamp(8px,5.4cqi,14px);gap:clamp(4px,2.1cqi,6px);
 color:var(--glow-tile-ink);
}
#shopView #productsGrid .product-body .category{
 color:var(--glow-tile-outline) !important;font-size:clamp(10px,4.9cqi,12px);font-weight:500;line-height:1.25;
}
#shopView #productsGrid .product-body h3{
 font-size:clamp(14px,7.4cqi,18px);line-height:1.22;min-height:2.44em;
}
#shopView :is(#productsGrid .product-body .product-name,.top-slide-copy>strong,.fragrance-card-info>strong){
 display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;
}
#shopView #productsGrid .product-body .product-name{color:inherit !important;font-weight:800;width:100%}
#shopView #productsGrid .product-body .price{
 color:var(--glow-tile-outline) !important;
 font-size:clamp(17px,9cqi,23px);line-height:1.22;font-weight:800;
}
/* La marca y las existencias se muestran en el detalle de la ficha. */
#shopView #productsGrid .product-body > :is(p,.stock){display:none}
#shopView #productsGrid .product-purchase-actions button,
#shopView .glow-category-filter,
#shopView .glow-brand-filter,
#shopView #categoryPills button,
#shopView .ys-quick-search,
#shopView .ys-quick-search button,
#shopView .fragrance-card-actions button,
#shopView .glow-makeup-groups button,
#shopView .glow-makeup-subchips button,
#shopView .ys-shelf-frame .ys-rail-controls button{border-radius:var(--glow-radius-sm)}
#shopView .ys-discover-head,
#shopView .glow-makeup-browse{border-radius:var(--glow-radius-lg)}
#shopView .fragrance-card .fragrance-card-info{padding:10px 11px}
#shopView .fragrance-card .fragrance-card-info strong{font-size:clamp(12px,2.7vw,15px)}
/* La ficha de detalle mantiene su layout y galería: solo esquinas y densidad. */
.product-sheet{border-radius:var(--glow-radius-lg);max-height:min(88dvh,760px)}
.product-sheet .product-sheet-content{border-radius:inherit}
.product-sheet .detail-layout{padding:17px;gap:16px}
.product-sheet .detail-info{padding:5px 4px 10px 0}
.product-sheet .detail-info h2{font-size:clamp(19px,2.6vw,26px);line-height:1.22}
.product-sheet .detail-price{font-size:22px;margin:6px 0 2px}
.product-sheet .detail-stock.is-last-unit{color:var(--theme-accent-strong,#772552);background:var(--theme-surface-soft,#fce9f3);font-weight:750;width:fit-content;padding:3px 8px;border-radius:var(--glow-radius-sm)}
.product-sheet .detail-brand{margin:0 0 3px}
.product-sheet .detail-quantity{display:flex;align-items:center;justify-content:space-between;gap:8px;max-width:148px;margin:8px 0}
.product-sheet .detail-quantity input{width:65px;padding:5px 7px}
.product-sheet .detail-feedback:empty{display:none}
.product-sheet .detail-summary{margin:10px 0;overflow-wrap:anywhere}
.product-sheet .detail-description-block summary{cursor:pointer;padding-block:8px;font-weight:650}
.product-sheet .detail-description :is(p,ul){margin:0 0 6px}
.product-sheet .detail-highlights{margin-top:8px;padding-block:9px}
.product-sheet .detail-highlights h3{margin-bottom:6px!important}
.product-sheet .detail-meta-badges{gap:5px}
.product-sheet .detail-meta-badge{min-height:25px;padding:3px 8px;font-size:11px;gap:4px}
.product-sheet .detail-meta-badge .glow-highlight-icon{width:13px;height:13px}
.product-sheet .detail-highlights-more summary{cursor:pointer;padding-block:6px;font-size:12px;color:var(--theme-accent-strong,#772552)}
.detail-highlights-more:not([open]) summary span:last-child,
.detail-highlights-more[open] summary span:first-child{display:none}
.product-sheet .detail-hero-photo,
.product-sheet .shade-option{border-radius:var(--glow-radius-md)}
.product-sheet .detail-thumbnails button,
.product-sheet .detail-add,
.product-sheet .detail-sheet-toolbar button{border-radius:var(--glow-radius-sm)}
@media(max-width:700px){
 .product-sheet{border-radius:var(--glow-radius-lg) var(--glow-radius-lg) 0 0}
 .product-sheet .detail-layout{padding:12px 14px 18px;gap:11px}
 .product-sheet .detail-info{padding:0 2px 10px}
 .product-sheet .detail-info h2{font-size:clamp(18px,5vw,23px)}
 .product-sheet .detail-price{font-size:20px}
}
/* Bolsa lateral accesible — conserva la página de checkout existente. */
body.glow-cart-drawer-open{overflow:hidden}
.glow-cart-drawer{
 position:fixed;inset:0 0 0 auto;margin:0;
 width:min(430px,100vw);max-width:100vw;
 height:100dvh;max-height:100dvh;padding:0;
 border:0;border-left:1px solid var(--theme-border,#e8dce8);
 border-radius:var(--glow-radius-lg) 0 0 var(--glow-radius-lg);
 background:var(--theme-surface,#fff);color:var(--theme-hero-ink,#4b3651);
 box-shadow:-18px 0 60px rgba(39,20,46,.15);
 overscroll-behavior:contain;
}
.glow-cart-drawer::backdrop{background:rgba(30,16,36,.45)}
.glow-cart-drawer[open]{animation:glowBagEnter .22s ease-out both}
@keyframes glowBagEnter{from{opacity:.7;transform:translateX(36px)}to{opacity:1;transform:translateX(0)}}
.glow-cart-drawer__panel{height:100%;display:flex;flex-direction:column;min-height:0}
.glow-cart-drawer__head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:19px 20px 14px;border-bottom:1px solid var(--theme-border,#eadce9)}
.glow-cart-drawer__head small{display:block;color:var(--theme-accent-strong,#96578d);font-size:10px;font-weight:700;letter-spacing:.1em}
.glow-cart-drawer__head h2{margin:2px 0 0;font-size:23px;letter-spacing:-.035em}
.glow-cart-drawer__close{width:38px;height:38px;flex:none;display:grid;place-items:center;border:1px solid var(--theme-border,#eadce9);border-radius:var(--glow-radius-sm);background:#fff;color:#6b4968;font-size:25px;line-height:1}
.glow-cart-drawer__close:focus-visible,.glow-cart-line button:focus-visible,.glow-cart-drawer button:focus-visible{outline:2px solid var(--theme-accent-strong,#9b5487);outline-offset:2px}
.glow-cart-drawer__items{flex:1;min-height:0;overflow-y:auto;padding:12px 16px;display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain}
.glow-cart-line{display:grid;grid-template-columns:76px minmax(0,1fr);gap:12px;padding:11px;border:1px solid var(--theme-border,#ecdfea);border-radius:var(--glow-radius-md);background:#fff;min-width:0}
.glow-cart-line__image{width:76px;height:83px;display:grid;place-items:center;overflow:hidden;border-radius:var(--glow-radius-sm);background:var(--theme-surface-soft,#faf1f8)}
.glow-cart-line__image img{display:block;width:100%;height:100%;object-fit:contain}
.glow-cart-line__placeholder{font-size:23px;color:var(--theme-accent-strong,#884c89)}
.glow-cart-line__details{min-width:0;display:flex;flex-direction:column;gap:5px}
.glow-cart-line__details>strong{font-size:12px;line-height:1.35;overflow-wrap:anywhere}
.glow-cart-line__details>small{font-size:11px;color:var(--theme-hero-muted,#826c82);overflow-wrap:anywhere}
.glow-cart-line__bottom{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto}
.glow-cart-line__bottom>strong{font-size:13px;white-space:nowrap}
.glow-cart-line__qty{display:flex;align-items:center;gap:7px}
.glow-cart-line__qty button{width:29px;height:29px;min-width:29px;display:grid;place-items:center;padding:0;border-radius:var(--glow-radius-sm);border:1px solid var(--theme-border,#e7d4e0);background:#fff;color:var(--theme-accent-strong,#865383)}
.glow-cart-line__qty output{min-width:13px;text-align:center;font-size:12px;font-weight:700}
.glow-cart-line__pending{font-size:10px;color:var(--theme-hero-muted,#806a83)}
.glow-cart-drawer__foot{padding:15px 19px max(17px,env(safe-area-inset-bottom));border-top:1px solid var(--theme-border,#eadce9);background:#fff}
.glow-cart-drawer__summary{max-height:140px;overflow:auto;margin-bottom:10px;font-size:12px}
.glow-cart-drawer__summary .money-line{padding:5px 0}
.glow-cart-drawer__summary .money-line:last-of-type{font-size:15px;color:var(--theme-accent-strong,#864983)}
.glow-cart-drawer__summary .perfume-cart-delivery{font-size:10px;line-height:1.45;margin:8px 0 0}
.glow-cart-drawer__foot .primary{border-radius:var(--glow-radius-sm);min-height:45px}
.glow-cart-drawer__foot>small{display:block;text-align:center;color:var(--theme-hero-muted,#826c82);font-size:10px;line-height:1.45;margin-top:7px}
.glow-cart-drawer__empty{min-height:100%;display:grid;align-content:center;justify-items:center;gap:13px;text-align:center;padding:25px 14px}
.glow-cart-drawer__empty-icon{display:grid;place-items:center;width:70px;height:70px;background:var(--theme-surface-soft,#f9eef7);border-radius:var(--glow-radius-lg);color:var(--theme-accent-strong,#845181)}
.glow-cart-drawer__empty h3{font-size:19px;line-height:1.3;margin:0}
.glow-cart-drawer__empty p{font-size:12px;color:var(--theme-hero-muted,#816d83);margin:0}
.glow-cart-drawer__empty button{border-radius:var(--glow-radius-sm);min-height:39px}
#cartCount.hidden{display:none!important}
@media(max-width:500px){
 .glow-cart-drawer{width:calc(100vw - 28px);border-radius:var(--glow-radius-lg) 0 0 var(--glow-radius-lg);border-left:1px solid var(--theme-border,#eadce9)}
 .glow-cart-drawer__head{padding:15px 16px 12px}
 .glow-cart-drawer__items{padding:9px 12px}
 .glow-cart-drawer__foot{padding:11px 14px max(12px,env(safe-area-inset-bottom))}
}
@media(prefers-reduced-motion:reduce){.glow-cart-drawer[open]{animation:none}}


/* Regla específica de la ficha (el CSS histórico usa selectores más fuertes). */
dialog#productDialog.product-sheet{border-radius:var(--glow-radius-lg)!important}
dialog#productDialog.product-sheet .detail-purchase-actions>button{
 border-radius:var(--glow-radius-sm)!important
}
@media(max-width:700px){
 dialog#productDialog.product-sheet{
  border-radius:var(--glow-radius-lg) var(--glow-radius-lg) 0 0!important
 }
}


/* Radios consistentes: las reglas históricas incluyen !important y requieren prioridad específica. */
#shopView #productsGrid>.product,
#shopView .fragrance-card{border-radius:var(--glow-radius-md)!important}
#shopView .product-purchase-actions button,
#shopView .fragrance-card-actions button,
#shopView #categoryPills .glow-category-filter,
#shopView #glowBrandChips .glow-brand-filter{border-radius:var(--glow-radius-sm)!important}
#shopView .fragrance-card-details{padding:9px 10px!important;gap:5px}
#shopView .fragrance-card-details h3{font-size:clamp(12px,1.3vw,15px);line-height:1.36}
#shopView .fragrance-card-details>strong{font-size:clamp(15px,1.7vw,18px)}
dialog.fragrance-product-sheet{border-radius:var(--glow-radius-lg)!important}
.fragrance-product-sheet .frag-sheet-layout{padding:16px;gap:16px}
.fragrance-product-sheet .frag-sheet-info h2{font-size:clamp(19px,2.5vw,26px)}
.fragrance-product-sheet .frag-sheet-price{font-size:clamp(20px,2.8vw,24px);margin:10px 0}
.fragrance-product-sheet .frag-gallery-hero,
.fragrance-product-sheet .frag-gallery{border-radius:var(--glow-radius-md)}
.fragrance-product-sheet .frag-buy-actions>button{border-radius:var(--glow-radius-sm)!important}
@media(max-width:700px){
 dialog.fragrance-product-sheet{border-radius:var(--glow-radius-lg) var(--glow-radius-lg) 0 0!important}
 .fragrance-product-sheet .frag-sheet-layout{padding:11px 13px 18px;gap:10px}
 .fragrance-product-sheet .frag-sheet-info h2{font-size:clamp(18px,4.8vw,23px)}
 .fragrance-product-sheet .frag-sheet-price{font-size:20px;margin:9px 0}
}


/* La ficha heredada aumenta títulos/precios con selectores de mayor prioridad. */
dialog#productDialog.product-sheet .detail-info h2{
 font-size:clamp(19px,2.6vw,26px)!important;
}
dialog#productDialog.product-sheet .detail-price{
 font-size:22px!important;margin:12px 0!important;
}
dialog#productDialog.product-sheet .detail-layout{
 padding:17px!important;gap:16px!important;
}
@media(max-width:700px){
 dialog#productDialog.product-sheet .detail-info h2{
  font-size:clamp(18px,5vw,23px)!important;
 }
 dialog#productDialog.product-sheet .detail-price{
  font-size:20px!important;margin:9px 0!important;
 }
 dialog#productDialog.product-sheet .detail-layout{
  padding:12px 14px 18px!important;gap:11px!important;
 }
}

/* Tarjetas blancas, contorno vino y relieve solo en la base. */
#shopView {
 --glow-tile-surface:#fff;
 --glow-tile-ink:#400b38;
 --glow-tile-outline:#720e50;
 --glow-tile-edge:#922d5c;
 --glow-tile-ambient:#400b3814;
}
#shopView :is(#homeHero.glow-banner, #topCarousel, #productsGrid > .product, #perfumeDiscovery .fragrance-card,
 .ys-category-card, .ys-shop-nav .ys-quick-card, .ys-product, .glow-immediate-card,
 .glow-makeup-home-card, .glow-accessory-home-card) {
 --card-edge:4px;
 border:1px solid var(--glow-tile-outline) !important;
 box-shadow:0 var(--card-edge) 0 var(--glow-tile-edge),
  0 7px 14px var(--glow-tile-ambient) !important;
}
#shopView :is(#productsGrid > .product, #perfumeDiscovery .fragrance-card, .ys-category-card,
 .ys-shop-nav .ys-quick-card, .ys-product, .glow-immediate-card, .glow-makeup-home-card,
 .glow-accessory-home-card) {
 border-radius:var(--glow-radius-md) !important;
 background-color:var(--glow-tile-surface) !important;
 transform:translateY(var(--card-rise,0px));
 transition:transform .14s ease-out,box-shadow .14s ease-out;
}
@media(hover:hover) and (pointer:fine) {
 #shopView :is(#productsGrid > .product, #perfumeDiscovery .fragrance-card, .ys-category-card,
  .ys-shop-nav .ys-quick-card, .ys-product, .glow-immediate-card, .glow-makeup-home-card,
  .glow-accessory-home-card):hover:not(:disabled) {
  --card-edge:5px;
  --card-rise:-1px;
 }
}
#shopView :is(#productsGrid > .product, #perfumeDiscovery .fragrance-card, .ys-category-card,
 .ys-shop-nav .ys-quick-card, .ys-product, .glow-immediate-card, .glow-makeup-home-card,
 .glow-accessory-home-card):active:not(:disabled) {
 --card-edge:1px;
 --card-rise:3px;
}
@media(prefers-reduced-motion:reduce) {
 #shopView :is(#productsGrid > .product, #perfumeDiscovery .fragrance-card, .ys-category-card,
  .ys-shop-nav .ys-quick-card, .ys-product, .glow-immediate-card, .glow-makeup-home-card,
  .glow-accessory-home-card) {
  transform:none;
  transition:none;
 }
}

#shopView :is(#productsGrid > .product .image, #perfumeDiscovery .fragrance-card-picture, .ys-product-visual) {
 width:100%;
 margin:0;
 aspect-ratio:5 / 4;
 border-radius:0 !important;
}
#shopView #productsGrid .product .image {
 background:color-mix(in srgb,var(--theme-accent-pink) 14%,var(--theme-surface)) !important;
}
#shopView #productsGrid .product-purchase-actions {
 padding-top:clamp(3px,2cqi,7px);
}
#shopView #productsGrid .product-purchase-actions .secondary {
 display:flex;
 justify-content:center;
 align-items:center;
 color:var(--glow-tile-outline) !important;
 background:var(--glow-tile-surface) !important;
 border:1px solid var(--glow-tile-outline) !important;
 min-height:clamp(36px,16cqi,44px) !important;
 font-size:clamp(13px,6.7cqi,17px) !important;
 font-weight:800 !important;
 padding-block:4px !important;
 padding-inline:0 !important;
}
#shopView #productsGrid .product-purchase-actions .secondary:is(:hover,:focus-visible) {
 background:color-mix(in srgb,var(--glow-tile-outline) 5%,white) !important;
}
#shopView :is(#homeHero .glow-banner__media, .ys-quick-card__media, .ys-category-image) {
 border-radius:var(--glow-radius-sm) !important;
}
#shopView :is(.ys-service-note, #glowImmediateSection .glow-immediate-head) {
 background:var(--glow-tile-surface) !important;
 border-radius:var(--glow-radius-md) !important;
 box-shadow:0 1px 0 color-mix(in srgb,var(--glow-tile-outline) 28%,transparent);
}
#shopView #glowImmediateSection .glow-immediate-head {
 padding:clamp(9px,1.4cqi,16px);
}

/* Una geometría para los controles públicos, incluidas las flechas y los cierres. */
:is(#shopView, #cartView, #accountView, #productDialog, #glowCartDrawer, #glowHelpDialog,
 .fragrance-product-sheet, .image-lightbox, .fragrance-lightbox, body > header,
 .mobile-bottom, .glowtto-footer) :is(button, a.primary, a.secondary, .glow-support-footer-button):not(:where(
 .brand, .product-cover, .product-name, .gallery-open, .frag-hero-photo, .hero-art-action,
 .ys-quick-card, .ys-category-card, .ys-product, .glow-immediate-card, .glow-makeup-home-card, .glow-accessory-home-card)) {
 border-radius:var(--glow-radius-sm) !important;
}

:is(#shopView, #cartView, #accountView, #productDialog, #glowCartDrawer, #glowHelpDialog,
 .fragrance-product-sheet) :is(button.primary, a.primary, .detail-buy, .glow-banner__cta) {
 background:linear-gradient(180deg,color-mix(in srgb,var(--theme-accent) 26%,var(--theme-accent-strong)),var(--theme-accent-strong)) !important;
 color:white !important;
 border:1px solid color-mix(in srgb,var(--theme-accent-strong) 85%,var(--theme-accent)) !important;
 box-shadow:0 2px 7px color-mix(in srgb,var(--theme-accent-strong) 16%,transparent) !important;
}

:is(#shopView, #cartView, #accountView, #productDialog, #glowCartDrawer, #glowHelpDialog,
 .fragrance-product-sheet) :is(button.secondary, a.secondary, .detail-add) {
 background:white !important;
 border:1px solid var(--theme-border) !important;
 box-shadow:none !important;
}

:is(#shopView, #cartView, #accountView, #productDialog, #glowCartDrawer, #glowHelpDialog,
 .fragrance-product-sheet) :is(.primary, .glow-banner__cta, .detail-buy):is(:disabled, [aria-disabled="true"]) {
 box-shadow:none !important;
}

:is(#shopView, #cartView, #accountView, #productDialog, #glowCartDrawer, #glowHelpDialog,
 .fragrance-product-sheet) :is(.primary, .glow-banner__cta, .detail-buy):active:not(:disabled, [aria-disabled="true"]) {
 box-shadow:0 1px 3px color-mix(in srgb,var(--theme-accent-strong) 14%,transparent) !important;
}

@media(prefers-reduced-motion:no-preference){
 #shopView .glow-banner__cta {transition:transform .14s ease,box-shadow .14s ease}
 #shopView .glow-banner__cta:active {transform:translateY(1px)}
}
