body.wholesale { background: #fff; }
.wholesale-header { border-bottom: 1px solid var(--line); }
.wholesale-nav { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wholesale-brand { display: block; width: min(100%, 218px); min-width: 0; }
.wholesale-brand img {
  width: 100%;
  height: auto;
  aspect-ratio: 1236 / 378;
  object-fit: contain;
  object-view-box: inset(12% 1.5% 34% 1.5%);
}
.wholesale-nav .phone { color: var(--red); }
.wholesale-price-page { max-width: 1080px; padding-block: clamp(30px, 5vw, 66px) 50px; }
.price-title h1 { font-size: clamp(2.6rem, 5.6vw, 4.8rem); letter-spacing: -.06em; }
.price-title p { margin-top: 14px; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.price-search { margin-top: 24px; }
.price-search input { width: min(100%, 520px); min-height: 48px; border: 1px solid #d9c5bd; border-radius: 10px; padding: 10px 13px; font: inherit; color: var(--ink); }
.price-search input:focus-visible, .price-section summary:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
#price-status:not(:empty) { margin-top: 10px; color: var(--muted); }
.price-sections { margin-top: 22px; display: grid; gap: 10px; }
.price-section { border: 1px solid var(--line); border-radius: 11px; }
.price-section summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 13px; min-height: 76px; padding: 8px 16px 8px 9px; font-weight: 700; cursor: pointer; list-style: none; }
.price-thumb { display: block; width: 76px; height: 58px; object-fit: cover; border-radius: 7px; background-color: #f6f0e8; }
.price-thumb-atlas { background-image: url("assets/wholesale-category-atlas.png"); background-size: 400% 200%; background-position: var(--atlas-x) var(--atlas-y); }
.price-section summary::-webkit-details-marker { display: none; }
.price-section summary::after { content: ''; width: 8px; height: 8px; border-bottom: 2px solid var(--red); border-right: 2px solid var(--red); transform: rotate(45deg); margin: 0 3px 4px; }
.price-section[open] summary::after { transform: rotate(225deg); margin-top: 6px; }
.price-section summary:hover { color: var(--red); }
.price-count { font-size: .875rem; font-weight: 600; color: var(--muted); background: #fff5d7; padding: 4px 9px; border-radius: 20px; }
.price-section table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.price-section th, .price-section td { text-align: left; padding: 11px 16px; border-top: 1px solid var(--line); }
.price-section th:last-child:not([colspan]), .price-section .price-value { text-align: right; }
.price-section thead th { font-size: .875rem; color: var(--muted); }
.price-subgroup th { font-size: .9rem; background: #fff9e9; }
.price-code { font-variant-numeric: tabular-nums; color: var(--muted); }
.price-value { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.price-delivery {
  margin-top: 34px;
  padding: clamp(20px, 4vw, 34px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid #f2e0b7;
  border-radius: 12px;
  background: #fff9e9;
}
.price-delivery h2 { font-size: clamp(1.65rem, 3vw, 2.4rem); }
.price-delivery > div:first-child { flex: 1 1 490px; }
.price-delivery p { margin-top: 12px; color: var(--muted); line-height: 1.5; }
.price-delivery-actions .button[hidden] { display: none; }
.order-cart-open { cursor: pointer; }
.wholesale-footer { max-width: 1080px; padding-block: 22px 28px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
@media (max-width: 740px) {
  .wholesale-nav { display: grid; grid-template-columns: 1fr auto; padding-block: 14px; gap: 11px; }
  .wholesale-nav nav { grid-row: 2; grid-column: 1 / -1; }
  .wholesale-brand { width: min(100%, 165px); }
  .wholesale-nav .phone { font-size: .875rem; }
  .price-section th, .price-section td { padding: 9px 8px; }
  .price-section table { font-size: .875rem; }
}
@media (max-width: 430px) {
  .price-section summary { gap: 9px; padding-right: 11px; min-height: 64px; }
  .price-thumb { width: 59px; height: 48px; }
  .price-count { padding: 3px 6px; }
}

.wholesale-cart-toggle[hidden] { display: none; }
.wholesale-cart-toggle { white-space: nowrap; color: var(--red); gap: 9px; min-height: 44px; border-color: var(--line); }
#cart-count { min-width: 1.6em; border-radius: 20px; padding: 1px 5px; background: #fff2ca; }
.price-section .cart-cell { text-align: center; width: 92px; }
.price-section thead th:nth-child(3) { text-align: right; }
.row-add { width: 44px; height: 42px; color: var(--red); background: #fff7e5; border: 1px solid #efdcb8; border-radius: 8px; font: inherit; font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.row-add:hover { color: #fff; background: var(--red); border-color: var(--red); }
.row-quantity {
  width: 70px;
  min-height: 42px;
  padding: 4px;
  border: 1px solid #d9b4a7;
  border-radius: 8px;
  background: #fffaf2;
  color: var(--ink);
  font: inherit;
  text-align: center;
  appearance: textfield;
}
.row-quantity::-webkit-inner-spin-button { appearance: none; }
.row-quantity:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.wholesale-cart { width: min(640px, calc(100% - 28px)); max-height: calc(100dvh - 28px); border: 1px solid var(--line); border-radius: 16px; padding: clamp(16px, 3vw, 28px); color: var(--ink); }
.wholesale-cart::backdrop { background: #20100d77; }
.cart-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.cart-heading h2 { font-size: clamp(1.5rem, 4vw, 2.35rem); }
.cart-close { background: white; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; min-width: 42px; min-height: 42px; font-size: 1.45rem; }
#cart-feedback:not(:empty) { padding: 10px 12px; border-radius: 8px; background: #fff4d4; margin-bottom: 12px; }
.cart-items { list-style: none; padding: 0; margin: 0 0 16px; }
.cart-items:empty { margin: 0; }
.cart-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.cart-item > div:first-child { flex: 1 1 220px; }
.cart-item-price { display: block; margin-top: 4px; color: var(--muted); }
.cart-item-controls, .cart-item-controls label { display: flex; align-items: center; gap: 8px; }
.cart-remove { color: var(--red); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; cursor: pointer; }
.cart-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.cart-fields label { display: grid; min-width: 0; gap: 5px; }
.cart-fields input, .cart-fields textarea, .cart-item-controls input { padding: 8px; min-height: 39px; border: 1px solid #d9c5bd; border-radius: 8px; font: inherit; color: var(--ink); width: 100%; }
.cart-item-controls input { width: 86px; }
.cart-consent { display: flex; align-items: start; gap: 8px; margin-bottom: 12px; font-size: .9rem; }
#wholesale-order-form .button { cursor: pointer; }
#wholesale-order-form .button:disabled { opacity: .65; cursor: wait; }
.back-to-top {
  position: fixed;
  z-index: 3;
  right: calc(16px + env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--red);
  border-radius: 999px;
  background: #fff;
  color: var(--red);
  box-shadow: 0 3px 12px #20100d26;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.back-to-top:hover, .back-to-top:focus-visible { background: #fff4d4; }
.back-to-top:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
@media (max-width: 490px) {
  .cart-fields { grid-template-columns: 1fr; }
  .price-section .cart-cell { width: 52px; padding-inline: 4px; }
  .price-section th.cart-cell { font-size: .72rem; }
  .row-add { width: 38px; }
  .row-quantity { width: 58px; font-size: 16px; }
}
