#product-dialog,
#cart-dialog,
#checkout-dialog {
  --panel: #000;
  --inset: #000;
  --edge: #333;
  --panel-pad: clamp(18px, 3vw, 30px);
  width: min(900px, calc(100% - 36px));
  max-height: calc(100dvh - 36px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #000;
  border-radius: 10px;
  background: var(--panel);
  color: var(--paper);
  box-shadow: 0 18px 70px #0008;
}

#product-dialog[open],
#cart-dialog[open],
#checkout-dialog[open] {
  display: flex;
  flex-direction: column;
}

dialog::backdrop { background: #000b; }
body:has(dialog[open]) { overflow: hidden; }

.dialog-bar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px var(--panel-pad);
  border-bottom: 1px solid var(--edge);
}

.dialog-bar h2 { font-size: 22px; letter-spacing: -.035em; }

.close,
.gallery-nav,
.step-btn {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--edge);
  background: var(--inset);
  color: var(--paper);
}

.close,
.gallery-nav { width: 44px; height: 44px; border-radius: 50%; }
.close { font-size: 25px; line-height: 1; }
.close:hover,
.gallery-nav:hover,
.step-btn:not(:disabled):hover { border-color: var(--gold); color: var(--gold); }

.buy { display: flex; flex-direction: column; min-height: 0; }

.dialog-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--panel-pad);
  padding: var(--panel-pad);
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--edge) var(--panel);
}

