.storefront-products{background:linear-gradient(180deg,#fffdf7 0%,#fbf8ee 100%);scroll-margin-top:1rem}
.storefront-products .section-heading{margin-bottom:1.15rem}
.storefront-shop-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;margin:0 0 1.35rem;max-width:760px}
.storefront-shop-section{display:grid;gap:.1rem;padding:.72rem .85rem;border:1px solid rgba(11,61,50,.1);border-radius:14px;background:rgba(255,255,255,.84);color:#0b3d32;text-decoration:none;box-shadow:0 5px 18px rgba(11,61,50,.035)}
.storefront-shop-section strong{font-size:.93rem}
.storefront-shop-section span{color:#68776f;font-size:.76rem;line-height:1.3}
.storefront-shop-section.is-active{border-color:rgba(11,61,50,.2);background:#f4f0e5}
.storefront-shop-section:focus-visible{outline:3px solid rgba(11,61,50,.22);outline-offset:3px}
.storefront-catalog-groups{display:grid;gap:1.35rem}
.storefront-category-nav{display:flex;flex-wrap:wrap;gap:.45rem;margin:0 0 .1rem}
.storefront-category-nav a{display:inline-flex;align-items:center;min-height:38px;padding:.42rem .78rem;border:1px solid rgba(11,61,50,.12);border-radius:999px;background:#fff;color:#0b3d32;text-decoration:none;font-size:.82rem;font-weight:800;box-shadow:0 3px 12px rgba(11,61,50,.035)}
.storefront-category-nav a:hover{background:#f4f0e5;border-color:rgba(11,61,50,.22)}
.storefront-category-nav a:focus-visible{outline:3px solid rgba(11,61,50,.2);outline-offset:2px}
.storefront-category-section{display:grid;gap:.8rem;padding:1rem 1.05rem 1.15rem;border:1px solid rgba(11,61,50,.08);border-radius:20px;background:rgba(255,255,255,.68);box-shadow:0 8px 28px rgba(11,61,50,.035);scroll-margin-top:1rem}
.storefront-category-heading{display:flex;align-items:end;justify-content:space-between;gap:1rem;padding-bottom:.62rem;border-bottom:1px solid rgba(11,61,50,.09)}
.storefront-category-heading>div{display:grid;gap:.12rem}
.storefront-category-heading h3{margin:0;font-family:Georgia,'Times New Roman',serif;color:#0b3d32;font-size:clamp(1.2rem,1.8vw,1.55rem);line-height:1.1}
.storefront-category-heading p{margin:0;color:#68776f}
.storefront-category-description{font-size:.76rem;line-height:1.35}
.storefront-category-count{font-size:.76rem;white-space:nowrap}
.storefront-category-empty{padding:.8rem .9rem;border:1px dashed rgba(11,61,50,.16);border-radius:12px;background:rgba(244,240,229,.42);color:#65766e;font-size:.84rem;line-height:1.4}
.storefront-product-subgroups{display:grid;gap:1rem}
.storefront-product-subgroup{display:grid;gap:.6rem}
.storefront-subgroup-heading{display:flex;align-items:center;gap:.45rem}
.storefront-subgroup-heading h4{margin:0;color:#0b3d32;font-size:.9rem;letter-spacing:.01em}
.storefront-subgroup-heading span{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 .35rem;border-radius:999px;background:#eef1e6;color:#52645c;font-size:.7rem;font-weight:800}
.storefront-products-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:.72rem}
.storefront-product-card{overflow:hidden;background:#fff;border:1px solid rgba(11,61,50,.09);border-radius:15px;box-shadow:0 5px 16px rgba(11,61,50,.045);display:flex;flex-direction:column;min-width:0;cursor:pointer;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
.storefront-product-card:hover{transform:translateY(-2px);border-color:rgba(11,61,50,.18);box-shadow:0 9px 22px rgba(11,61,50,.075)}
.storefront-product-card>img{display:block;width:100%;aspect-ratio:1/1;object-fit:contain;background:linear-gradient(180deg,#fff 0%,#fbfaf5 100%);padding:.38rem;box-sizing:border-box}
.storefront-product-body{padding:.66rem .72rem .75rem;display:flex;flex-direction:column;gap:.28rem;flex:1}
.storefront-product-body h3{font-family:Georgia,'Times New Roman',serif;color:#0b3d32;font-size:.98rem;line-height:1.16;margin:0;min-height:2.25em}
.storefront-product-meta{font-weight:800;color:#0b3d32;margin:.02rem 0 0;font-size:.86rem}
.storefront-product-body .storefront-status{align-self:flex-start;margin:.02rem 0;font-size:.68rem;padding:.24rem .48rem;border-radius:999px}
.storefront-product-details{align-self:flex-start;margin-top:.12rem;border:1px solid rgba(11,61,50,.14);border-radius:999px;background:#f7f4eb;color:#0b3d32;padding:.34rem .62rem;font:inherit;font-size:.76rem;font-weight:800;cursor:pointer;text-decoration:none}
.storefront-product-details:hover{background:#edf0e5;border-color:rgba(11,61,50,.24)}
.storefront-product-details:focus-visible{outline:3px solid rgba(11,61,50,.22);outline-offset:3px}
.storefront-product-field{display:grid;gap:.3rem;font-size:.88rem;font-weight:750;color:#42584e}
.storefront-product-field select,.storefront-product-field input{width:100%;box-sizing:border-box;border:1px solid rgba(11,61,50,.2);border-radius:12px;background:#fff;padding:.72rem .75rem;font:inherit;color:#0b3d32}
.storefront-product-field select:focus-visible,.storefront-product-field input:focus-visible,.storefront-product-add:focus-visible{outline:3px solid rgba(11,61,50,.22);outline-offset:2px}
.storefront-product-add{width:100%;justify-content:center}
.storefront-product-dialog-purchase{display:grid;grid-template-columns:minmax(0,1fr) 92px;gap:.75rem;align-items:end;padding:1rem;border:1px solid rgba(11,61,50,.12);border-radius:16px;background:#fff}
.storefront-product-dialog-purchase-multi{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 92px}
.storefront-product-dialog-purchase h3{grid-column:1/-1}
.storefront-product-dialog-purchase .storefront-product-selection{grid-column:1/-1}
.storefront-product-dialog-purchase .storefront-product-add{grid-column:1/-1}
.storefront-catalog-message{margin:0;padding:.9rem 1rem;border-radius:14px;background:#f4f0e5;color:#52645c;font-size:.88rem;line-height:1.5}
@media(max-width:900px){.storefront-products-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}.storefront-category-section{padding:.9rem}.storefront-shop-sections{max-width:none}}
@media(max-width:620px){.storefront-shop-sections{grid-template-columns:1fr 1fr;gap:.5rem}.storefront-shop-section{padding:.62rem .7rem}.storefront-shop-section span{display:none}.storefront-category-section{border-radius:16px;padding:.78rem}.storefront-category-heading{align-items:flex-start}.storefront-products-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.58rem}.storefront-product-card{border-radius:13px}.storefront-product-body{padding:.58rem .62rem .66rem}.storefront-product-body h3{font-size:.9rem}.storefront-product-details{font-size:.72rem;padding:.32rem .52rem}}
@media(max-width:360px){.storefront-products-grid{grid-template-columns:1fr}}
#libros{scroll-margin-top:1rem;border-top:1px solid rgba(11,61,50,.1)}
.storefront-product-dialog-open{overflow:hidden}
.storefront-product-dialog{position:fixed;inset:0;z-index:10050;display:grid;place-items:center;padding:1.5rem;background:rgba(5,26,22,.66);backdrop-filter:blur(5px)}
.storefront-product-dialog-panel{position:relative;display:grid;grid-template-columns:minmax(260px,.9fr) minmax(0,1.1fr);width:min(960px,100%);max-height:min(760px,calc(100vh - 3rem));overflow:auto;background:#fffdf7;border-radius:28px;box-shadow:0 28px 90px rgba(0,0,0,.28)}
.storefront-product-dialog-close{position:absolute;top:1rem;right:1rem;z-index:2;width:44px;height:44px;border:0;border-radius:999px;background:#fff;color:#0b3d32;box-shadow:0 8px 24px rgba(11,61,50,.16);font-size:2rem;line-height:1;cursor:pointer}
.storefront-product-dialog-close:focus-visible{outline:3px solid rgba(11,61,50,.28);outline-offset:3px}
.storefront-product-detail-media{display:grid;place-items:center;background:#fff;min-height:100%}
.storefront-product-detail-media img{display:block;width:100%;height:100%;max-height:760px;object-fit:contain}
.storefront-product-detail-content{padding:clamp(1.5rem,3vw,2.5rem);display:grid;align-content:start;gap:1rem}
.storefront-product-detail-content .eyebrow{margin:0;padding-right:3.5rem}
.storefront-product-detail-content h2{margin:0;font-family:Georgia,'Times New Roman',serif;color:#0b3d32;font-size:clamp(2rem,4vw,3.4rem);line-height:1}
.storefront-product-detail-content h3{margin:.4rem 0 0;color:#0b3d32;font-size:1.15rem}
.storefront-product-detail-summary,.storefront-product-detail-note,.storefront-product-detail-empty{margin:0;color:#5b6c64;line-height:1.55}
.storefront-product-detail-variants{display:grid;gap:.65rem}
.storefront-product-detail-variant{display:flex;justify-content:space-between;gap:1rem;align-items:center;padding:.85rem 1rem;border:1px solid rgba(11,61,50,.12);border-radius:14px;background:#fff}
.storefront-product-detail-variant>div{display:grid;gap:.18rem}
.storefront-product-detail-variant span{color:#5b6c64;font-size:.9rem}
.storefront-product-detail-price{white-space:nowrap;color:#0b3d32}
@media(max-width:900px){.storefront-product-dialog{padding:1rem}.storefront-product-dialog-panel{grid-template-columns:1fr;max-width:720px;max-height:calc(100vh - 2rem)}.storefront-product-detail-media{min-height:auto}.storefront-product-detail-media img{max-height:340px}.storefront-product-detail-content{padding:1.5rem}}
@media(max-width:620px){.storefront-product-card{border-radius:13px}.storefront-product-body{padding:.58rem .62rem .66rem}.storefront-product-dialog-purchase{grid-template-columns:1fr}.storefront-product-dialog{padding:.5rem;align-items:end}.storefront-product-dialog-panel{width:100%;max-height:calc(100vh - 1rem);border-radius:20px;grid-template-columns:1fr}.storefront-product-dialog-close{top:.75rem;right:.75rem}.storefront-product-detail-media img{max-height:260px}.storefront-product-detail-content{padding:1.2rem}.storefront-product-detail-variant{align-items:flex-start;flex-direction:column;gap:.35rem}.storefront-product-detail-price{white-space:normal}}

/* El asistente conserva su comportamiento global; en Tienda se compacta para no cubrir tarjetas ni controles. */
.storefront-page~.winston-chat-root{right:8px;bottom:18px;z-index:80}
.storefront-page~.winston-chat-root .winston-chat-launcher{width:54px;height:54px;min-width:54px;min-height:54px;padding:0;justify-content:center}
.storefront-page~.winston-chat-root .winston-chat-launcher span{display:none}
.storefront-page~.winston-chat-root .winston-chat-launcher img{width:48px;height:48px}
.storefront-product-dialog-open .winston-chat-root{visibility:hidden;pointer-events:none}
@media(max-width:900px){.storefront-page~.winston-chat-root{right:8px;bottom:12px}.storefront-page~.winston-chat-root .winston-chat-launcher{width:50px;height:50px;min-width:50px;min-height:50px}.storefront-page~.winston-chat-root .winston-chat-launcher img{width:44px;height:44px}}
@media(max-width:620px){.storefront-page~.winston-chat-root{right:6px;bottom:8px}.storefront-page~.winston-chat-root .winston-chat-launcher{width:46px;height:46px;min-width:46px;min-height:46px}.storefront-page~.winston-chat-root .winston-chat-launcher img{width:40px;height:40px}}


/* Separar WhatsApp del asistente y retirarlo al consultar una ficha. */
.storefront-page~.floating-actions{right:76px;bottom:18px}
.storefront-page~.floating-actions a{width:48px;height:48px;padding:0;justify-content:center}
.storefront-page~.floating-actions a span{display:none}
.storefront-product-dialog-open .floating-actions{visibility:hidden;pointer-events:none}
@media(max-width:900px){.storefront-page~.floating-actions{right:70px;bottom:12px}}
@media(max-width:620px){.storefront-page~.floating-actions{right:64px;bottom:8px}.storefront-page~.floating-actions a{width:46px;height:46px}}


/* UX tienda: galería real, controles táctiles y protección frente a overflow. */
.storefront-products,
.storefront-products-grid,
.storefront-product-card,
.storefront-product-body,
.storefront-product-controls,
.storefront-product-dialog-purchase,
.storefront-product-dialog-panel,
.storefront-product-detail-content {
  min-width:0;
  max-width:100%;
}

.storefront-product-field select,
.storefront-product-field input,
.storefront-product-add,
.storefront-product-dialog-close,
.storefront-product-thumbnail {
  min-height:44px;
}

.storefront-product-selection {
  grid-column:1/-1;
  margin:0;
  color:#42584e;
  font-weight:750;
  font-size:.92rem;
}

.storefront-product-detail-media {
  grid-template-rows:minmax(0,1fr) auto;
}

.storefront-product-thumbnails {
  display:flex;
  gap:.55rem;
  max-width:100%;
  overflow-x:auto;
  padding:.7rem;
  scrollbar-width:thin;
}

.storefront-product-thumbnail {
  flex:0 0 64px;
  width:64px;
  padding:3px;
  border:1px solid rgba(11,61,50,.18);
  border-radius:10px;
  background:#fff;
  cursor:pointer;
}

.storefront-product-thumbnail[aria-pressed="true"] {
  outline:3px solid rgba(11,61,50,.24);
  outline-offset:1px;
}

.storefront-product-thumbnail img {
  display:block;
  width:100%;
  aspect-ratio:1/1;
  object-fit:contain;
}

.storefront-product-body h3,
.storefront-product-detail-content h2,
.storefront-product-field,
.storefront-product-selection {
  overflow-wrap:anywhere;
}

@media(max-width:390px){
  .storefront-product-controls{grid-template-columns:1fr}
  .storefront-product-quantity{max-width:8rem}
  .storefront-product-add{min-height:48px}
  .storefront-product-dialog{padding:0}
  .storefront-product-dialog-panel{max-height:100dvh;border-radius:0}
  .storefront-product-detail-content{padding:1rem}
  .storefront-product-detail-media img{max-height:220px}
  .storefront-product-thumbnail{flex-basis:56px;width:56px}
}


/* Selector visual de color: evita desplegables con decenas de variantes en ropa. */
.storefront-product-colors{border:0;padding:0;margin:0;min-width:0}
.storefront-product-colors legend{margin:0 0 .3rem;padding:0;font-size:.88rem;font-weight:750;color:#42584e}
.storefront-color-swatches{display:flex;flex-wrap:wrap;gap:.48rem}
.storefront-color-swatch{display:inline-flex;align-items:center;gap:.42rem;min-height:44px;padding:.38rem .58rem;border:1px solid rgba(11,61,50,.18);border-radius:999px;background:#fff;color:#0b3d32;font:inherit;font-size:.82rem;font-weight:800;cursor:pointer}
.storefront-color-swatch:hover{border-color:rgba(11,61,50,.34);background:#f8f5ec}
.storefront-color-swatch[aria-pressed="true"]{border-color:#0b3d32;box-shadow:0 0 0 2px rgba(11,61,50,.14);background:#f4f0e5}
.storefront-color-swatch:focus-visible{outline:3px solid rgba(11,61,50,.22);outline-offset:2px}
.storefront-color-swatch-chip{display:block;width:22px;height:22px;flex:0 0 22px;border-radius:50%;background:var(--swatch-color);border:1px solid rgba(11,61,50,.24);box-shadow:inset 0 0 0 1px rgba(255,255,255,.38)}
.storefront-color-swatch-name{white-space:nowrap}
@media(max-width:620px){
  .storefront-color-swatches{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.45rem}
  .storefront-color-swatch{width:100%;justify-content:flex-start;padding:.5rem .6rem}
}
@media(max-width:360px){
  .storefront-color-swatches{grid-template-columns:1fr}
}
