:root {
  color-scheme: dark;
  --ink: #f4f3ef;
  --muted: #adaeac;
  --paper: #161719;
  --panel: #202124;
  --line: #3c3d40;
  --accent: #f5a65e;
  --accent-active: #ffbd7f;
  --accent-ink: #16110d;
  --media: #292a2c;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .24em; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem max(4vw, calc((100vw - 80rem) / 2));
  background: #131416;
  color: var(--ink);
}
.site-header { min-height: 4.75rem; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: .65rem; font-size: 1.1rem; font-weight: 750; letter-spacing: .08em; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; background: var(--accent); clip-path: polygon(30% 0, 100% 0, 100% 70%, 70% 100%, 0 100%, 0 30%, 30% 30%, 30% 70%, 70% 70%, 70% 30%, 30% 30%); }
.site-header nav { display: flex; gap: clamp(.65rem, 4vw, 2.6rem); }
.site-header nav a { text-decoration: none; font-size: .95rem; color: var(--muted); }
.site-header nav a:hover, .site-footer a:hover { color: var(--ink); }
.cart-trigger { display: flex; align-items: center; gap: .7rem; color: inherit; background: var(--panel); border: 1px solid var(--line); padding: .55rem .8rem; border-radius: .25rem; white-space: nowrap; font-size: .9rem; }
.cart-trigger span { min-width: 1.3rem; text-align: center; color: var(--accent); font-weight: 750; font-variant-numeric: tabular-nums; }

