/* Portal mayorista. El header de la portada usa line-height:0 para el logo
   de imagen; aquí el texto de marca necesita aire real y un lockup centrado. */

html.i18n-pending body { visibility: hidden; }
html.i18n-ready body { visibility: visible; }

body[data-page="wholesale"] {
  overflow-x: clip;
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.1), transparent 26%),
    #121212;
}

body[data-page="wholesale"] .site-header.b2b-header {
  position: sticky;
  top: 0;
  overflow: visible;
  background: rgba(14, 14, 14, 0.94);
  border-bottom: 1px solid rgba(212, 175, 55, 0.16);
}

body[data-page="wholesale"] .b2b-header__inner {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 0.35rem;
  width: min(100% - 1.5rem, 1120px);
  margin: 0 auto;
  padding: 0.85rem 0.25rem 1.15rem;
}

body[data-page="wholesale"] .b2b-lang {
  justify-self: end;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.3rem;
  max-width: 100%;
  padding: 0.28rem;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  overflow: visible;
}

body[data-page="wholesale"] .b2b-lang__btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(248, 245, 239, 0.88);
  min-height: 2.4rem;
  padding: 0.4rem 0.9rem;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", Inter, "Segoe UI", sans-serif;
  font-variant-emoji: emoji;
  font-size: 0.82rem;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  overflow: visible;
  cursor: pointer;
}

body[data-page="wholesale"] .b2b-lang__btn[aria-pressed="true"] {
  background: #d4af37;
  color: #14120e;
}

body[data-page="wholesale"] .b2b-header__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: min(100%, 36rem);
  max-width: 100%;
  margin: 0;
  padding: 0.15rem 0.5rem 0.2rem;
  line-height: 1.35;
  color: #f8f5ef;
  text-align: center;
  text-decoration: none;
}

body[data-page="wholesale"] .b2b-header__logo {
  display: block;
  height: clamp(4.2rem, 14vw, 5.1rem);
  width: auto;
  max-width: min(70vw, 9.5rem);
  object-fit: contain;
  object-position: center;
}

body[data-page="wholesale"] .b2b-header__copy {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  width: 100%;
  min-width: 0;
  padding: 0 0.35rem 0.1rem;
}

