/* The storefront has a dedicated wide-screen layout; the drawer serves mobile. */
.store-page .store-desktop-only, .store-page .store-desktop-loading { display: none; }
.store-page :is(#store-logo, #store-header-logo) > span:not([hidden]) { display: grid; }
.store-page :is(#store-logo, #store-header-logo) > [hidden] { display: none; }
.store-page #store-policies { scroll-margin-top: 96px; }

.store-offer-badge {
  position: absolute;
  bottom: .5rem;
  left: .5rem;
  z-index: 1;
  max-width: calc(100% - 1rem);
  padding: .28rem .55rem;
  border: 1px solid #e1d9f8;
  border-radius: 999px;
  background: #f6f2ff;
  color: #3c286c;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.store-page .store-product-card .store-quantity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: end;
  gap: 8px;
  margin-top: .75rem;
  padding-top: .625rem;
  border-top: 1px solid #e7e9ef;
}
.store-quantity-row label { min-width: 0; font-size: .75rem; font-weight: 600; color: #475569; }
.store-quantity-row input {
  display: block;
  width: 100%;
  max-width: 5.5rem;
  height: 44px;
  margin-top: .25rem;
  padding: 0 .5rem;
  border: 1px solid #d7dce5;
  border-radius: .625rem;
  background: #f8fafc;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.store-bulk-add { width: 44px; height: 44px; border-radius: .625rem; }
.store-bulk-summary:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin-bottom: .875rem;
  padding: 0 0 .625rem;
  border-bottom: 1px solid #e7e9ef;
  color: #334155;
  font-size: .875rem;
  font-weight: 600;
}
.store-bulk-cart-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .875rem;
  border: 1px solid #d7dce5;
  border-radius: .625rem;
  background: #fff;
  color: #0f172a;
}
.store-bulk-cart-link:hover { background: #f1f5f9; }
.store-quantity-row :is(input, button):focus-visible,
.store-bulk-cart-link:focus-visible { outline: 2px solid #6346a8; outline-offset: 2px; }

@media (max-width: 767px) {
  body.store-page { overflow-x: clip; }
  .store-page :is(#store-content, #store-products, .store-catalog, #products-grid, .store-product-card, .store-product-card > div) { min-width: 0; max-width: 100%; }
  .store-page .store-product-card > div > div { min-width: 0; flex-wrap: wrap; gap: .25rem; }
  .store-page .store-product-card p, .store-page :is(#store-name, #store-description) { overflow-wrap: anywhere; }
  .store-page #reviews-list { grid-template-columns: minmax(0, 1fr); }
  .store-page #reviews-list > article, .store-page #reviews-list > article > div { min-width: 0; max-width: 100%; }
  .store-page #reviews-list :is(a, p) { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
}

@media (min-width: 1024px) {
  body.store-page {
    --store-ink: #202321;
    --store-muted: #727773;
    --store-line: #e6e8e4;
    --store-width: 1440px;
    --store-gutter: 40px;
    --store-sidebar-width: 280px;
    --store-column-gap: 40px;
    padding-bottom: 64px;
    background: #fbfbf9;
    color: var(--store-ink);
  }
  .store-page .store-desktop-only { display: flex; }
  .store-page #store-content { padding-top: 96px; }
  .store-page #store-header {
    height: 72px;
    background: rgb(255 255 253 / 96%);
    border-bottom: 1px solid var(--store-line);
    backdrop-filter: blur(16px);
    box-shadow: none;
  }
  .store-page .store-header-inner, .store-page .store-breadcrumb, .store-page .store-layout, .store-page #store-reviews, .store-page #store-policy-section {
    width: calc(100% - var(--store-gutter) * 2);
    max-width: var(--store-width);
    margin-inline: auto;
    padding-inline: 0;
  }
  .store-page .store-header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); height: 72px; padding-block: 0; gap: 32px; }
  .store-page #back-btn { display: none; }
  .store-page .store-header-brand { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 0; text-align: left; }
  .store-page #store-header-logo { width: 36px; height: 36px; flex-shrink: 0; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--store-line); border-radius: 10px; background: #fff; }
  .store-page #store-header-logo > span { font-size: 14px; }
  .store-page #header-store-name { min-width: 0; color: var(--store-ink); font-size: 14px; font-weight: 650; letter-spacing: -.02em; }
  .store-page .store-header-actions { justify-self: end; gap: 16px; }
  .store-page #store-currency-switcher { border-color: var(--store-line); background: #f4f5f1; box-shadow: none; }
  .store-page #store-currency-switcher button[aria-pressed="true"] { background: var(--store-ink); }
  .store-page #cart-link { border: 1px solid var(--store-line); border-radius: 12px; background: #fff; color: var(--store-ink); box-shadow: none; }
  .store-page .store-breadcrumb { margin-bottom: 24px; font-size: 12px; color: var(--store-muted); }
  .store-page .store-breadcrumb a { display: inline-flex; align-items: center; gap: 9px; min-height: 24px; }
  .store-page .store-breadcrumb a:hover { color: var(--store-ink); }
  .store-page .store-breadcrumb i { font-size: 10px; }
  .store-page .store-layout { display: grid; grid-template-columns: var(--store-sidebar-width) minmax(0, 1fr); column-gap: var(--store-column-gap); align-items: stretch; }
  /* The sidebar stretches with the catalog, containing the filters' sticky range before reviews. */
  .store-page .store-sidebar, .store-page .store-product-column { min-width: 0; }
  .store-page .store-product-column { scroll-margin-top: 96px; }
  .store-page .store-intro { width: 100%; margin: 0; }
  .store-page .store-hero { display: none; }
  .store-page .store-profile { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; min-width: 0; width: 100%; max-width: none; margin: 0 0 32px; padding: 0 0 32px; border-bottom: 1px solid var(--store-line); }
  .store-page .store-logo-wrap { margin: 0; }
  .store-page #store-logo { width: 72px; height: 72px; border: 1px solid var(--store-line); border-radius: 18px; box-shadow: 0 3px 10px rgb(32 35 33 / 3%); }
  .store-page :is(#store-logo, #store-header-logo) img { object-fit: contain; padding: 5px; }
  .store-page #store-logo > span { font-size: 28px; }
  .store-page .store-profile-details { flex-direction: column; align-items: flex-start; gap: 24px; min-width: 0; width: 100%; padding: 0; }
  .store-page .store-profile-copy { display: flex; flex-wrap: wrap; align-items: center; column-gap: 14px; row-gap: 14px; width: 100%; }
  .store-page .store-name-row { display: contents; }
  .store-page #store-name { width: 100%; color: var(--store-ink); font-size: clamp(28px, 2.4vw, 36px); font-weight: 650; line-height: 1.12; letter-spacing: -.045em; overflow-wrap: anywhere; }
  .store-page #store-rating-badge { flex-shrink: 0; padding: 4px 8px; border-color: var(--store-line); border-radius: 6px; background: #fff; font-size: 11px; font-weight: 600; }
  .store-page #store-meta { min-width: 0; margin: 0; color: var(--store-muted); font-size: 12px; line-height: 1.6; font-weight: 400; overflow-wrap: anywhere; }
  .store-page #store-meta i { flex-shrink: 0; font-size: 11px; }
  .store-page #store-description { width: 100%; color: #626963; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
  .store-page #store-description:empty { display: none; }
  .store-page #action-buttons { width: auto; margin: 0; padding: 0; }
  .store-page #whatsapp-btn, .store-page #share-store-btn { min-height: 44px; padding-inline: 20px; border-radius: 10px; font-size: 12px; font-weight: 600; box-shadow: none; }
  .store-page #whatsapp-btn { background: var(--store-ink); }
  .store-page #share-store-btn { border: 1px solid var(--store-line); background: #fff; }
  .store-page #share-store-btn:hover { background: #f4f5f1; }
  .store-page .store-toolbar { position: static; margin: 0 0 24px; padding: 0; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
  .store-page .store-toolbar-inner { width: 100%; max-width: none; min-height: 42px; padding: 0; justify-content: flex-end; gap: 20px; }
  .store-page .store-results-title-group { display: block; margin-right: auto; min-width: 0; }
  .store-page .store-section-nav { height: 72px; align-items: stretch; gap: 32px; font-size: 12px; font-weight: 500; }
  .store-page .store-section-nav a { display: flex; align-items: center; gap: 8px; padding: 0 2px; color: var(--store-muted); border-bottom: 2px solid transparent; border-top: 2px solid transparent; }
  .store-page .store-section-nav a[aria-current="location"] { color: var(--store-ink); border-bottom-color: var(--store-ink); }
  .store-page .store-section-nav a:hover { color: var(--store-ink); }
  .store-page #store-product-total { padding: 2px 6px; border-radius: 5px; background: #f0f1ec; font-size: 10px; }
  .store-page .store-search { flex: 0 1 300px; min-width: 140px; box-shadow: none; }
  .store-page #store-search-input { height: 40px; border-radius: 10px; border: 1px solid var(--store-line); background: #fff; font-size: 12px; }
  .store-page #store-filter-btn { display: none; }
  .store-page .store-catalog { width: 100%; max-width: none; margin: 0; padding: 0; }
  .store-page #store-filter-overlay { display: none; }
  .store-page #store-filter-drawer {
    position: sticky;
    top: 96px;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: none;
    max-height: calc(100vh - 120px);
    transform: none;
    border: 1px solid var(--store-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
    transition: none;
  }
  .store-page .store-filter-heading { min-height: 62px; padding: 18px 20px; border-color: var(--store-line); }
  .store-page #store-filter-title { font-size: 14px; }
  .store-page .store-filter-close, .store-page .store-sort-options, .store-page .store-filter-apply { display: none; }
  .store-page .store-filter-fields { padding: 20px; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
  .store-page .store-filter-fields fieldset { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--store-line); min-width: 0; }
  .store-page .store-filter-fields .store-sort-options + fieldset { margin-top: 0; padding-top: 0; border-top: 0; }
  .store-page .store-filter-fields legend { float: left; width: 100%; margin-bottom: 16px; color: var(--store-ink); font-size: 12px; }
  .store-page .store-filter-fields legend + div, .store-page .store-filter-fields legend + label { clear: both; }
  .store-page #filter-categories-list { flex-direction: column; gap: 4px; }
  .store-page #filter-categories-list label { gap: 10px; min-height: 34px; font-size: 12px; }
  .store-page #filter-categories-list label > span:first-of-type { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
  .store-page #filter-categories-list label:has(input:checked) > span:first-of-type { color: var(--store-ink); font-weight: 700; }
  .store-page .store-category-count { margin-left: auto; color: #94a3b8; font-size: 11px; font-variant-numeric: tabular-nums; }
  .store-page .store-filter-fields input[type="radio"], .store-page .store-filter-fields input[type="checkbox"] { width: 15px; height: 15px; flex-shrink: 0; accent-color: var(--store-ink); }
  .store-page #filter-price-min, .store-page #filter-price-max { min-width: 0; height: 38px; padding-left: 24px; padding-right: 8px; border-radius: 7px; font-size: 12px; appearance: textfield; }
  .store-page #filter-price-min::-webkit-inner-spin-button, .store-page #filter-price-max::-webkit-inner-spin-button { appearance: none; margin: 0; }
  .store-page .store-filter-fields label:has(#filter-in-stock) { gap: 10px; font-size: 12px; }
  .store-page .store-filter-fields label:has(#filter-in-stock) span { font-weight: 500; }
  .store-page .store-filter-actions { padding: 12px 20px; border-color: var(--store-line); }
  .store-page .store-filter-actions > button { min-height: 36px; border-radius: 8px; font-size: 12px; font-weight: 600; background: #f1f5f9; }
  .store-page .store-products { min-width: 0; scroll-margin-top: 96px; }
  .store-page #store-results-title { font-size: 20px; font-weight: 750; line-height: 1.3; overflow-wrap: anywhere; }
  .store-page #store-results-count { margin-top: 4px; color: var(--store-muted); font-size: 12px; }
  .store-page .store-sort { display: flex; align-items: center; gap: 10px; flex-shrink: 0; font-size: 12px; }
  .store-page .store-sort label { color: var(--store-muted); }
  .store-page #store-desktop-sort { height: 38px; padding: 0 30px 0 12px; border: 1px solid var(--store-line); border-radius: 8px; background-color: #fff; color: var(--store-ink); font: inherit; cursor: pointer; }
  .store-page #products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .store-page .store-product-card { min-width: 0; padding: 10px; border-radius: 14px; border-color: var(--store-line); box-shadow: none; }
  .store-page .store-product-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgb(15 23 42 / 6%); }
  .store-page .store-product-card > a { margin-bottom: 14px; border-radius: 8px; background: #f6f7f9; }
  .store-page .store-product-card > a > img { height: 100%; padding: 14px; }
  .store-page .store-product-card > div { padding: 0 4px 5px; }
  .store-page .store-product-card h3 { min-height: 38px; font-size: 13px; font-weight: 600; line-height: 1.5; }
  .store-page .store-product-card h3:hover { color: #1c74cf; }
  .store-page .store-product-card p { font-size: 16px; letter-spacing: -.3px; }
  .store-page .store-product-card button[aria-label="Add to cart"]:not(.store-bulk-add) { width: 34px; height: 34px; border-radius: 9px; }
  .store-page #products-status { padding: 72px 24px; border: 1px dashed #cbd5e1; border-radius: 14px; background: #fff; font-size: 14px; }
  .store-page .store-empty-reset { margin-top: 16px; color: var(--store-ink); text-decoration: underline; text-underline-offset: 4px; font-size: 12px; }
  .store-page #store-reviews { margin-top: 64px; padding-top: 32px; border-color: var(--store-line); scroll-margin-top: 96px; }
  .store-page #store-reviews h2 { font-size: 22px; }
  .store-page #store-reviews p { font-size: 12px; }
  .store-page #reviews-list { gap: 20px; }
  .store-page #reviews-list > article { border-radius: 14px; border-color: var(--store-line); background: #fff; box-shadow: none; }
  .store-page #store-header :focus-visible, .store-page #store-content :focus-visible { outline: 2px solid #1c74cf; outline-offset: 4px; }
  .store-page #error { padding-top: 104px; }
  .store-page .store-mobile-loading { display: none; }
  .store-page .store-desktop-loading { display: block; max-width: 1520px; padding: 96px var(--store-gutter) 40px; margin: auto; }
  .store-page .store-loading-header { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 32px; height: 72px; padding-inline: max(var(--store-gutter), calc((100vw - var(--store-width)) / 2)); border-bottom: 1px solid var(--store-line); background: #fff; }
  .store-page .store-loading-header > div { height: 32px; width: 160px; border-radius: 8px; background: #f1f2ed; }
  .store-page .store-loading-breadcrumb { height: 24px; width: 80px; margin-bottom: 24px; border-radius: 6px; background: #f1f2ed; }
  .store-page .store-loading-layout { display: grid; grid-template-columns: var(--store-sidebar-width) minmax(0, 1fr); gap: var(--store-column-gap); }
  .store-page .store-loading-profile { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; min-width: 0; padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--store-line); }
  .store-page .store-loading-logo { width: 72px; height: 72px; border-radius: 18px; background: #e6e8e1; }
  .store-page .store-loading-lines { width: 100%; }
  .store-page .store-loading-lines div { height: 14px; margin-bottom: 14px; border-radius: 5px; background: #f1f2ed; max-width: 320px; }
  .store-page .store-loading-lines div:first-child { width: 75%; height: 44px; }
  .store-page .store-loading-actions { width: 224px; height: 44px; border-radius: 10px; background: #f1f2ed; }
  .store-page .store-loading-catalog { min-width: 0; }
  .store-page .store-loading-tools { height: 42px; margin-bottom: 24px; border-radius: 8px; background: #f1f2ed; }
  .store-page .store-loading-sidebar { height: 360px; border: 1px solid #e2e8f0; border-radius: 14px; background: #f8fafc; }
  .store-page .store-loading-products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .store-page .store-loading-products div { aspect-ratio: 4 / 5; border-radius: 14px; background: #f1f5f9; }
}

@media (min-width: 1440px) {
  .store-page #products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .store-page .store-loading-products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  body.store-page { --store-gutter: 28px; --store-sidebar-width: 260px; --store-column-gap: 28px; }
  .store-page .store-toolbar-inner { gap: 14px; }
  .store-page .store-sort label { display: none; }
  .store-page #products-grid { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .store-page #store-content, .store-page #store-filter-drawer, .store-page .store-product-card, .store-page .store-product-card img { transition: none; }
  .store-page .store-desktop-loading { animation: none; }
}
