/* Product page only: keep the gallery in view while the configuration scrolls. */
@media (min-width: 801px) {
  .product-layout { align-items: stretch; }
  .product-layout .product-left {
    position: sticky;
    top: 106px;
    align-self: start;
    min-width: 0;
    height: calc(100svh - 118px);
    display: flex;
    flex-direction: column;
  }
  .product-layout .gallery { flex: none; }
  .product-layout .gallery-main,
  .product-layout .gallery-main > .product-photo,
  .product-layout .gallery-main .real-photo {
    height: clamp(280px, calc(100svh - 460px), 490px);
    aspect-ratio: auto;
  }
  .product-layout .gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 9px 0 8px;
    padding: 2px 2px 7px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
  }
  .product-layout .gallery-thumbs button {
    flex: 0 0 74px;
    scroll-snap-align: start;
    min-height: 76px;
    padding: 3px;
  }
  .product-layout .gallery-thumbs .real-photo { height: 66px; }
  .product-layout .product-specs { margin-top: 12px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .product-layout .spec-list { margin-bottom: 8px; }
  .product-layout .spec-list > div { padding: 5px 0; }
}

/* Tighter spacing without shrinking labels or tap targets. */
.product-layout .product-config { padding: clamp(20px, 2.2vw, 30px); }
.product-layout .product-config > .eyebrow { margin-bottom: 10px; }
.product-layout .product-config > h1 { margin-bottom: 10px; }
.product-layout .product-description { line-height: 1.6; margin-bottom: 10px; }
.product-layout .product-description-intro{margin:0 0 9px;max-width:52ch;line-height:1.55;color:#38434b}
.product-layout .product-description-disclosure{border-top:1px solid #e4e9ec;border-bottom:1px solid #e4e9ec}
.product-layout .product-description-disclosure>summary{display:flex;align-items:center;min-height:44px;color:#00447e;font-size:.8rem;font-weight:600;cursor:pointer;list-style:none}
.product-layout .product-description-disclosure>summary::-webkit-details-marker{display:none}
.product-layout .product-description-disclosure>summary::after{content:'+';margin-left:auto;font-size:1.1rem;font-weight:400}
.product-layout .product-description-disclosure[open]>summary::after{content:'−'}
.product-layout .product-description-disclosure>summary:focus-visible{outline:2px solid #2872b3;outline-offset:2px}
.product-layout .product-description-details{display:grid;gap:0;margin:0;padding:0;border-top:1px solid #e4e9ec}
.product-layout .product-description-details>div{display:grid;grid-template-columns:minmax(100px,32%) minmax(0,1fr);gap:10px;padding:8px 0;border-bottom:1px solid #e4e9ec}
.product-layout .product-description-details dt{color:#66737c;font-size:.76rem;font-weight:600}
.product-layout .product-description-details dd{margin:0;color:#252b2f;font-size:.78rem;line-height:1.45}
.product-layout .product-description-extra{margin:8px 0;font-size:.78rem}
.product-layout .product-facts { padding-bottom: 10px; margin: 8px 0 0; }
.product-layout .step-title { margin: 20px 0 7px; }
.product-layout .field-caption { line-height: 1.5; margin-bottom: 9px; }
.product-layout .swatches { gap: 8px; margin: 12px 0; }
.product-layout .color-name { margin-bottom: 10px; }
.product-layout .quantity-row { padding: 12px; margin: 7px 0 10px; border-radius: 18px; }
.product-layout .quantity-color { margin-bottom: 10px; }
.product-layout .size-quantity { padding: 8px 6px 7px; }
.product-layout .purchase-mode { margin: 18px 0; padding: 16px; gap: 8px; border-radius: 20px; }
.product-layout .purchase-mode legend { margin-bottom: 4px; }
.product-layout .purchase-mode label { min-height: 68px; padding: 10px 42px 10px 14px; border-radius: 14px; }
.product-layout .purchase-mode input { top: 13px; right: 13px; }
.product-layout .purchase-mode { position: relative; background: var(--ink); color: #fff; }
.product-layout .purchase-mode .purchase-mode-legend { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.product-layout .purchase-mode .purchase-mode-title { grid-column: 1 / -1; margin: 0 0 6px; color: #fff; font-family: Montserrat, Arial, sans-serif; font-size: 1.1rem; font-weight: 600; line-height: 1.35; letter-spacing: -.03em; }
.product-layout .purchase-mode label { background: #30302e; border-color: #50504d; color: #fff; }
.product-layout .purchase-mode label:hover { background: #393936; box-shadow: 0 8px 22px #0002; }
.product-layout .purchase-mode label:has(input:checked) { background: #fff; border-color: #fff; color: var(--ink); box-shadow: 0 0 0 2px #fff5; }
.product-layout .purchase-mode strong { font-family: Montserrat, Arial, sans-serif; font-weight: 600; line-height: 1.35; }
.product-layout .purchase-mode small { color: #d5d5d2; line-height: 1.5; }
.product-layout .purchase-mode label:has(input:checked) small { color: #656560; }
.product-layout .purchase-mode input { border-color: #c5c5c2; background: transparent; }
.product-layout .purchase-mode input:checked { border-color: var(--blue); background: #fff; }
.product-layout .purchase-mode label:focus-within { outline-color: #a8d7fa; }
.product-layout .purchase-mode label:has(input:disabled) { opacity: .58; cursor: not-allowed; }
.product-layout .purchase-mode label:has(input:disabled):hover { background: #30302e; box-shadow: none; }
.silk-config { margin: 24px 0; }
.silk-config .field-caption { margin-bottom: 14px; }
.silk-application { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0 0 12px; padding: 18px; border: 1px solid #d3dce2; border-radius: 18px; background: #f8fafb; }
.silk-application legend { padding: 0 6px; color: var(--blue); font-weight: 600; }
.silk-application label { display: grid; gap: 6px; min-width: 0; font-size: .88rem; }
.silk-application :is(input,select) { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #ccd6dc; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; }
.silk-application :is(input,select):focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.silk-application .quiet-button { justify-self: start; }
.silk-type { align-self: center; margin: 0; font-size: .84rem; color: #4b5964; }
@media (max-width: 450px) { .silk-application { padding: 14px; gap: 10px; } }
.product-layout .pricing-panel { margin: 14px 0 16px; padding: 17px; border-radius: 20px; }
.product-layout .pricing-heading { margin-bottom: 12px; }
.product-layout .price-tier { padding: 12px; }
.product-layout .positions { margin: 15px 0 12px; gap: 8px; }
.product-layout .dtf-calculator,
.product-layout .technique-consultation,
.product-layout .art-info { border-radius: 18px; }
.product-layout .dtf-calculator{padding:12px 15px;margin-block:8px}
.product-layout .dtf-heading{align-items:center}
.product-layout .dtf-heading h3{line-height:1.25}
.product-layout .dtf-heading>span{padding:4px 7px}
.product-layout .dtf-intro{margin:8px 0 10px}
.product-layout .dtf-measures{gap:8px}
.product-layout .dtf-measures input{min-height:44px;margin-top:4px;padding:7px 10px;font-size:1.15rem;line-height:1.2}
.product-layout .dtf-measures>span{margin-top:16px}
.product-layout .dtf-result{gap:10px;margin-top:12px;padding-top:11px}
.product-layout .dtf-result>div{gap:3px}
.product-layout .dtf-result strong{font-size:1.5rem;line-height:1.1}
.product-layout .dtf-result strong small{font-size:.75rem}
.product-layout .dtf-result span,.product-layout .dtf-result small{font-size:.7rem;line-height:1.35}
.product-layout .art-info small{font-weight:700;color:var(--ink)}
.product-layout .item-summary { padding: 18px; border-radius: 20px; }
.product-layout .field-caption,.product-layout .dtf-intro,.product-layout .dtf-disclaimer{font-size:.8rem;line-height:1.5}
.product-layout .purchase-mode strong,.product-layout .dtf-heading h3{font-size:.9rem}
.product-layout .purchase-mode small,.product-layout .dtf-measures label{font-size:.76rem}
.item-summary .color-summary{border-top:1px solid #ffffff38;padding:12px 0}.item-summary .color-summary>strong{font-size:.82rem}.item-summary .color-summary p{margin:5px 0;font-size:.75rem;color:#d9e2e7}.item-summary .color-summary small{margin:2px 0 0;color:#cfdce5}
.color-price-breakdown{display:grid;gap:12px;margin-top:14px}
.color-price-card{padding:15px;border:1px solid #ffffff3d;border-radius:14px;background:#ffffff0d}
.color-price-head,.color-price-row,.color-price-subtotal{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.color-price-head{align-items:center;padding-bottom:11px;border-bottom:1px solid #ffffff38}
.color-price-head strong{font-size:1rem}.color-price-head span{font-size:.72rem;text-align:right;color:#d9e2e7}
.color-price-row{padding-top:10px;font-size:.79rem}.color-price-row span small{display:block;margin-top:2px;color:#bccbd4;font-size:.7rem}
.color-price-subtotal{margin-top:12px;padding-top:12px;border-top:1px solid #ffffff60;font-size:.83rem;font-weight:600}
.color-price-subtotal strong{font-size:1.06rem;color:#d9f36b}
.cart-retail .color-price-card{border-color:#d5dfe4;background:#f5f8fa}
.cart-retail .color-price-head,.cart-retail .color-price-subtotal{border-color:#d1dce2}
.cart-retail .color-price-head span,.cart-retail .color-price-row span small{color:#52616c}
.cart-retail .color-price-subtotal strong{color:#00447e}
@media(max-width:450px){.color-price-card{padding:12px}.color-price-head{align-items:flex-start;flex-direction:column;gap:3px}.color-price-head span{text-align:left}}
.dtf-color-switcher{margin:12px 0 18px;padding:15px;border:1px solid #cbd9e2;border-radius:16px;background:#f4f8fa}
.dtf-color-title{display:flex;justify-content:space-between;align-items:baseline;gap:10px;color:#00447e}
.dtf-color-title small{font-size:.74rem;color:#52616c}
.dtf-color-options{display:flex;flex-wrap:wrap;gap:8px;margin-top:11px}
.dtf-color-options button{min-height:42px;padding:8px 12px;border:1px solid #b9ccd8;border-radius:10px;background:#fff;color:#00447e;font:inherit;font-size:.8rem;cursor:pointer}
.dtf-color-options button[aria-pressed="true"]{border-color:#00447e;background:#00447e;color:#fff}
.dtf-color-options button:focus-visible{outline:2px solid #2872b3;outline-offset:2px}
.dtf-color-note{margin:9px 0 0;color:#52616c;font-size:.75rem}
@media(max-width:450px){.dtf-color-switcher{padding:12px}.dtf-color-title{flex-direction:column;gap:2px}.dtf-color-options button{flex:1 1 auto}}
.product-layout .quote-flow { margin: 16px 0; }
.product-layout .simulator-block { margin: 15px 0 18px; padding: 16px 18px; }

/* One control language across product actions and option cards. */
.mobile-quote-bar { display: none; }
.product-layout :is(.button, .editor-open, .upload-button) {
  min-height: 48px;
  padding: 11px 18px;
  border-radius: 12px;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.35;
  transition: background-color .18s, border-color .18s, color .18s, transform .18s, box-shadow .18s;
}
.product-layout #product-form .button.full { min-height: 52px; border-radius: 12px; }
.product-layout :is(.button, .editor-open, .upload-button):hover:not(:disabled) { transform: translateY(-1px); }
.product-layout :is(.button, .editor-open, .upload-button):active:not(:disabled) { transform: translateY(0); box-shadow: none; }
.product-layout :is(.button, .editor-open, .upload-button):focus-visible,
.product-layout :is(.quiet-button, .swatch, .gallery-thumbs button, .quantity-adjust):focus-visible,
.product-layout :is(.positions label, .purchase-mode label):focus-within { outline: 3px solid #4b87b4; outline-offset: 2px; }
.product-layout :is(.button, .editor-open, .upload-button):disabled { opacity: .52; cursor: not-allowed; transform: none; box-shadow: none; }
.product-layout .editor-open { background: #00447e; color: #fff; border-color: #00447e; }
.product-layout .editor-open:hover:not(:disabled) { background: #003560; border-color: #003560; }
.product-layout .editor-open-note-disabled { color: #68727c; }
.product-layout .quiet-button { min-height: 40px; padding: 8px 10px; border-radius: 10px; font-size: .8rem; }
.product-layout .quiet-button:hover:not(:disabled) { background: #eef4f8; }
.product-layout .quiet-button:active:not(:disabled) { background: #e4edf4; }
.product-layout .quiet-button:disabled { opacity: .52; cursor: not-allowed; }
.product-layout .gallery-thumbs button { border-radius: 12px; }
.product-layout .positions label { min-height: 44px; padding: 10px 14px; border-radius: 12px; }
.product-layout .product-facts :is(span, a) { border-radius: 12px; }
.product-layout .quantity-control { border-radius: 12px; }

@media (max-width: 800px) {
  #main:has(.mobile-quote-bar) { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .mobile-quote-bar {
    position: fixed;
    z-index: 20;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 12px;
    box-sizing: border-box;
    display: flex;
    max-width: calc(100vw - 24px);
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 10px 12px;
    border: 1px solid #d6dde2;
    border-radius: 16px;
    background: #fffffff2;
    box-shadow: 0 8px 24px #071f3218;
  }
  .mobile-quote-bar-copy { display: grid; min-width: 0; gap: 2px; flex: 1; }
  .mobile-quote-bar-copy strong { overflow: hidden; color: var(--ink); font-size: .95rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-quote-bar-copy span { color: var(--muted); font-size: .72rem; line-height: 1.2; }
  .mobile-quote-bar .button { flex: 0 0 auto; min-height: 46px; padding: 10px 14px; font-size: .78rem; white-space: nowrap; }
  .product-layout .product-left { position: static; height: auto; display: contents; }
  .product-layout .gallery-main,
  .product-layout .gallery-main > .product-photo,
  .product-layout .gallery-main .real-photo { height: clamp(280px, 78vw, 350px); aspect-ratio: auto; }
  .product-layout .product-config { padding: 18px 16px; }
  .product-layout .step-title { margin-top: 18px; }
  .product-layout .purchase-mode { padding: 16px; }
  .product-layout .purchase-mode label { min-height: 72px; }
  .product-layout .pricing-panel { padding: 17px; }
  .product-layout :is(.button, .editor-open, .upload-button) { min-height: 48px; }
}
@media (max-width: 450px) {
  .mobile-quote-bar { gap: 9px; padding: 9px 10px; }
  .mobile-quote-bar .button { padding: 10px 12px; font-size: .74rem; }
  .product-layout { gap: 22px; }
  .product-layout .purchase-mode { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; }
  .product-layout .purchase-mode label { min-height: 72px; padding: 11px 33px 11px 11px; }
  .product-layout .purchase-mode input { top: 11px; right: 9px; width: 18px; height: 18px; }
  .product-layout .quantity-row { padding: 12px; }
  .product-layout .quantity-control { grid-template-columns: 36px minmax(20px, 1fr) 36px; }
  .product-layout .quantity-adjust { min-width: 36px; min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .product-layout :is(.button, .editor-open, .upload-button) { transition: none; }
  .product-layout :is(.button, .editor-open, .upload-button):hover { transform: none; }
}
/* Each configured color retains its own visual reference in the order review. */
.cart-color-photos {
  width: 120px;
  flex: 0 0 120px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.cart-color-photos > .product-photo {
  width: 100%;
  min-width: 0;
}

.cart-color-photos > .product-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

@media (max-width: 1100px) {
  .cart-color-photos {
    width: 90px;
    flex-basis: 90px;
  }
}

@media (max-width: 800px) {
  .cart-color-photos {
    width: 83px;
    flex-basis: 83px;
  }

  /* Let the first product enter the initial catalog viewport sooner. */
  .catalog-heading-inner {
    padding-top: 28px;
    padding-bottom: 24px;
  }

  .catalog-heading h1 {
    margin-top: 14px;
    margin-bottom: 16px;
  }

  .catalog-tools {
    padding-top: 16px;
    padding-bottom: 14px;
  }
}

/* Keep the final review actions reachable while its content scrolls. */
@media (max-width: 800px) {
  #review-dialog .actions:has(a.primary) {
    position: sticky;
    bottom: -24px;
    z-index: 2;
    margin: 16px -18px 0;
    padding: 12px 18px max(12px, env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -4px 14px rgba(0, 0, 0, .08);
  }
}

#checkout-form .checkout-review {
  margin: 12px 0 20px;
}