body[data-page="wholesale"] .b2b-header__name {
  display: block;
  max-width: 100%;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(0.95rem, 3.6vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.45;
  text-transform: uppercase;
  text-align: center;
  color: #f8f5ef;
  padding: 0.12em 0.2em 0;
}

body[data-page="wholesale"] .b2b-header__sub {
  display: block;
  max-width: 100%;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: clamp(0.62rem, 2.1vw, 0.72rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.5;
  text-transform: uppercase;
  text-align: center;
  color: rgba(248, 245, 239, 0.62);
  padding: 0 0.2em;
}

body[data-page="wholesale"] .hero.hero-premium.b2b-hero {
  min-height: calc(100dvh - 6.75rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 3.25rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}

body[data-page="wholesale"] .b2b-content {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

body[data-page="wholesale"] .b2b-title,
body[data-page="wholesale"] .b2b-subtitle,
body[data-page="wholesale"] .b2b-text {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

body[data-page="wholesale"] .b2b-title {
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.15;
  color: var(--color-gold-400, #d4af37);
  margin-bottom: 0.5rem;
}

body[data-page="wholesale"] .b2b-subtitle {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  font-style: italic;
  color: var(--color-gold-200, #e4d2ae);
  margin-bottom: 1.75rem;
}

body[data-page="wholesale"] .b2b-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(248, 245, 239, 0.78);
  margin-bottom: 2rem;
  overflow-wrap: anywhere;
}

body[data-page="wholesale"] .b2b-sales a {
  color: var(--color-gold-400, #d4af37);
  overflow-wrap: anywhere;
}

body[data-page="wholesale"] .b2b-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.9rem;
  width: min(100%, 960px);
  margin: 0 auto 2.5rem;
}

body[data-page="wholesale"] .b2b-actions .btn {
  flex: 1 1 14rem;
  width: auto;
  max-width: 22rem;
  margin: 0;
  min-height: 3.4rem;
  min-width: 0;
  padding: 0.85rem 1rem;
  font-size: 0.78rem;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

body[data-page="wholesale"] .b2b-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  border-top: 1px solid rgba(212, 175, 55, 0.22);
  padding-top: 2.25rem;
  text-align: left;
}

body[data-page="wholesale"] .b2b-feature h3 {
  font-family: "Cinzel", Georgia, serif;
  color: #e4d2ae;
  font-size: 1.15rem;
  margin-bottom: 0.65rem;
}

body[data-page="wholesale"] .b2b-feature p {
  color: rgba(248, 245, 239, 0.62);
  font-size: 0.95rem;
  line-height: 1.6;
}

body[data-page="wholesale"] .age-gate {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(8, 8, 8, 0.94);
}

html.age-gate-pending body[data-page="wholesale"] .age-gate,
body[data-page="wholesale"].age-gate-open .age-gate {
  display: flex;
}

body[data-page="wholesale"] .age-gate.age-gate--hidden {
  display: none;
}

body[data-page="wholesale"] .age-gate__dialog {
  width: min(100%, 28rem);
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: #161616;
}

body[data-page="wholesale"] .age-gate__eyebrow {
  margin: 0 0 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #d4af37;
  font-size: 0.72rem;
}

body[data-page="wholesale"] .age-gate__description {
  color: rgba(248, 245, 239, 0.78);
  line-height: 1.6;
}

body[data-page="wholesale"] .age-gate__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

body[data-page="wholesale"] .age-gate__actions .btn {
  width: auto;
  max-width: 100%;
  margin-top: 0;
  min-width: min(100%, 14rem);
  white-space: normal;
}

.b2b-sheet[hidden],
.b2b-sheet [hidden] {
  display: none !important;
}

.b2b-sheet {
  position: fixed;
  inset: 0;
  z-index: 280;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.b2b-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.b2b-sheet__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 960px);
  max-height: min(92vh, 920px);
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(212, 175, 55, 0.08), transparent 90px),
    #141414;
  color: #f8f5ef;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.b2b-sheet__bar {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
  padding: 0.75rem 0.85rem;
  background: #161616;
  border-bottom: 1px solid rgba(212, 175, 55, 0.16);
}

.b2b-sheet__scroll {
  overflow: auto;
  padding: 1.15rem 1.25rem 1.5rem;
}

.b2b-sheet__close {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #1c1c1c;
  color: #f8f5ef;
  border-radius: 999px;
  min-height: 2.4rem;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.b2b-sheet__title {
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  color: #e4d2ae;
  margin: 0 2rem 0.4rem 0;
  line-height: 1.25;
}

.b2b-sheet__lead,
.b2b-sheet__note {
  color: rgba(248, 245, 239, 0.72);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}

.b2b-access {
  display: grid;
  gap: 0.85rem;
  max-width: 32rem;
  margin-top: 0.5rem;
}

.b2b-access label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 245, 239, 0.7);
}

.b2b-access input[type="text"],
.b2b-access input[type="email"],
.b2b-access input[type="tel"] {
  width: 100%;
  min-width: 0;
  min-height: 2.8rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: #0f0f0f;
  color: #f8f5ef;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.b2b-access__check {
  display: flex !important;
  align-items: flex-start;
  gap: 0.6rem;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(248, 245, 239, 0.84);
}

.b2b-access__check input {
  margin-top: 0.25rem;
}

.b2b-field-error {
  margin: 0;
  color: #f0b4a6;
  font-size: 0.88rem;
}

.b2b-fob-note {
  margin: 1.15rem auto 0;
  max-width: 42rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.12);
  color: #f6ead0;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.b2b-sheet .b2b-fob-note {
  margin: 0 0 1rem;
  max-width: none;
  text-align: start;
}

.b2b-limited {
  margin: 0;
  color: rgba(248, 245, 239, 0.72);
  font-size: 0.88rem;
  line-height: 1.45;
}

.b2b-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.7rem;
  margin: 0 0 1rem;
}

.b2b-tier {
  padding: 0.75rem 0.8rem;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.b2b-tier strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #e4d2ae;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.b2b-tier span {
  display: block;
  color: rgba(248, 245, 239, 0.72);
  font-size: 0.85rem;
  line-height: 1.4;
}

.b2b-tier.is-active {
  border-color: #d4af37;
  background: rgba(212, 175, 55, 0.12);
}

.b2b-price-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.b2b-price-scroll-hint {
  display: none;
  margin: 0 0 1.1rem;
  color: rgba(248, 245, 239, 0.62);
  font-size: 0.8rem;
  line-height: 1.4;
}

.b2b-price-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 46rem;
  font-size: 0.92rem;
}