.gallery { min-width: 0; }
.gallery-stage { position: relative; width: min(100%, max(240px, calc((100dvh - 330px) * 2 / 3))); aspect-ratio: 2 / 3; margin-inline: auto; overflow: hidden; background: #000; touch-action: pan-y; }
.gallery-photo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; }
.gallery-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.gallery-controls { display: flex; flex: none; order: 2; align-items: center; justify-content: center; gap: 8px; }
.gallery-nav { position: static; flex: none; background: #000; }
#gallery-prev svg { transform: rotate(180deg); }
.gallery-count { min-width: 30px; text-align: center; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.buy-details { align-self: center; display: grid; gap: 16px; min-width: 0; }
.buy-details h2 { font-size: clamp(26px, 4vw, 42px); letter-spacing: -.055em; line-height: 1.02; }
.buy-details .price { margin-top: 6px; font-size: 19px; }
.size-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.size-field legend,
.buy-quantity > span { font-size: 13px; font-weight: 700; }
.size-field legend { margin-bottom: 8px; padding: 0; }
.size-options { display: flex; flex-wrap: wrap; gap: 7px; }

.size-option {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  min-height: 44px;
  padding: 5px 10px;
  border: 1px solid var(--edge);
  background: var(--inset);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.size-option input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
.size-option:has(input:checked) { border-color: var(--gold); background: var(--gold); color: #21180e; }
.size-option:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 3px; }
.size-option:has(input:disabled) { border-style: dashed; color: var(--muted); text-decoration: line-through; cursor: default; }
.product-fit { width: fit-content; padding: 6px 10px; border: 1px solid var(--edge); color: var(--gold); font-size: 13px; }
.buy-quantity { display: flex; align-items: center; gap: 12px; justify-content: space-between; }

.quantity-stepper {
  display: inline-grid;
  grid-template-columns: 42px minmax(32px, auto) 42px;
  align-items: stretch;
  border: 1px solid var(--edge);
  background: var(--inset);
}

.quantity-stepper .step-btn { min-height: 42px; border: 0; border-radius: 0; font-size: 21px; line-height: 1; }
.step-btn:disabled { color: #828282; cursor: default; }
.quantity-stepper output { display: grid; place-items: center; padding: 0 5px; border-inline: 1px solid var(--edge); font-size: 14px; font-variant-numeric: tabular-nums; }
.stock-note { min-height: 1.3em; color: var(--muted); font-size: 12px; }

.dialog-actions {
  display: grid;
  flex: none;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--panel-pad);
  padding: 11px var(--panel-pad);
  border-top: 1px solid var(--edge);
  background: var(--panel);
}

.cart-actions .note { color: var(--muted); font-size: 12px; }
.dialog-actions .add { grid-column: 2; }

.add,
.keep-shopping,
.checkout-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 9px 14px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #21180e;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.add:not(:disabled):hover,
.keep-shopping:hover,
.checkout-button:hover { background: #ffe2ac; }
.add:disabled { border-color: var(--edge); background: #000; color: var(--muted); cursor: default; }
#add-total { white-space: nowrap; font-variant-numeric: tabular-nums; }

#cart-dialog,
#checkout-dialog { width: min(490px, calc(100% - 24px)); }
.bag-body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 16px var(--panel-pad); scrollbar-color: var(--edge) var(--panel); }
.cart-feedback { margin: 0 0 10px; padding: 8px 10px; border-left: 2px solid var(--gold); background: #000; color: var(--gold); font-size: 13px; }
.bag-list { margin: 0; padding: 0; list-style: none; }

.cart-item {
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr) auto;
  grid-template-areas: "photo main total" "photo controls controls";
  align-items: start;
  gap: 8px 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--edge);
}

.cart-photo { grid-area: photo; width: 55px; height: 70px; object-fit: cover; object-position: center 35%; }
.cart-item-main { grid-area: main; min-width: 0; display: grid; gap: 2px; }
.cart-item-name { font-size: 14px; line-height: 1.15; }
.cart-variant { color: var(--muted); font-size: 12px; }
.cart-item-controls { grid-area: controls; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cart-item-total { grid-area: total; color: var(--gold); font-size: 14px; white-space: nowrap; }
.bag-remove { min-height: 42px; padding: 5px 4px; border: 0; background: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: 12px; }
.bag-remove:hover { color: var(--paper); }
.bag-empty { display: grid; gap: 5px; padding: 12px 0; color: var(--muted); }
.bag-empty strong { color: var(--paper); }
#bag-totals { margin: 0 0 5px; text-align: left; }
.review-contact { margin: 12px 0; white-space: pre-line; overflow-wrap: anywhere; }
.bag-totals { display: grid; gap: 7px; margin: 17px 0 0; font-size: 14px; }
.bag-totals div { display: flex; justify-content: space-between; gap: 12px; }
.bag-totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.bag-totals .order-total { padding-top: 9px; border-top: 1px solid var(--edge); font-size: 17px; }
.cart-actions { flex: none; display: grid; gap: 7px; padding: 11px var(--panel-pad); border-top: 1px solid var(--edge); text-align: center; }
.keep-shopping { justify-content: center; }
.cart-actions:has(#checkout-start:not([hidden])) .keep-shopping,
.checkout-back {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid var(--edge);
  background: transparent;
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.cart-actions:has(#checkout-start:not([hidden])) .keep-shopping:hover,
.checkout-back:hover { border-color: var(--gold); color: var(--gold); }

.cart-rail { position: relative; height: 0; }

.floating-cart {
  position: absolute;
  top: calc((var(--storebar-height) - 42px) / 2);
  right: 0;
  display: inline-flex;
  align-items: stretch;
  min-height: 42px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--gold);
  border-radius: 5px;
  background: var(--gold);
  color: #21180e;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 5px 20px #0009;
}

.floating-cart:hover { background: #ffe2ac; }
.floating-cart-label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; }
.floating-cart-label svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.floating-cart-count { display: grid; place-items: center; min-width: 23px; min-height: 23px; padding-inline: 4px; border-radius: 50%; background: #000; color: var(--gold); font-size: 11px; font-variant-numeric: tabular-nums; }
.floating-cart-subtotal { display: grid; align-content: center; padding: 7px 10px; border-left: 1px solid #0003; background: #0001; font-variant-numeric: tabular-nums; }
body.opening .floating-cart,
body:has(dialog[open]) .floating-cart { visibility: hidden; }

.checkout-stage { display: flex; flex-direction: column; min-height: 0; }
.checkout-body { min-height: 0; padding: 17px var(--panel-pad); overflow: auto; overscroll-behavior: contain; }
.checkout-heading { margin-top: 4px; font-size: 24px; letter-spacing: -.035em; line-height: 1.15; }
.checkout-items { display: grid; margin: 10px 0 0; padding: 0; list-style: none; }
.checkout-line { display: flex; justify-content: space-between; align-items: start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--edge); font-size: 14px; }
.checkout-line-detail { min-width: 0; }
.checkout-line-variant { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.checkout-line-total { color: var(--gold); white-space: nowrap; }
.checkout-note { color: var(--muted); font-size: 13px; }

@media (max-width: 650px) {
  #product-dialog,
  #cart-dialog,
  #checkout-dialog {
    --panel-pad: 14px;
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 14px);
    margin: auto 0 0;
    border-radius: 14px 14px 0 0;
  }

  .dialog-bar { padding-block: 5px; }
  .dialog-body { grid-template-columns: minmax(0, 1fr); gap: 13px; padding-block: 10px 13px; }
  .gallery-stage { width: min(100%, 340px); }
  .buy-details { gap: 10px; }
  .buy-details .price { font-size: 17px; }
  .dialog-actions { grid-template-columns: minmax(0, 1fr); gap: 5px; padding-block: 8px max(8px, env(safe-area-inset-bottom)); }
  .dialog-actions .add { grid-column: 1; }
  .cart-actions { padding-bottom: max(11px, env(safe-area-inset-bottom)); }
}

#checkout-dialog { width: min(800px, calc(100% - 24px)); }
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start;
  gap: var(--panel-pad);
}
.checkout-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
}
.checkout-fields label,
.coupon-label { display: grid; gap: 5px; font-size: 13px; font-weight: 700; }
.checkout-fields .full-field { grid-column: 1 / -1; }
.checkout-fields label small { font-size: 12px; font-weight: 400; color: var(--muted); }
.checkout-fields input,
.checkout-fields select,
.coupon-entry input {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--edge);
  background: var(--inset);
  color: var(--paper);
  font: 16px Arial, sans-serif;
}
.checkout-fields :is(input,select):focus,
.coupon-entry input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.checkout-summary { padding: 14px; border: 1px solid var(--edge); background: var(--inset); }
.coupon-label { margin-top: 15px; }
.coupon-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-top: 5px; }
.coupon-entry button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--edge);
  background: var(--panel);
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}
.coupon-entry button:not(:disabled):hover { border-color: var(--gold); }
.checkout-button:disabled, .coupon-entry button:disabled { opacity: .65; cursor: default; }
#coupon-message { margin-top: 6px; }
#checkout-message { color: var(--gold); }
#checkout-message:empty, #coupon-message:empty { display: none; }
.payment-method { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--edge); font-size: 14px; }
.payment-method p { margin-top: 4px; }
.catalog-message { margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--rule); color: var(--gold); font-size: 14px; }
@media (max-width: 650px) {
  #checkout-dialog { width: 100%; }
  .checkout-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .checkout-body { padding-block: 12px; }
}

