/* A restrained black-and-white presentation for the catalog and order flow. */
:root {
  --ink: #111;
  --muted: #686868;
  --line: #dedede;
  --soft: #f5f5f5;
  --paper: #fff;
}

.site-header { background: #fff; border-color: #e4e4e4; }
.brand { font-weight: 650; letter-spacing: .035em; }
.brand-caption { color: #777; }
.catalog-heading h1 { font-weight: 520; letter-spacing: -.055em; }
.catalog-toolbar { border-color: #d8d8d8; }
.category-button[aria-pressed=true] { font-weight: 600; }
.search-field { border-color: #bdbdbd; }
.search-field:focus-within { border-color: #111; }
.catalog-footnote { justify-content: flex-start; color: #747474; }
.button, .filter-dialog-actions .button { border-radius: 2px; }
.button-secondary { border-color: #c8c8c8; }
.site-footer { border-color: #e4e4e4; }
.catalog-minimum { background: #fff; border-color: #dcdcdc; }
.catalog-minimum-track { background: #e8e8e8; }
.catalog-minimum-track > span { background: #111; }
.minimum-order-totals { display: block; }
#minimumAmount { color: #575757; }
#minimumAmount strong { color: #111; font-weight: 600; }

/* Desktop: product image followed by a compact, aligned wholesale summary. */
@media (min-width: 741px) {
  .product-grid { gap: 24px 18px; }
  .product-card {
    padding: 7px;
    border: 1px solid #e4e4e4;
    border-radius: 3px;
    background: #fff;
    box-shadow: none;
  }
  .product-card:hover { box-shadow: none; border-color: #aaa; }
  .product-card .product-image-link {
    aspect-ratio: 1 / 1.06;
    border-radius: 1px;
    background: #f4f4f4;
  }
  .product-card .card-content { display: flex; flex-direction: column; padding: 12px 7px 7px; }
  .product-card .card-identity {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: baseline;
    gap: 5px 8px;
    min-height: 24px;
    margin: 0 0 12px;
  }
  .product-card .product-name { font-size: 14px; font-weight: 620; }
  .product-card .card-color { max-width: 125px; color: #777; font-size: 10.5px; }
  .product-card .card-pricing-row { display: block; margin-top: auto; }
  .product-card .card-price,
  .product-card .card-run {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 4px 12px;
    align-items: baseline;
    min-width: 0;
    min-height: 51px;
    margin: 0;
    padding: 11px 1px 9px;
    border-top: 1px solid #e4e4e4;
    border-radius: 0;
    background: #fff;
    color: #111;
  }
  .product-card .card-price > span,
  .product-card .card-run-top > span { font-size: 11px; font-weight: 450; color: #666; white-space: nowrap; }
  .product-card .card-price > strong,
  .product-card .card-run-top > strong {
    font-size: 17px;
    font-weight: 630;
    line-height: 1.3;
    letter-spacing: -.035em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }
  .product-card .card-run { display: block; min-height: 60px; }
  .product-card .card-run-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .product-card .card-run small { display: block; overflow: visible; margin-top: 4px; color: #777; font-size: 10px; line-height: 1.35; white-space: normal; }
  .product-card .card-action { height: 36px; margin-top: 7px; }
  .product-card .card-add,
  .product-card .card-quantity {
    width: 100%; height: 36px; min-height: 36px;
    border: 1px solid #111; border-radius: 2px;
    background: #111; color: #fff;
  }
  .product-card .card-add { display: flex; justify-content: center; gap: 7px; font-size: 11px; font-weight: 540; }
  .product-card .card-add:not(:disabled):hover,
  .product-card .card-quantity > button:not(:disabled):hover { background: #333; }
  .product-card .card-add:disabled { background: #eee; border-color: #eee; color: #777; }
  .product-card .card-cart-icon { width: 15px; height: 15px; }
  .product-card .card-quantity { grid-template-columns: 36px minmax(0,1fr) 36px; }
  .product-card .card-quantity > button { height: 34px; color: #fff; }
  .product-card .card-quantity > span { color: #fff; font-size: 11px; }
}

/* Phone: three calm horizontal cards fit in the first catalog screen. */
@media (max-width: 740px) {
  .container { width: calc(100% - 36px); }
  .site-header { border-color: #e5e5e5; }
  .brand-caption, #resultCount { color: #777; }
  .catalog-view { padding-top: 10px; }
  .catalog-heading { margin-bottom: 10px; }
  .catalog-heading h1 { font-size: 27px; }
  .catalog-toolbar { margin-bottom: 10px; }
  .categories { max-width: 280px; border: 1px solid #e5e5e5; border-radius: 3px; background: #fff; }
  .category-button { min-height: 31px; border-radius: 1px; color: #666; }
  .category-button[aria-pressed=true] { background: #111; color: #fff; font-weight: 550; }
  .mobile-filter-toggle { width: 34px; height: 34px; border: 1px solid #d8d8d8; border-radius: 3px; background: #fff; }
  .mobile-filter-toggle circle { fill: #fff; }
  .filter-indicator { background: #111; }
  .product-grid { gap: 8px; }
  .product-card {
    display: grid;
    grid-template-columns: minmax(0,39%) minmax(0,1fr);
    gap: 9px;
    height: 184px;
    padding: 6px;
    border: 1px solid #e4e4e4;
    border-radius: 3px;
    background: #fff;
    box-shadow: none;
  }
  .product-card .product-image-link {
    width: 100%; height: 100%; min-height: 0;
    aspect-ratio: auto; border-radius: 1px;
    background: #f4f4f4;
  }
  .product-card .product-image-link img { width: 100%; height: 100%; padding: 0; object-fit: contain; }
  .product-card .card-content {
    display: flex; flex-direction: column; justify-content: flex-end;
    gap: 0; height: 100%; min-height: 0; padding: 1px 1px 1px 0;
    overflow: visible;
  }
  .product-card .card-identity { display: none; }
  .product-card .card-pricing-row { display: block; margin: 0; }
  .product-card .card-price {
    display: flex; flex-direction: column; justify-content: center;
    gap: 3px; min-height: 51px;
    padding: 5px 1px 7px;
    border-bottom: 1px solid #e5e5e5;
  }
  .product-card .card-price > span { color: #777; font-size: 10px; line-height: 1.2; }
  .product-card .card-price > strong { color: #111; font-size: 20px; line-height: 1.1; font-weight: 620; letter-spacing: -.045em; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .product-card .card-run {
    display: block; flex: 1; min-height: 0;
    margin: 0; padding: 9px 1px 7px;
    border: 0; border-radius: 0;
    background: #fff; color: #111;
  }
  .product-card .card-run-top { display: flex; align-items: baseline; justify-content: space-between; gap: 5px; }
  .product-card .card-run-top span { color: #777; font-size: clamp(9px,2.55vw,11px); line-height: 1.25; font-weight: 450; white-space: nowrap; }
  .product-card .card-run-top strong { color: #111; font-size: clamp(13px,3.85vw,16px); line-height: 1.2; font-weight: 610; letter-spacing: -.045em; white-space: nowrap; }
  .product-card .card-run small { display: block; overflow: visible; margin-top: 4px; color: #777; font-size: clamp(8px,2.35vw,10px); line-height: 1.35; white-space: normal; }
  .product-card .card-action { flex: none; height: 29px; margin: 0; }
  .product-card .card-add,
  .product-card .card-quantity {
    width: 100%; height: 29px; min-height: 29px;
    border: 1px solid #111; border-radius: 2px;
    background: #111; color: #fff;
  }
  .product-card .card-add { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 4px; font-size: 10px; font-weight: 520; }
  .product-card .card-cart-icon { width: 13px; height: 13px; }
  .product-card .card-add:disabled { background: #eee; border-color: #eee; color: #777; }
  .product-card .card-quantity { grid-template-columns: 29px minmax(0,1fr) 29px; }
  .product-card .card-quantity > button { height: 27px; color: #fff; }
  .product-card .card-quantity > span { color: #fff; font-size: 10px; }
  .catalog-minimum { padding: 9px 0 max(9px,env(safe-area-inset-bottom)); border-color: #dedede; }
  .catalog-minimum-inner { grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
  .minimum-package { display: none; }
  .minimum-total { padding-left: 10px; border-color: #dcdcdc; }
  .has-catalog-minimum .site-footer { padding-bottom: calc(57px + env(safe-area-inset-bottom)); }
}

/* Product sheet: the same two prices, with a larger photograph and clear sizes. */
.product-dialog { border-radius: 4px; box-shadow: 0 18px 60px #0002; }
.product-dialog-layout { gap: 34px; padding: 24px; }
.product-dialog .gallery-stage { border-radius: 2px; background: #f4f4f4; }
.product-dialog .gallery-stage .gallery-photo-trigger img { mix-blend-mode: multiply; }
.product-dialog .product-detail { padding: 30px 8px 8px 0; }
.product-dialog .product-detail h2 { font-weight: 560; }
.product-dialog .detail-color { color: #777; }
.product-dialog .stock-status { color: #555; font-size: 13px; font-weight: 450; }
.product-dialog .stock-status::before { background: #111; }
.product-dialog .detail-unit-prices {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin: 22px 0 0; padding: 22px 0;
  border-top: 1px solid #dedede;
}
.detail-unit-prices > span { color: #666; font-size: 13px; }
.detail-unit-prices > strong { color: #111; font-size: clamp(22px,2.3vw,30px); font-weight: 610; letter-spacing: -.045em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.product-dialog .detail-run-card {
  display: grid; grid-template-columns: minmax(0,1fr) auto;
  align-items: center; gap: 12px;
  margin: 0; padding: 20px 0;
  border-top: 1px solid #dedede; border-bottom: 1px solid #dedede;
  border-radius: 0; background: #fff; color: #111;
}
.product-dialog .detail-run-copy { gap: 5px; }
.product-dialog .detail-run-copy > span { color: #666; font-size: 13px; font-weight: 450; }
.product-dialog .detail-run-copy small { color: #777; font-size: 11px; }
.product-dialog .detail-run-card > strong { align-self: center; margin: 0; font-size: clamp(22px,2.3vw,30px); font-weight: 610; color: #111; }
.product-dialog .detail-order { margin-top: 20px; }
.product-dialog .detail-order > .button,
.product-dialog .detail-cart-quantity { min-height: 48px; border-radius: 2px; font-size: 14px; font-weight: 550; background: #111; }
.product-dialog .detail-cart-quantity button { min-height: 48px; }
.product-dialog .gallery-arrow { border-radius: 2px; box-shadow: none; }
.product-dialog .gallery-count { border-radius: 2px; color: #555; }
.size-run-choice { border-color: #d8d8d8; border-radius: 2px; }
.size-run-choice[aria-pressed=true] { border-color: #111; background: #f5f5f5; }
.product-information, .detail-accordion { border-color: #dedede; }
.summary-panel { background: #f5f5f5; }
.summary-line.total { border-color: #d8d8d8; }
.review-totals { border-color: #d8d8d8; }
.review-total strong { font-weight: 620; }
.success-data { background: #f5f5f5; }

@media (max-width: 740px) {
  .product-dialog { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .product-dialog-layout { display: block; max-height: calc(100dvh - 58px); padding: 10px 15px 86px; }
  .product-dialog .gallery-stage { height: min(50dvh,450px); border-radius: 2px; }
  .product-dialog .product-detail { padding: 23px 1px 0; }
  .product-dialog .product-detail h2 { font-size: 27px; }
  .product-dialog .detail-unit-prices { margin-top: 12px; padding: 18px 0; }
  .detail-unit-prices > span { font-size: 12px; }
  .detail-unit-prices > strong { font-size: 23px; }
  .product-dialog .detail-run-card { padding: 16px 0; }
  .product-dialog .detail-run-copy > span { font-size: 12px; }
  .product-dialog .detail-run-copy small { font-size: 10px; }
  .product-dialog .detail-run-card > strong { font-size: 22px; }
  .product-dialog .detail-order { margin: 0; padding: 8px 15px max(8px,env(safe-area-inset-bottom)); }
  .product-dialog .detail-order > .button,
  .product-dialog .detail-cart-quantity { min-height: 46px; border-radius: 2px; font-size: 14px; }
  .product-dialog .detail-cart-quantity button { min-height: 46px; }
}

@media (max-width: 360px) {
  .product-card { grid-template-columns: minmax(0,38%) minmax(0,1fr); gap: 7px; }
  .product-card .card-run-top strong { font-size: 13px; }
  .product-card .card-add { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .product-card, .product-card .product-image-link img { transition: none !important; }
}

/* Phone refinement: two aligned price rows, a short action, and no dead space. */
@media (max-width: 740px) {
  .catalog-heading h1 { font-size: 25px; }
  .catalog-toolbar { margin-bottom: 8px; }
  .categories {
    align-self: stretch;
    max-width: none;
    border: 0;
    border-bottom: 1px solid #d8d8d8;
    border-radius: 0;
  }
  .category-button,
  .category-button[aria-pressed=true] {
    min-height: 34px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #777;
    font-size: 11px;
    font-weight: 500;
  }
  .category-button[aria-pressed=true] {
    color: #111;
    border-bottom: 2px solid #111;
    font-weight: 650;
  }
  .product-card {
    grid-template-columns: minmax(0,38%) minmax(0,1fr);
    gap: 10px;
    height: 152px;
    padding: 6px;
    border-radius: 4px;
  }
  .product-card .card-content {
    display: grid;
    grid-template-rows: 42px minmax(0,1fr) 30px;
    justify-content: stretch;
    gap: 0;
    height: 100%;
    padding: 0;
  }
  .product-card .card-pricing-row { display: block; min-width: 0; }
  .product-card .card-price {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 42px;
    padding: 0 0 1px;
    border-bottom: 1px solid #e3e3e3;
  }
  .product-card .card-price > span { color: #666; font-size: 11px; white-space: nowrap; }
  .product-card .card-price > strong {
    font-size: clamp(16px,4.35vw,18px);
    font-weight: 620;
    line-height: 1.2;
  }
  .product-card .card-run {
    flex: none;
    min-height: 0;
    margin: 0;
    padding: 9px 0 3px;
  }
  .product-card .card-run-top { gap: 5px; }
  .product-card .card-run-top span { color: #666; font-size: 11px; }
  .product-card .card-run-top strong { font-size: clamp(14px,3.9vw,16px); font-weight: 620; }
  .product-card .card-run small { margin-top: 5px; color: #777; font-size: 10px; line-height: 1.25; }
  .product-card .card-action { align-self: end; height: 30px; margin: 0; }
  .product-card .card-add,
  .product-card .card-quantity { height: 30px; min-height: 30px; border-radius: 2px; }
  .product-card .card-add { font-size: 11px; }
  .product-card .card-quantity > button { height: 28px; }
  .catalog-minimum { padding: 7px 0 max(7px,env(safe-area-inset-bottom)); }
  .catalog-minimum-inner { min-height: 28px; }
  #minimumLabel { color: #444; font-size: 10px; line-height: 1.3; }
  .catalog-minimum-track {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .minimum-total { min-height: 28px; font-size: 10px; }
  .has-catalog-minimum .site-footer { padding-bottom: calc(45px + env(safe-area-inset-bottom)); }
}

@media (max-width: 360px) {
  .product-card { grid-template-columns: minmax(0,37%) minmax(0,1fr); gap: 7px; }
  .product-card .card-price > span { font-size: 10px; }
  .product-card .card-run-top span { font-size: 10px; }
  .product-card .card-run-top strong { font-size: 13px; }
  .product-card .card-run small { font-size: 9.5px; }
}

/* Two-column mobile catalog: photo first, then a compact wholesale summary. */
@media (max-width: 740px) {
  .container { width: calc(100% - 24px); }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 10px;
    align-items: stretch;
  }
  .product-card,
  .product-card:hover {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    height: auto;
    padding: 0;
    gap: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }
  .product-card .product-image-link {
    flex: none;
    align-self: auto;
    width: 100%;
    height: clamp(132px, 38vw, 148px);
    min-height: 0;
    aspect-ratio: auto;
    border-radius: 2px;
    background: #f4f4f4;
  }
  .product-card .product-image-link img { padding: 0; }
  .product-card .card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: flex-start;
    height: auto;
    min-height: 0;
    padding: 9px 1px 0;
  }
  .product-card .card-pricing-row { display: block; margin: 0; }
  .product-card .card-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 3px;
    min-height: 0;
    padding: 0;
    border: 0;
  }
  .product-card .card-price > span {
    color: #777;
    font-size: 9px;
    font-weight: 550;
    line-height: 1.2;
    letter-spacing: .055em;
    text-transform: uppercase;
  }
  .product-card .card-price > strong {
    color: #111;
    font-size: clamp(18px, 5vw, 22px);
    font-weight: 590;
    line-height: 1.1;
    letter-spacing: -.04em;
  }
  .product-card .card-run {
    flex: none;
    min-height: 0;
    margin: 8px 0 0;
    padding: 7px 0 0;
    border-top: 1px solid #e5e5e5;
  }
  .product-card .card-run-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px;
  }
  .product-card .card-run-top span {
    color: #555;
    font-size: 9px;
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
  }
  .product-card .card-run-top strong {
    color: #111;
    font-size: clamp(12px, 3.6vw, 15px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.035em;
    white-space: nowrap;
  }
  .product-card .card-run small {
    display: block;
    margin: 3px 0 0;
    color: #777;
    font-size: 9px;
    line-height: 1.3;
  }
  .product-card .card-action {
    flex: none;
    align-self: stretch;
    height: 32px;
    margin: auto 0 0;
    padding-top: 8px;
    box-sizing: content-box;
  }
  .product-card .card-add,
  .product-card .card-quantity {
    width: 100%;
    height: 32px;
    min-height: 32px;
    border-radius: 2px;
  }
  .product-card .card-add { gap: 5px; font-size: 10px; }
  .product-card .card-cart-icon { width: 13px; height: 13px; }
  .product-card .card-quantity { grid-template-columns: 28px minmax(0,1fr) 28px; }
  .product-card .card-quantity > button { height: 30px; }
}

@media (max-width: 360px) {
  .product-grid { gap: 16px 8px; }
  .product-card .card-run-top span { font-size: 8px; }
  .product-card .card-run-top strong { font-size: 12px; }
  .product-card .card-run small { font-size: 8.5px; }
  .product-card .card-add { font-size: 9px; }
}

.product-dialog .gallery-photo-trigger { position: relative; }
.gallery-zoom-hint { position: absolute; left: 12px; bottom: 12px; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #dedede; background: #fff; color: #111; pointer-events: none; }
.gallery-zoom-hint svg { width: 17px; height: 17px; }
.photo-dialog { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #fff; overflow: hidden; }
.photo-dialog::backdrop { background: #111; backdrop-filter: none; }
.photo-dialog[open] { animation: none; }
.photo-viewer { position: relative; display: grid; place-items: center; width: 100%; height: 100%; background: #fff; }
.photo-dialog-image { width: 100%; height: 100%; padding: 60px 54px 58px; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.photo-dialog-close, .photo-dialog-arrow { position: absolute; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #dedede; background: #fff; color: #111; line-height: 1; }
.photo-dialog-close { top: max(14px,env(safe-area-inset-top)); right: max(14px,env(safe-area-inset-right)); font-size: 29px; font-weight: 300; }
.photo-dialog-arrow { top: 50%; transform: translateY(-50%); font-size: 28px; }
.photo-dialog-arrow.prev { left: 12px; }
.photo-dialog-arrow.next { right: 12px; }
.photo-dialog-arrow[hidden] { display: none; }
.photo-dialog-count { position: absolute; bottom: max(18px,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); color: #666; font-size: 12px; font-variant-numeric: tabular-nums; }
.photo-dialog button:focus-visible, .gallery-photo-trigger:focus-visible { outline: 2px solid #111; outline-offset: -3px; }
@media (max-width:740px) {
  .photo-dialog-image { padding: max(58px,env(safe-area-inset-top)) 7px max(56px,env(safe-area-inset-bottom)); }
  .photo-dialog-arrow.prev { left: 8px; }
  .photo-dialog-arrow.next { right: 8px; }
  .photo-dialog-arrow { width: 38px; height: 38px; }
}
