/* B2B additions on top of styles.css, a byte-for-byte copy of the B2C stylesheet. */

/* Intro, left-aligned like the partner programme page: the title, a lead line, then the minimum order. */
.intro {
  padding: clamp(22px, 6vw, 44px) 0 0;
  text-align: left;
}

.kicker {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .18em;
  line-height: 1.7;
  text-transform: uppercase;
}

.intro-title {
  margin: 0 0 13px;
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(27px, 7.4vw, 38px);
  font-weight: 400;
  line-height: 1.1;
}

.intro-lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(14px, 3.7vw, 15px);
  line-height: 1.6;
  text-wrap: pretty;
}

.min-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: clamp(12px, 3.2vw, 13px);
  line-height: 1.6;
  text-wrap: pretty;
}

.product-list {
  margin-top: 0;
}

/* Above the counters: what they count. */
.qty-head {
  margin: 21px 0 8px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.3;
  text-align: right;
}

/* Row: thumbnail, name and "200ml Diffuser" as on B2C; the stepper takes the buy button's place. */
.product-header {
  cursor: pointer;
}

.product-row {
  position: relative;
}

.product-toggle {
  min-height: calc(var(--row-h) - 40px);
}

.product.is-open .product-toggle {
  min-height: clamp(52px, 13vw, 64px);
}

/* The magnifier on the photo (.thumb-wrap, .zoom-icon) comes from the shared ../styles.css. */

.row-slot {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.stepper {
  display: flex;
  height: clamp(38px, 10.5vw, 44px);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--bg);
  cursor: default;
  transition: background-color 200ms ease;
}

.stepper button {
  width: clamp(34px, 9.5vw, 40px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.stepper button:disabled {
  opacity: .38;
  cursor: default;
}

.stepper input {
  width: clamp(40px, 12vw, 52px);
  min-width: 0;
  padding: 0;
  border: 0;
  border-inline: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  text-align: center;
}

.stepper input:focus {
  outline: none;
}

.stepper:has(:focus-visible) {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}

.stepper input[aria-invalid="true"] {
  box-shadow: inset 0 -2px var(--alert);
}

.product.is-selected .stepper {
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
}

/* One quiet line with the box details; the chosen quantity or an error sits on its right. */
.pack-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 10px;
  flex-wrap: wrap;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.qty-note {
  margin-left: auto;
  color: var(--ink-soft);
  white-space: nowrap;
}

.qty-note:empty {
  display: none;
}

.qty-note.is-error {
  color: var(--alert);
}

/* Open card: the same compact stepper sits on the right, where B2C has its buy button,
   with the chosen quantity right under it. */
.product-actions {
  display: flex;
  justify-content: flex-end;
}

.panel-slot {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.panel-slot .qty-note {
  margin-left: 0;
  font-size: 11px;
  line-height: 1.5;
}

.product.next-hint {
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
}

/* Bottom: the supply note and one button, styled as B2C's black buy button. */
.offer-action {
  margin-top: 34px;
  padding: 6px 0;
  border-radius: 6px;
  transition: background-color 280ms ease;
}

.offer-action.next-hint {
  background: var(--line);
}

.supply-note {
  margin: 0 0 21px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
  text-wrap: pretty;
}

/* The offer button as on the partner page: wide, outlined, filling on hover. */
.offer-action .cta {
  min-height: 56px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: clamp(11px, 3.2vw, 13px);
  transition: background-color 500ms ease, color 500ms ease;
}

.offer-action .cta:hover {
  background: var(--ink);
  color: var(--bg);
}

.cta {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 200ms ease;
}

:lang(kk) .cta {
  letter-spacing: .06em;
}

.cta:hover {
  background: var(--ink-soft);
}

[hidden] {
  display: none !important;
}

/* Request dialog */
.modal-open {
  overflow: hidden;
}

dialog {
  width: min(640px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 24px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 12px 60px rgba(30, 28, 26, .2);
}

dialog::backdrop {
  background: rgba(30, 28, 26, .45);
}

.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dialog-top .kicker {
  text-align: left;
}

.close-dialog {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  font-size: 24px;
  cursor: pointer;
}

.contacts h2 {
  margin: 8px 0 21px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(24px, 7.5vw, 30px);
  font-weight: 400;
  line-height: 1.2;
}

.fields {
  display: grid;
  gap: 21px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  line-height: 1.6;
}

.field input,
.field textarea {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.field input[aria-invalid="true"] {
  border-color: var(--alert);
}

.field-error,
.error {
  color: var(--alert);
  font-size: 11px;
  line-height: 1.6;
}

/* Noble burgundy for fields left empty. */
:root {
  --alert: #7B2233;
}

.field.is-invalid .req {
  color: var(--alert);
  font-weight: 600;
}

.error:empty {
  display: none;
}

form > .cta {
  margin-top: 21px;
}

.small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

#submit-note,
#fallback-note {
  text-align: center;
}

#handoff details {
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.8;
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 11px/1.8 "Montserrat", sans-serif;
}

@media (max-width: 420px) {
  dialog {
    padding: 16px;
  }
}

/* Reserve the counter's actual width, keeping the 12px subtitle intact. */
.product-row .product-toggle {
  padding-right: calc(2 * clamp(34px, 9.5vw, 40px) + clamp(40px, 12vw, 52px) + 10px);
}