/* Let the header, content and actions share the available height on short screens. */
@media (max-height: 440px) {
  #cart-dialog,
  #checkout-dialog { overflow-y: auto; overscroll-behavior: contain; }
  #cart-dialog .bag-body,
  #checkout-dialog .checkout-stage { flex: none; }
  #cart-dialog .bag-body,
  #checkout-dialog .checkout-body { overflow: visible; }
}

/* Keep the complete product choice in one phone viewport. */
@media (max-width: 650px), (max-height: 500px) {
  #product-dialog { --panel-pad: 14px; max-height: calc(100dvh - 14px); }
  #product-dialog .dialog-bar { padding-block: 5px; }
  #product-dialog .dialog-body { gap: 8px; padding-block: 8px; }
  #product-dialog .gallery { --gallery-h: clamp(120px, calc(100dvh - 360px - env(safe-area-inset-bottom)), 480px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: center; }
  #product-dialog .gallery-stage { grid-column: 1; grid-row: 1; width: min(100%, calc(var(--gallery-h) * 2 / 3)); height: auto; }
  #product-dialog .gallery-meta { display: contents; }
  #product-dialog .gallery-controls { grid-column: 1 / -1; grid-row: 2; }
  #product-dialog .buy-details { gap: 6px; align-self: center; }
  #product-dialog .buy-details > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  #product-dialog .buy-details h2 { font-size: clamp(20px, 5.5vw, 24px); line-height: 1.1; }
  #product-dialog .buy-details .price { margin: 0; white-space: nowrap; font-size: 17px; }
  #product-dialog .size-field legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #product-dialog .size-options { gap: 6px; }
  #product-dialog .size-options::before { content: 'Size'; align-self: center; margin-right: 3px; font-size: 12px; font-weight: 700; }
  #product-dialog .size-option { min-width: 44px; min-height: 44px; padding: 4px 8px; }
  #product-dialog .stock-note { font-size: 11px; }
  #product-dialog .dialog-actions { padding-block: 6px max(6px, env(safe-area-inset-bottom)); }
  #product-dialog .add { min-height: 44px; }
  #product-dialog .product-fit { margin: 0; padding-block: 3px; }
}
@media (min-width: 501px) and (max-height: 500px) and (orientation: landscape) {
  #product-dialog .dialog-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
  #product-dialog .gallery { --gallery-h: clamp(100px, calc(100dvh - 210px), 220px); }
  #product-dialog .dialog-actions { padding-block: 6px; }
  #product-dialog .buy-details h2 { font-size: 20px; }
}