.container { width: min(92%, 80rem); margin-inline: auto; }
.breadcrumb { display: flex; gap: .68rem; color: var(--muted); font-size: .875rem; margin: 0; padding: clamp(1.1rem, 3vw, 2rem) 0 1.25rem; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.product-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: clamp(1.8rem, 4.5vw, 4.5rem); align-items: start; }
.gallery { display: grid; grid-template-columns: 4.65rem minmax(0, 1fr); gap: .8rem; }
.media-surface { display: grid; background: var(--media); color: var(--muted); }
.gallery-main { grid-column: 2; grid-row: 1; width: 100%; aspect-ratio: 10 / 7; border: 1px solid var(--line); border-radius: .42rem; overflow: hidden; position: relative; padding: 0; }
.media-content { display: grid; min-height: 0; min-width: 0; place-items: stretch; overflow: hidden; }
.media-content img { display: block; width: 100%; height: 100%; min-height: 0; max-height: 100%; object-fit: contain; }
.gallery-main img.sample-photo, .thumbnail img.sample-photo { object-fit: cover; }
.placeholder { min-width: 0; display: grid; place-content: center; justify-items: center; gap: .55rem; margin: 7%; border: 1px dashed #66676b; border-radius: .3rem; font-weight: 650; }
.placeholder small { color: var(--muted); font-weight: 400; font-size: .9rem; }
.gallery-zoom { display: inline-flex; align-items: center; gap: .5rem; position: absolute; right: .8rem; bottom: .8rem; background: #161719e8; color: var(--ink); border: 1px solid #747377; border-radius: .25rem; padding: .45rem .65rem; font-size: .875rem; }
.gallery-main:hover .gallery-zoom { border-color: var(--accent); }
.expand-icon { width: .75rem; height: .75rem; border: 1px solid currentColor; border-radius: .1rem; box-shadow: .16rem -.16rem 0 -.06rem #161719, .16rem -.16rem currentColor; }
.thumbnails { grid-column: 1; grid-row: 1; align-self: start; display: grid; gap: .65rem; }
.thumbnail { aspect-ratio: 1; border: 1px solid var(--line); border-radius: .25rem; padding: 0; background: var(--media); color: var(--muted); }
.thumbnail:hover { border-color: var(--muted); }
.thumbnail[aria-pressed='true'] { border-color: var(--accent); outline: 1px solid var(--accent); }
.thumbnail .placeholder { font-size: .875rem; border: 0; }
.thumbnail .placeholder small, .cart-item .placeholder small { display: none; }
.gallery-caption { grid-column: 2; margin: 0; color: var(--muted); font-size: .875rem; }

.product-summary { padding-top: clamp(1.3rem, 5.5vw, 4.2rem); }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { font-size: clamp(2.25rem, 4vw, 4.15rem); line-height: 1.14; letter-spacing: -.045em; margin: 0; }
.price { font-family: 'Bahnschrift', 'Segoe UI', system-ui, sans-serif; font-size: 1.9rem; font-weight: 650; letter-spacing: -.025em; margin: 1.45rem 0 1.35rem; font-variant-numeric: tabular-nums; }
.summary-copy, .detail-content p { color: var(--muted); line-height: 1.8; }
.summary-copy { margin: .95rem 0 0; max-width: 25rem; }
.order-form { padding-top: 1rem; border-top: 1px solid var(--line); }
.order-form label { display: block; font-size: .9rem; font-weight: 650; margin-bottom: .7rem; }
.order-controls { display: flex; flex-wrap: wrap; gap: .7rem; }
.quantity-control { display: grid; grid-template-columns: repeat(3, 2.45rem); border: 1px solid var(--line); border-radius: .25rem; background: var(--panel); }
.quantity-control button, .quantity-control input { min-width: 0; min-height: 3.05rem; text-align: center; color: var(--ink); border: 0; background: transparent; }
.quantity-control input { appearance: textfield; }
.quantity-control input::-webkit-inner-spin-button, .quantity-control input::-webkit-outer-spin-button { appearance: none; }
.quantity-control button:hover { background: var(--media); }
.primary-button { flex: 1; min-height: 3.12rem; border: 1px solid transparent; border-radius: .25rem; padding: .65rem 1.1rem; background: var(--accent); color: var(--accent-ink); font-weight: 750; }
.primary-button:hover { background: var(--accent-active); }
.form-message { color: var(--accent); margin: .5rem 0; font-size: .9rem; }
.form-message:empty { margin: 0; }
.product-links { padding: 1.2rem 0 0; display: flex; gap: 1.6rem; align-items: center; color: var(--muted); }
.product-links a, .product-links button { font-size: .95rem; }
.product-links a:hover, .product-links button:hover { color: var(--ink); }
.product-links button { border: 0; padding: .25rem 0; background: transparent; color: inherit; text-decoration: underline; text-underline-offset: .24em; }
.share-fallback { margin-top: .65rem; display: grid; gap: .35rem; }
.share-fallback input { width: 100%; padding: .5rem; border: 1px solid var(--line); }

.detail-section { display: grid; grid-template-columns: minmax(9rem, .75fr) minmax(0, 2fr); gap: clamp(1rem, 5vw, 4rem); margin: clamp(2.6rem, 5vw, 4.4rem) 0; padding: clamp(1.2rem, 3.5vw, 2.7rem); background: var(--panel); border: 1px solid var(--line); border-radius: .42rem; }
.detail-section h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); }
.detail-content p { margin: 0 0 1rem; }
.detail-content details { border-top: 1px solid var(--line); }
.detail-content details:last-child { border-bottom: 1px solid var(--line); }
.detail-content summary { cursor: pointer; padding: .9rem 0; font-weight: 700; }
.detail-content dl { margin: 0 0 1rem; }
.detail-content dl div { display: grid; grid-template-columns: minmax(6rem,1fr) 3fr; gap: .5rem; padding: .45rem .75rem; }
.detail-content dl div:nth-child(odd) { background: var(--media); }
.detail-content dd { color: var(--muted); margin: 0; }
.detail-content ul { margin: 0 0 1rem; padding-left: 1.5rem; color: var(--muted); line-height: 1.7; }
.site-footer { min-height: 5rem; border-top: 1px solid var(--line); }
.site-footer > a { font-size: .9rem; color: var(--muted); }

dialog { border: 1px solid var(--line); color: var(--ink); background: var(--paper); border-radius: .55rem; padding: 1rem; }
dialog::backdrop { background: #09090bd9; }
.dialog-heading, .image-controls, .cart-footer > div { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.dialog-heading { margin-bottom: .85rem; }
.dialog-heading h2 { margin: 0; font-size: 1.25rem; }
.close-button { width: 2.35rem; height: 2.35rem; border: 1px solid var(--line); border-radius: .3rem; background: transparent; color: var(--ink); font-size: 1.4rem; line-height: 1; }
.image-dialog { width: min(90vw, 54rem); }
.image-dialog .media-surface { height: min(64vh, 38rem); }
.image-controls { margin-top: .85rem; }
.image-controls button, .cart-item-controls button { border: 1px solid var(--line); border-radius: .3rem; padding: .45rem .6rem; background: transparent; color: var(--ink); }
.cart-dialog { margin: 0 0 0 auto; width: min(100%, 27rem); height: 100%; max-height: none; border-radius: 0; }
.cart-dialog[open] { display: flex; flex-direction: column; }
.cart-item { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: .75rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.cart-item h3 { margin: 0; font-size: 1rem; }
.cart-item p { margin: .45rem 0; color: var(--muted); }
.cart-item .media-content { font-size: .875rem; }
.cart-item .placeholder { padding: .25rem; text-align: center; }
.cart-item-controls { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.cart-footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); }
.cart-footer p { font-size: .9rem; color: var(--muted); }
.cart-footer button { width: 100%; }

@media (max-width: 48rem) {
  .product-layout, .detail-section { grid-template-columns: 1fr; }
  .product-layout { gap: 1.55rem; }
  .product-summary { padding: 0; }
  .detail-section { gap: 1rem; }
}
@media (max-width: 36rem) {
  .gallery { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
  .gallery-main, .thumbnails, .gallery-caption { grid-column: 1; grid-row: auto; }
  .thumbnails { grid-template-columns: repeat(auto-fit, minmax(3.4rem, 4.5rem)); }
}
@media (max-width: 34rem) {
  .site-header, .site-footer { gap: .5rem; }
  .site-header .wordmark { font-size: .95rem; letter-spacing: .025em; gap: .4rem; white-space: normal; }
  .site-header nav a:first-child { display: none; }
  .cart-trigger { gap: .35rem; padding-inline: .55rem; }
  .thumbnail .placeholder { font-size: .8rem; }
}
