html.dark { color-scheme: dark; }

#ht-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.8) !important;
  z-index: 100 !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
#ht-overlay[data-state="open"],
#ht-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#ht-drawer {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  width: min(18rem, 75vw) !important;
  max-width: 18rem;
  height: 100% !important;
  background: hsl(var(--background, 240 10% 4%)) !important;
  color: hsl(var(--foreground, 0 0% 98%));
  z-index: 101 !important;
  padding: 0.75rem 0.75rem 1.25rem;
  overflow: auto;
  border-right: 1px solid hsl(var(--border, 240 4% 16%));
  transform: translateX(-100%) !important;
  transition: transform 0.3s ease !important;
  display: flex !important;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  visibility: visible;
}
#ht-drawer[data-state="open"],
#ht-drawer.open {
  transform: translateX(0) !important;
}
#ht-drawer .ht-drawer-title {
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0 0.75rem 0.75rem;
}
#ht-drawer > a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
#ht-drawer > a > button {
  width: 100%;
  justify-content: flex-start;
}

#ht-search-panel {
  display: none;
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  top: 3.5rem;
  z-index: 30;
}
header.sticky { position: sticky; }
#ht-search-panel.open { display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

label:has(input[name="productId"]:checked),
label:has(input[name="paymentMethod"]:checked),
[role="radio"]:has(input[name="paymentMethod"]:checked) {
  box-shadow: 0 0 0 2px hsl(var(--my-color, 262 83% 58%)), 0 0 0 4px hsl(var(--background, 240 10% 4%));
  border-color: transparent;
  opacity: 1 !important;
}

.ht-desc-panel {
  padding: 0 1rem 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: hsl(var(--muted-foreground, 240 5% 65%));
}
.ht-desc-panel.hidden { display: none; }

.ht-pay-open {
  max-height: 80rem !important;
  opacity: 1 !important;
  overflow: visible !important;
  padding-bottom: 1rem;
}