/* Rounded controls keep the original product and touch-target dimensions. */
#product-dialog .dialog-bar { position: absolute; top: 8px; right: 8px; z-index: 3; padding: 0; border: 0; }
:is(#product-dialog, #checkout-dialog, #cart-dialog) .close { display: grid; place-items: center; border: 3px solid #d9b575; background: #18130b; color: #e9cb92; box-shadow: 0 -1px 0 1px #f6e1b8, 0 2px 0 1px #6a4b1f, inset 0 2px 5px #000, 0 5px 9px #0009; transition: transform 120ms ease, filter 120ms ease; }
:is(#product-dialog, #checkout-dialog, #cart-dialog) .close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
:is(#product-dialog, #checkout-dialog, #cart-dialog) .close:hover { color: #e9cb92; border-color: #d9b575; filter: brightness(1.08); }
:is(#product-dialog, #checkout-dialog, #cart-dialog) .close:active { transform: translateY(2px); }
:is(#product-dialog, #checkout-dialog, #cart-dialog) .close:focus-visible { outline: 2px solid #e9cb92; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { :is(#product-dialog, #checkout-dialog, #cart-dialog) .close { transition: none; } }
#product-dialog .gallery-nav { border-color: transparent; background: transparent; }
#product-dialog .size-option { border-color: #555; border-radius: 8px; background: #000; color: #ccc; font-weight: 400; }
#product-dialog .size-option:has(input:checked) { border-color: var(--gold); color: var(--gold); background: #000; }
#product-dialog .size-option:has(input:disabled) { color: #666; }
#product-dialog .size-option:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
#product-dialog .buy-quantity { display: grid; grid-template-columns: auto; justify-content: end; gap: 0; }
#product-dialog .buy-quantity > span { text-align: center; font-size: 11px; font-weight: 400; line-height: 1; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
#product-dialog .quantity-stepper { border-color: transparent; background: transparent; }
#product-dialog .quantity-stepper .step-btn { border: 1px solid var(--gold); border-radius: 50%; background: var(--gold); color: #21180e; font-weight: 400; }
#product-dialog .quantity-stepper .step-btn:disabled { opacity: .45; }
#product-dialog .quantity-stepper .step-btn:not(:disabled):hover { border-color: #ffe2ac; background: #ffe2ac; color: #21180e; }
#product-dialog .quantity-stepper .step-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
#product-dialog .quantity-stepper output { border-color: transparent; }
#product-dialog .product-fit { border-color: transparent; color: var(--muted); }
#product-dialog .dialog-actions { border-color: transparent; padding-bottom: max(14px, calc(env(safe-area-inset-bottom) + 8px)); }
#product-dialog .add { border-radius: 4px; }
#product-dialog .add-main { display: inline-flex; align-items: center; gap: 9px; }
#product-dialog .add-main svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
#product-dialog #add-total { font-weight: 400; }

@media (min-width: 501px) and (max-height: 500px) and (orientation: landscape) {
  #product-dialog .dialog-bar { left: 8px; right: auto; }
}

/* A little breathing room below the product name and price. */
#product-dialog .size-field { margin-top: 18px; }

/* Suppress Android browser tap flash on photos; keep keyboard focus styles. */
.product-open, .product-open img, #product-dialog .gallery-stage, #product-dialog .gallery-photo { -webkit-tap-highlight-color: transparent; }

/* Approved smoked-glass product actions; decorative layers preserve the hit target. */
.product-open .view { position: relative; isolation: isolate; border: 0; border-radius: 11px; background: transparent; color: #f2e6d0; transition: transform 130ms ease; }
.product-open .view-depth { position: absolute; inset: 1px 0 -4px; z-index: -3; border-radius: 11px; background: linear-gradient(180deg, #b39460, #8c6937 60%, #493218); box-shadow: 0 4px 6px #000, inset 0 -1px 1px #241504; transition: transform 130ms ease; pointer-events: none; }
.product-open .view-surface { position: absolute; inset: 0; z-index: -2; border-radius: 11px; border: 1px solid #766b594d; background: linear-gradient(0deg, #e9be7055 0%, #9e703320 12%, transparent 30%), radial-gradient(ellipse at 9% 10%, #b4b0a957 0%, #6a656126 16%, transparent 38%), linear-gradient(180deg, #242322 0%, #10100f 28%, #060606 55%, #100f0c 79%, #48361a 100%); box-shadow: inset 0 1px 1px #fff4, inset 1px 0 1px #fff2, inset -1px 0 1px #fff1, inset 0 -2px 3px #efcf8b66; pointer-events: none; }
.product-open .view-light { position: absolute; inset: 2px 4px 50% 4px; z-index: -1; overflow: hidden; border-radius: 9px 9px 16px 8px; background: linear-gradient(155deg, #fff8 0%, #ffffff29 8%, #ffffff03 29%, transparent 52%); pointer-events: none; }
.product-open .view-light::after { content: ''; position: absolute; top: 0; left: 10%; width: 65%; height: 1px; background: linear-gradient(90deg, transparent, #fff8, transparent); }
.product-open .view-label { padding-left: 10px; padding-right: 3px; white-space: nowrap; text-shadow: 0 1px 2px #000, 0 -1px 0 #fff1; }
.products .product-open .view-icon,
.products .product-open:is(:hover,:focus-visible) .view-icon { border: 0; background: transparent; color: #f0d49c; }
.product-open .view-icon svg { filter: drop-shadow(0 1px 1px #000); }
.product-open:hover .view-surface { filter: brightness(1.15); }
.product-open:active .view { transform: translateY(3px); }
.product-open:active .view-depth { transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .product-open .view, .product-open .view-depth { transition: none; } }

/* Filled companion to the approved glass action; no changes to control geometry. */
#product-dialog .add:not(:disabled),
#product-dialog .quantity-stepper .step-btn,
#product-dialog .size-option:not(:has(input:disabled)),
#previous-drops .vault-link .vault-action {
  color: #2d200d;
  --filled-glass-face: linear-gradient(155deg, #fff9 0%, #ffffff25 9%, transparent 31%), linear-gradient(0deg, #f6dcaa66, transparent 30%), linear-gradient(180deg, #efdcb6 0%, #e6c78f 29%, #d5ad6b 69%, #c49a56 85%, #e9c78c 100%);
  background: var(--filled-glass-face);
  box-shadow: inset 0 1px 1px #fff8, inset 1px 0 1px #fff3, inset -1px 0 1px #5e3c1622, inset 0 -2px 3px #fff2, 0 3px 0 #80602f, 0 4px 0 1px #382a15, 0 6px 9px #0008;
  text-shadow: 0 1px 0 #ffffff35;
  transition: transform 130ms ease, box-shadow 130ms ease, filter 130ms ease;
}
#product-dialog .add:not(:disabled),
#product-dialog .quantity-stepper .step-btn,
#product-dialog .size-option:not(:has(input:disabled)) { border-color: #c5aa7a; }
#product-dialog .add { border-radius: 10px; }
#previous-drops .vault-link .vault-action { border-radius: 10px; }
#product-dialog .add:not(:disabled):hover,
#product-dialog .quantity-stepper .step-btn:not(:disabled):hover,
#product-dialog .size-option:not(:has(input:disabled)):hover,
#previous-drops .vault-link:is(:hover,:focus-visible) .vault-action { background: var(--filled-glass-face); filter: brightness(1.06); }
#product-dialog .size-option:has(input:checked):not(:has(input:disabled)) {
  color: #211606; border-color: #9e783f;
  --filled-glass-face: linear-gradient(180deg, #c49855, #e7c78e 72%, #f0d8a8);
  background: var(--filled-glass-face);
  box-shadow: inset 0 2px 4px #51340d80, inset 0 -1px 1px #fff8, 0 1px 0 #80602f;
  outline: 1px solid #e9cb92; outline-offset: 2px;
}
#product-dialog .size-option:has(input:focus-visible):not(:has(input:disabled)) { outline: 2px solid #e9cb92; outline-offset: 4px; }
#product-dialog .size-option:has(input:disabled) { background: #000; color: #666; border-color: #333; box-shadow: none; text-shadow: none; }
#product-dialog .add:not(:disabled):active,
#product-dialog .quantity-stepper .step-btn:not(:disabled):active,
#product-dialog .size-option:not(:has(input:disabled)):active,
#previous-drops .vault-link:active .vault-action { transform: translateY(2px); box-shadow: inset 0 2px 4px #68451b55, inset 0 -1px 1px #fff4, 0 1px 0 #80602f; }
@media (prefers-reduced-motion: reduce) {
  #product-dialog .add,
  #product-dialog .quantity-stepper .step-btn,
  #product-dialog .size-option,
  #previous-drops .vault-link .vault-action { transition: none; }
}

/* Keep native mobile tap flash off every storefront action, including radio labels. */
button, button *, a, a *, .size-option, .size-option * { -webkit-tap-highlight-color: transparent; }

/* Sizes stay black until selected; retain the filled gold selected finish. */
#product-dialog .size-option:not(:has(input:checked)):not(:has(input:disabled)),
#product-dialog .size-option:not(:has(input:checked)):not(:has(input:disabled)):hover {
  color: #eee;
  --filled-glass-face: linear-gradient(155deg, #ffffff12 0%, transparent 32%), linear-gradient(180deg, #151413, #000 55%, #0c0a07);
  background: var(--filled-glass-face);
  border-color: #655b4b;
  box-shadow: inset 0 1px 1px #ffffff25, inset 0 -1px 1px #e9cb9222, 0 2px 0 #30281b;
  text-shadow: 0 1px 1px #000;
}

/* Selection is communicated by the gold fill, without an outside gold rim. */
#product-dialog .size-option:not(:has(input:checked)):not(:has(input:disabled)),
#product-dialog .size-option:not(:has(input:checked)):not(:has(input:disabled)):hover {
  border-color: #333;
  box-shadow: inset 0 1px 1px #ffffff20, inset 0 -1px 1px #ffffff0a, 0 2px 0 #161616;
}
#product-dialog .size-option:has(input:checked):not(:has(input:disabled)) {
  outline: none;
  border-color: transparent;
  box-shadow: inset 0 1px 1px #fff6, inset 0 -2px 2px #76512144, 0 2px 0 #4e391d;
}
#product-dialog .size-option:has(input:focus-visible):not(:has(input:disabled)) { outline: 2px solid #eee; outline-offset: 4px; }

/* Approved flush glass finish: retain gradients, remove raised underside strips. */
.product-open .view-depth { display: none; }
.product-open:active .view { transform: none; }
.product-open:active .view-surface { filter: brightness(.92); box-shadow: inset 0 2px 4px #0008, inset 0 -1px 2px #dbb36b55; }
#product-dialog .add:not(:disabled),
#product-dialog .quantity-stepper .step-btn,
#previous-drops .vault-link .vault-action {
  box-shadow: inset 0 1px 1px #fff8, inset 1px 0 1px #fff3, inset -1px 0 1px #5e3c1622, inset 0 -2px 3px #fff2;
}
#product-dialog .add:not(:disabled):active,
#product-dialog .quantity-stepper .step-btn:not(:disabled):active,
#previous-drops .vault-link:active .vault-action { transform: none; box-shadow: inset 0 2px 4px #68451b55, inset 0 -1px 1px #fff4; }

/* View product keeps its dark gradient and bottom glow without a top glint. */
.product-open .view-light { display: none; }
.product-open .view-surface {
  background: linear-gradient(0deg, #e9be7055 0%, #9e703320 12%, transparent 30%), linear-gradient(180deg, #242322 0%, #10100f 28%, #060606 55%, #100f0c 79%, #48361a 100%);
  box-shadow: inset 1px 0 1px #fff2, inset -1px 0 1px #fff1, inset 0 -2px 3px #efcf8b66;
}

/* Approved Soft glass product action: neutral edges and a broad, quiet reflection. */
.product-open .view { border-radius: 9px; }
.product-open .view-surface {
  border-radius: 9px; border-color: #292929;
  background: linear-gradient(180deg, #202020, #0d0d0d 57%, #171612);
  box-shadow: inset 0 -3px 8px #e9cb920a, inset 2px 0 5px #ffffff06, inset -2px 0 5px #ffffff06;
}
.product-open .view-light { display: block; inset: 1px; border-radius: inherit; opacity: .38; background: radial-gradient(ellipse at 50% 15%, #ffffff50, transparent 75%); }
.product-open .view-light::after { display: none; }
.product-open:hover .view-surface { filter: brightness(1.14); }
.product-open:active .view-surface { filter: brightness(.9); box-shadow: inset 0 3px 8px #000b; }

/* Approved checkout: tonal glass fields and spacing replace divider chrome. */
#checkout-dialog .dialog-bar { border-bottom-color: transparent; padding-block: 12px; }
#checkout-dialog .checkout-body { padding-top: 12px; }
#checkout-dialog .checkout-heading { font-size: 22px; letter-spacing: -.035em; }
#checkout-dialog .checkout-note { font-size: 12px; line-height: 1.45; }
#checkout-dialog .checkout-fields { gap: 13px; margin-top: 24px; }
#checkout-dialog .checkout-fields legend { margin-bottom: 12px; color: var(--gold); font-size: 12px; font-weight: 400; }
#checkout-dialog .checkout-fields[aria-label='Contact'] label { grid-column: 1 / -1; }
#checkout-dialog .checkout-fields label,
#checkout-dialog .coupon-label { font-size: 12px; font-weight: 400; color: #d3d3d3; gap: 6px; }
#checkout-dialog .checkout-fields input,
#checkout-dialog .checkout-fields select,
#checkout-dialog .coupon-entry input { min-height: 46px; padding: 11px 12px; border-color: transparent; border-radius: 10px; background: linear-gradient(180deg, #1a1a1a, #111 65%); box-shadow: inset 0 1px 3px #0008; color: #eee; }
#checkout-dialog input::placeholder { color: #888; }
#checkout-dialog .checkout-summary { padding: 0; border: 0; background: #000; }
#checkout-dialog .checkout-line { border-bottom: 0; padding-block: 16px; font-size: 13px; }
#checkout-dialog .checkout-line-variant { margin-top: 5px; }
#checkout-dialog .bag-totals { gap: 11px; font-size: 13px; margin-block: 18px 28px; }
#checkout-dialog .bag-totals dt { color: #aaa; }
#checkout-dialog .bag-totals .order-total { border: 0; padding-top: 9px; align-items: baseline; }
#checkout-dialog .order-total dt { color: #eee; font-size: 17px; }
#checkout-dialog #checkout-total { color: var(--gold); font-size: 23px; font-weight: 400; letter-spacing: -.6px; }
#checkout-dialog .payment-method { border: 0; padding-top: 0; color: var(--gold); }
#checkout-dialog .payment-method .checkout-note { color: #aaa; margin-top: 6px; }
#checkout-dialog .cart-actions { border-top-color: transparent; padding-block: 14px max(14px, env(safe-area-inset-bottom)); gap: 10px; }
#checkout-dialog .review-contact { margin-block: 20px; color: #ddd; overflow-wrap: anywhere; }
:is(#checkout-dialog, #cart-dialog) button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
#checkout-dialog .checkout-heading:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 650px) { #checkout-dialog .checkout-grid { gap: 24px; } #checkout-dialog .checkout-summary .checkout-heading { font-size: 20px; } }

/* Cart preview matches the approved checkout finish. */
#cart-dialog .dialog-bar { border-bottom-color: transparent; padding-block: 12px; }
#cart-dialog .cart-feedback { border: 0; border-radius: 9px; background: #12110e; padding: 10px 12px; font-size: 12px; line-height: 1.4; }
#cart-dialog .cart-item { border-bottom: 0; padding-block: 14px; }
#cart-dialog .cart-photo { border-radius: 6px; }
#cart-dialog .bag-remove { color: #aaa; text-decoration: none; }
#cart-dialog .bag-remove:hover { color: var(--gold); }
#cart-dialog .cart-actions { border-top-color: transparent; padding-block: 14px max(14px, env(safe-area-inset-bottom)); gap: 10px; }
#cart-dialog .bag-totals { gap: 11px; font-size: 13px; margin-bottom: 12px; }
#cart-dialog .bag-totals dt { color: #aaa; }
#cart-dialog .bag-totals .order-total { border: 0; padding-top: 9px; align-items: baseline; }
#cart-dialog .order-total dt { color: #eee; font-size: 15px; }
#cart-dialog .order-total dt strong { font-weight: 400; }
#cart-dialog #total { color: var(--gold); font-size: 23px; font-weight: 400; letter-spacing: -.6px; }


/* Transfer step inherits the approved checkout buttons, footer and glass finish. */
#checkout-dialog .transfer-details { display:grid; gap:16px; margin:24px 0; padding:18px; border-radius:10px; background:linear-gradient(180deg,#191919,#101010); }
#checkout-dialog .transfer-details dt { font-size:12px; color:#aaa; margin-bottom:5px; }
#checkout-dialog .transfer-details dd { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0; color:#eee; font-size:16px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
#checkout-dialog .transfer-details dd span { min-width:0; }
#checkout-dialog .transfer-details div:first-child dd { color:var(--gold); font-size:27px; }
#checkout-dialog .transfer-copy { flex:none; }
#checkout-dialog.payment-stage :is(.coupon-label,.coupon-entry,#coupon-message,.payment-method) { display:none; }
#checkout-dialog.payment-stage #place-order { justify-content:center; }
#checkout-dialog.payment-stage #place-order-label { white-space:normal; text-align:center; }

/* Clear payment instruction, with the existing button geometry preserved. */
#checkout-dialog #payment-heading { font-size:22px; font-weight:700; letter-spacing:-.3px; }
#checkout-dialog #payment-instructions { font-size:14px; line-height:1.5; font-weight:400; color:var(--paper); margin-block:12px 16px; }
#checkout-dialog.awaiting-transfer .checkout-summary { display:none; }
#checkout-dialog.awaiting-transfer .checkout-grid { grid-template-columns:1fr; }
#checkout-dialog.awaiting-transfer .transfer-details { gap:10px; margin:16px 0; padding:14px; }
#checkout-dialog.awaiting-transfer .transfer-details div:first-child dd { font-size:22px; }
#checkout-dialog .payment-confirm { display:flex; align-items:center; gap:12px; margin:0 0 8px; font-size:14px; line-height:1.5; cursor:pointer; }
#checkout-dialog .payment-confirm input { flex:none; width:20px; height:20px; accent-color:var(--gold); }
#checkout-dialog .transfer-details dd span { user-select:text; -webkit-user-select:text; }

/* Purchased-item photos appear on review, payment and submitted summaries. */
#checkout-dialog .checkout-line { display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:10px; align-items:start; }
#checkout-dialog .checkout-photo { display:block; width:48px; height:64px; object-fit:cover; object-position:center 35%; border-radius:6px; }
#checkout-dialog .checkout-line-name { overflow-wrap:anywhere; }
#checkout-dialog .checkout-line-no-photo { grid-template-columns:minmax(0,1fr) auto; }
@media (max-width:360px) {
  #checkout-dialog .checkout-line { column-gap:8px; }
  #checkout-dialog .checkout-line-total { grid-column:2 / -1; margin-top:0; }
  #checkout-dialog .checkout-photo { grid-row:1 / 3; }
  #checkout-dialog .checkout-line-no-photo .checkout-line-total { grid-column:1 / -1; margin-top:0; }
}
