/*
 * Rebuilt 01 / THE CATEGORY
 * This file intentionally uses a unique namespace so legacy category-v9
 * experiments cannot affect the rebuilt module.
 */

.category-rebuild {
  order: 2;
  overflow: clip;
  padding: clamp(72px, 7vw, 118px) 0;
  color: var(--ink);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

/* Width is inherited exclusively from the shared .page-shell container. */
.category-rebuild__inner {
  position: relative;
}

.category-rebuild__rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.category-rebuild__rail p,
.category-rebuild__rail span {
  margin: 0;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.category-rebuild__rail p {
  color: var(--clay);
}

.category-rebuild__rail span {
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: none;
}

.category-rebuild__layout {
  display: grid;
  grid-template-columns:
    minmax(280px, 0.9fr)
    minmax(520px, 1.7fr)
    minmax(300px, 1fr);
  align-items: stretch;
  column-gap: clamp(22px, 2.1vw, 42px);
  min-height: clamp(680px, 42vw, 780px);
  padding-top: clamp(42px, 4vw, 70px);
}

.category-rebuild__left,
.category-rebuild__right {
  position: relative;
  z-index: 3;
}

.category-rebuild__left {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-rows:
    auto
    minmax(0, 1fr)
    minmax(0, 1.1fr)
    minmax(0, 0.98fr);
  align-items: stretch;
  min-width: 0;
  width: min(175%, 600px);
  padding: 18px 0 0;
  text-align: left;
}

.category-rebuild__kicker {
  margin: 0 0 18px;
  color: var(--clay);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.13em;
}

.category-rebuild__left h3 {
  display: block;
  align-self: center;
  width: 100%;
  max-width: none;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(48px, 3.7vw, 70px);
  font-weight: 720;
  line-height: 0.94;
  letter-spacing: -0.048em;
  text-wrap: balance;
}

.category-rebuild__lead {
  display: flex;
  align-items: center;
  max-width: 26ch;
  margin: 0;
  color: var(--muted);
  font-family: var(--body);
  font-size: clamp(22px, 1.72vw, 31px);
  font-weight: 500;
  line-height: 1.45;
}

.category-rebuild__facts {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  width: 100%;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.category-rebuild__facts > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.category-rebuild__facts dt,
.category-rebuild__facts dd {
  margin: 0;
}

.category-rebuild__facts dt {
  font-family: var(--body);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.category-rebuild__facts dd {
  color: var(--muted);
  font-family: var(--body);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.42;
}

.category-rebuild__product {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 100%;
  margin: 0;
  isolation: isolate;
  pointer-events: none;
}

.category-rebuild__plane {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(34%, 270px);
  height: 56%;
  background: #e4d4bc;
  transform: translate(-50%, -50%);
}

.category-rebuild__plane::after {
  position: absolute;
  inset: 18px -18px -18px 18px;
  z-index: -1;
  background: #eee5d8;
  content: "";
}

.category-rebuild__product svg {
  position: relative;
  display: block;
  width: auto;
  max-width: none;
  height: min(100%, 780px);
  overflow: visible;
  filter: drop-shadow(0 30px 34px rgb(44 34 23 / 0.16));
  transform: translateX(23%);
}

.category-rebuild__right {
  grid-column: 2 / 4;
  grid-row: 1;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  justify-self: end;
  min-width: 0;
  width: 68%;
  padding: 0 0 clamp(4px, 1vw, 16px);
  text-align: right;
}

.category-rebuild__right h2 {
  width: 100%;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(64px, 5.4vw, 98px);
  font-weight: 780;
  line-height: 0.86;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.category-rebuild__right h2 span {
  display: block;
  white-space: nowrap;
}

/*
 * Keep the lower-right poster headline clear of the bottle silhouette.
 * The product artwork and its scale stay untouched; only the headline block
 * moves slightly toward the outer edge and uses a subtly tighter setting.
 */
@media (min-width: 1281px) {
  .category-rebuild__right {
    transform: translateX(clamp(18px, 1.25vw, 26px));
  }

  .category-rebuild__right h2 {
    font-size: clamp(56px, 4.35vw, 84px);
    line-height: 0.91;
    letter-spacing: -0.058em;
  }

  .category-rebuild__facts {
    align-self: end;
    grid-template-rows: repeat(3, auto);
  }

  .category-rebuild__facts > div {
    grid-template-columns: 126px minmax(0, 1fr);
    gap: 20px;
    padding: 10px 0 11px;
  }

  .category-rebuild__facts dt {
    font-size: 11.5px;
    font-weight: 720;
    letter-spacing: 0.07em;
    line-height: 1.3;
  }

  .category-rebuild__facts dd {
    max-width: 420px;
    font-size: clamp(15px, 0.95vw, 18px);
    font-weight: 450;
    line-height: 1.36;
  }
}

/*
 * Below this width, the three columns would become too narrow. The title moves
 * above the copy/product pair instead of allowing any column to collapse.
 */
@media (max-width: 1280px) {
  .category-rebuild {
    overflow: hidden;
  }

  .category-rebuild__layout {
    grid-template-columns: minmax(280px, 0.72fr) minmax(500px, 1.28fr);
    grid-template-areas:
      "title title"
      "copy product";
    gap: 44px 34px;
    min-height: 0;
    padding-top: 48px;
  }

  .category-rebuild__right {
    grid-area: title;
    padding: 0;
  }

  .category-rebuild__right h2 {
    max-width: 12ch;
    margin-left: auto;
    font-size: clamp(56px, 8vw, 82px);
  }

  .category-rebuild__right h2 span {
    white-space: normal;
  }

  .category-rebuild__left {
    grid-area: copy;
    min-height: 600px;
    width: 100%;
    padding: 18px 0 0;
  }

  .category-rebuild__product {
    grid-area: product;
    min-height: 600px;
  }

  .category-rebuild__product svg {
    width: auto;
    max-width: none;
    height: min(94%, 650px);
    transform: translateX(11%);
  }
}

@media (max-width: 900px) {
  .category-rebuild {
    padding: 62px 0 74px;
  }

  .category-rebuild__rail {
    align-items: flex-start;
  }

  .category-rebuild__rail span {
    text-align: right;
  }

  .category-rebuild__layout {
    display: flex;
    flex-direction: column;
    gap: 38px;
    padding-top: 38px;
  }

  .category-rebuild__right {
    order: 1;
  }

  .category-rebuild__right h2 {
    max-width: 100%;
    font-size: clamp(46px, 14.5vw, 72px);
    line-height: 0.9;
  }

  .category-rebuild__product {
    order: 2;
    min-height: clamp(440px, 132vw, 610px);
  }

  .category-rebuild__product svg {
    width: min(100%, 680px);
    max-width: 100%;
    height: auto;
    transform: none;
  }

  .category-rebuild__plane {
    width: min(56%, 245px);
    height: 66%;
  }

  .category-rebuild__left {
    order: 3;
    display: block;
    width: 100%;
    min-height: 0;
    padding: 0;
  }

  .category-rebuild__left h3 {
    max-width: 14ch;
    font-size: clamp(34px, 10.5vw, 48px);
  }

  .category-rebuild__lead {
    max-width: 100%;
    font-size: 18px;
  }

  .category-rebuild__facts {
    margin-top: 42px;
  }

  .category-rebuild__facts > div {
    grid-template-columns: 100px minmax(0, 1fr);
  }
}

@media (max-width: 430px) {
  .category-rebuild__right h2 {
    font-size: clamp(40px, 13.3vw, 56px);
  }

  .category-rebuild__product {
    min-height: 430px;
  }

  .category-rebuild__facts > div {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