.b2b-price-table th,
.b2b-price-table td {
  padding: 0.7rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: right;
  white-space: nowrap;
  vertical-align: bottom;
}

.b2b-price-table .is-text {
  text-align: left;
}

.b2b-price-table .is-sticky {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #141414;
  box-shadow: 8px 0 12px rgba(0, 0, 0, 0.22);
}

.b2b-price-table thead .is-sticky {
  z-index: 2;
  background: #1b1b1b;
}

.b2b-price-table thead th {
  color: #e4d2ae;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.b2b-price-table thead th small {
  display: block;
  margin-top: 0.2rem;
  color: rgba(228, 210, 174, 0.78);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.b2b-price-table td.is-active,
.b2b-price-table th.is-active,
.b2b-price-table .is-sticky.is-active {
  background: #2c2618;
  color: #f8f5ef;
}

@media (max-width: 760px) {
  .b2b-price-scroll-hint {
    display: block;
  }
}

.b2b-order {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
}

.b2b-order.is-moq-blocked {
  border-color: rgba(224, 122, 95, 0.85);
  box-shadow: inset 0 0 0 1px rgba(224, 122, 95, 0.35);
}

.b2b-order__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.b2b-order label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.84rem;
  color: rgba(248, 245, 239, 0.8);
}

.b2b-order input[type="number"] {
  width: 100%;
  min-width: 0;
  min-height: 2.7rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0f0f0f;
  color: #f8f5ef;
  font: inherit;
}

.b2b-moq-alert {
  margin: 0;
  padding: 0.85rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(224, 122, 95, 0.75);
  background: rgba(224, 122, 95, 0.14);
  color: #f6d2c8;
  line-height: 1.5;
}

.b2b-quote {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.08);
}

.b2b-quote strong {
  color: #e4d2ae;
}

.b2b-sheet__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.b2b-sheet__actions .btn {
  flex: 1 1 12rem;
  width: auto;
  max-width: 100%;
  margin: 0;
  min-width: 0;
  white-space: normal;
}

@media (max-width: 900px) {
  body[data-page="wholesale"] .b2b-actions .btn {
    flex-basis: 100%;
    width: min(100%, 28rem);
    max-width: 28rem;
  }

  .b2b-tiers {
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  }

  .b2b-order__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  body[data-page="wholesale"] .b2b-header__inner {
    width: min(100% - 1rem, 1120px);
    padding-top: 0.75rem;
  }

  body[data-page="wholesale"] .b2b-lang {
    justify-self: center;
  }

  body[data-page="wholesale"] .b2b-header__name {
    letter-spacing: 0.08em;
  }

  body[data-page="wholesale"] .b2b-header__sub {
    letter-spacing: 0.1em;
  }

  body[data-page="wholesale"] .b2b-actions .btn,
  body[data-page="wholesale"] .age-gate__actions .btn,
  .b2b-sheet__actions .btn,
  .b2b-access .btn {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
  }

  .b2b-sheet {
    padding: 0.5rem;
  }

  .b2b-sheet__panel {
    width: 100%;
    max-height: calc(100dvh - 1rem);
    border-radius: 12px;
  }

  .b2b-sheet__scroll {
    padding: 1rem 0.8rem 1.2rem;
  }

  .b2b-sheet__title {
    margin-right: 0;
  }

  .b2b-sheet__actions {
    flex-direction: column;
  }

  .b2b-order__grid {
    grid-template-columns: 1fr;
  }

  .b2b-access,
  .b2b-access .btn {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .b2b-moq-alert {
    animation: none;
  }
}
