/* Shared storefront controls and responsive layout. */
.storefront-sr-only,
.storefront-skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.storefront-skip:focus {
  position: fixed;
  z-index: 10019;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
}

:where(.page-shell, #site-header, #site-footer, .vyse-promo-dialog, .reviews-dialog) :is(a, button, input, select, textarea):focus-visible {
  outline: 2px solid #713bd3;
  outline-offset: 3px;
}

.dark-mode :where(.page-shell, #site-header, #site-footer, .vyse-promo-dialog, .reviews-dialog) :is(a, button, input, select, textarea):focus-visible {
  outline-color: #c5a7ff;
}

/* These containers receive focus from skip links, search, and dismissed dialogs. */
.home-shell:focus, .home-shell .catalog-section:focus { outline: none; }

.catalog-section { scroll-margin-top: 22px; }
.catalog-heading { gap: 10px; margin-bottom: 14px; }
.catalog-heading h2 { font-size: clamp(22px, 3vw, 32px); text-transform: none; }
.catalog-heading .heading-mark { display: none; }
.catalog-heading .count-pill:empty { display: none; }
.category-carousel {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
  margin-bottom: 14px;
}
.home-shell .category-strip {
  display: flex;
  flex: 1;
  flex-wrap: nowrap;
  min-width: 0;
  overflow-x: auto;
  padding: 4px;
  margin: 0;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.home-shell .category-strip::-webkit-scrollbar { display: none; }
.home-shell .category-chip { flex: 0 0 auto; min-height: 44px; font-size: 12px; }
.category-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--soft);
  color: var(--ink);
  cursor: pointer;
}
.category-arrow[hidden] { display: none; }
.category-arrow[aria-disabled="true"] { opacity: .55; cursor: default; }
.category-arrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}
#categoryPrevious::before { transform: rotate(-135deg); }
.catalog-loading, .home-shell .empty-state {
  padding: 26px 16px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--muted);
  text-align: center;
}
.catalog-loading[hidden], .catalog-reset[hidden], .home-shell .hero-dots[hidden] { display: none; }
.catalog-reset {
  min-height: 44px;
  margin-top: 12px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.home-shell .hero-dots { gap: 4px; padding: 2px 0 0; }
.home-shell .hero-dot, .home-shell .hero-dot.active {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}
.hero-dot::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 8px;
  background: #a095b4;
}
.hero-dot.active::before { width: 20px; background: var(--blue); }

.home-shell .product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  transition: border-color .18s, box-shadow .18s;
}
.home-shell .product-card-image { flex: none; }
.home-shell .instant-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 14px 4px 8px;
  background: var(--product-accent);
  color: #fff;
  font-size: 11px;
}
.home-shell .instant-badge > svg.lucide { margin: 0; }
.home-shell .product-card-info {
  flex: 1;
  padding: 9px 8px 11px;
  gap: 2px;
  background: #edf1f8;
}
.dark-mode .home-shell .product-card-info { background: #1d293b; }
.home-shell .product-category { color: var(--ink); font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.home-shell .product-name { color: var(--muted); font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.home-shell .vyse-card-social { gap: 5px 7px; }
.home-shell .vyse-card-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-color: #a5adbb;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  white-space: normal;
}
.home-shell .vyse-card-rating::first-letter { color: inherit; }
.home-shell .vyse-rating-star { color: #a36b00; font-size: 13px; line-height: 1; }
.dark-mode .home-shell .vyse-card-rating { border-color: #68768c; }
.dark-mode .home-shell .vyse-rating-star { color: #ffc84c; }
.home-shell .vyse-card-social .product-sales { color: var(--muted); font-size: 11px; white-space: normal; }
@media (hover: hover) {
  .home-shell .product-card:hover { border-color: var(--blue); box-shadow: 0 6px 20px #55378a20; }
}

.vyse-promo-dialog .vyse-promo-close-top,
.vyse-promo-dialog .vyse-promo-close-bottom,
.vyse-promo-hide-label,
.reviews-dialog #allReviewsClose,
.vyse-promo-code-chip,
.mobile-product-tabs button,
#applyPromo { min-height: 44px; }
.vyse-promo-dialog .vyse-promo-close-top, .reviews-dialog #allReviewsClose { min-width: 44px; }
.vyse-promo-hide-label { display: inline-flex; align-items: center; }
.vyse-promo-dialog :is(h2,p) { overflow-wrap: anywhere; }

#orderForm input { min-width: 0; font-size: 16px; }
#orderForm .promo-row { grid-template-columns: minmax(0, 1fr) auto; }
#orderForm .promo-row input { width: 100%; }
.checkout-field-error { margin: 4px 0 10px; color: #a01f3c; font-size: 13px; }
#orderForm input[aria-invalid="true"] { border-color: #b72747; }
.dark-mode .checkout-field-error { color: #ff9eb4; }
.summary-line b, .summary-total strong { text-align: right; overflow-wrap: anywhere; }
.primary-order-btn:disabled { cursor: wait; opacity: .8; }

@media (max-width: 760px) {
  .home-shell .quick-list { gap: 8px; }
  .home-shell .quick-card { min-height: 54px; }
  .home-shell .quick-card span { font-size: 11px; overflow-wrap: anywhere; }
  .home-shell .category-strip { gap: 7px; }
  .bottom-nav-item span { font-size: 11px; }
  .mobile-drawer .drawer-close, #mobileMenu, #themeToggle { min-width: 44px; min-height: 44px; }
  :where(input, select, textarea, button, a):focus { scroll-margin-bottom: calc(80px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .home-shell .product-card, .home-shell .quick-card img, .home-shell .category-chip-icon {
    animation: none !important;
    transition: none !important;
  }
}

.product-page-status {
  padding: clamp(20px, 4vw, 34px);
  margin-block: 12px 36px;
}
.product-page-status h1 { margin: 0; font-size: clamp(22px, 3vw, 32px); }
.product-page-status p { color: var(--muted); }
.product-page-status a:not([hidden]) { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); font-weight: 700; }
.product-page-status[hidden], #productContent[hidden] { display: none; }
