/* ========================================================================== */
/* Kashish V6 — final content and commerce refinements                        */
/* Kept last in every page so these client-approved details remain stable.    */
/* ========================================================================== */

/* Footer ------------------------------------------------------------------- */

.footer-paper-edge,
.footer-paper-edge-v2 {
  background: #fff !important;
}

.footer-paper-edge-v2 + .site-footer,
.site-footer {
  background: #e3ddd4 !important;
}

/* The supplied artwork contains its own carefully balanced colours. */
.footer-paper-edge-v2 img {
  opacity: 1 !important;
  filter: none !important;
}

/* Small labels use the same calm, regular Instrument Sans treatment as the
   navigation. They sit apart from the display face rather than touching it. */
html[data-theme="v6-modern-poetry"] :is(
  .eyebrow,
  .caps,
  .product-edition,
  .collection-edit-copy small
) {
  font-family: var(--font-ui) !important;
  font-size: var(--v6-h05-nav-size) !important;
  font-weight: 400 !important;
  letter-spacing: .065em !important;
  line-height: 1.3 !important;
}

html[data-theme="v6-modern-poetry"] .eyebrow + :is(h1, h2, h3, .display) {
  margin-top: 12px !important;
}

html[data-theme="v6-modern-poetry"] .collection-edit-copy {
  gap: 8px !important;
}

/* Repeat the header's true Kashish colours at the two brand punctuation
   points on the homepage, at a more restrained scale. */
body[data-page="home"] .manifesto-v4 .manifesto-logo {
  width: min(210px, 50vw) !important;
  filter: none !important;
}

.site-footer .footer-brand-logo {
  width: min(148px, 46vw) !important;
  filter: none !important;
  opacity: 1 !important;
}

/* The logo has its own visual breathing room; remove the two divider rules
   that previously framed it above and below. */
.site-footer,
.footer-paper-edge-v2 + .site-footer,
.site-footer .footer-top {
  border-top: 0 !important;
  border-bottom: 0 !important;
}

/* Homepage bird mnemonic -------------------------------------------------- */

body[data-page="home"] .mega-layout::after {
  background-color: #065f5b !important;
  background-image: none !important;
  -webkit-mask: url("../v6/bird-in-flight.png") center / contain no-repeat;
  mask: url("../v6/bird-in-flight.png") center / contain no-repeat;
}

body[data-page="home"] .manifesto-v4::before,
body[data-page="home"] .roots-timeline .roots-copy::after {
  background-color: #065f5b !important;
}

body[data-page="home"] .footer-grid::after {
  background-color: #065f5b !important;
  background-image: none !important;
  -webkit-mask: url("../v6/bird-perched.png") center / contain no-repeat;
  mask: url("../v6/bird-perched.png") center / contain no-repeat;
}

body[data-page="home"] .mega-layout::after,
body[data-page="home"] .manifesto-v4::before,
body[data-page="home"] .roots-timeline .roots-copy::after,
body[data-page="home"] .footer-grid::after {
  opacity: 1 !important;
}

/* Let the Our Story bird greet the chapter from its top edge, rather than
   trailing at the lower corner. */
body[data-page="home"] .roots-timeline .roots-copy::after {
  top: clamp(18px, 3vw, 46px) !important;
  bottom: auto !important;
}

@media (max-width: 680px) {
  body[data-page="home"] .roots-timeline .roots-copy::after {
    top: 16px !important;
    bottom: auto !important;
  }
}

/* Homepage product prices are intentionally quiet, not bold. */
body[data-page="home"] .product-card .money,
body[data-page="home"] .focus-product-info .money,
body[data-page="home"] .quick-view-price {
  font-weight: 400 !important;
}

/* Homepage — Curator's Choice -------------------------------------------- */

body[data-page="home"] .focus-product-info h3 {
  font-size: 18px !important;
  line-height: 1.2 !important;
}

/* Collection cards -------------------------------------------------------- */

body[data-page="collection"] .collection-grid .product-card-info {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  row-gap: 1.5px;
  padding-top: 12px;
}

body[data-page="collection"] .collection-grid .product-card-info h3 {
  min-height: 0;
  margin: 0 !important;
  line-height: 1.16;
}

body[data-page="collection"] .collection-grid .product-card-info .product-card-subtitle {
  min-height: 0;
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1.28;
}

body[data-page="collection"] .collection-grid .product-card-info .money {
  margin: 0 !important;
  line-height: 1.22;
}

/* Product purchase area --------------------------------------------------- */

@media (min-width: 901px) {
  body[data-page="product"] .pdp-info {
    padding-top: 40px !important;
  }
}

body[data-page="product"] .breadcrumbs {
  margin-bottom: 18px;
}

body[data-page="product"] .pdp-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
}

body[data-page="product"] .pdp-purchase-utilities {
  align-self: start;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  margin: 2px 0 0;
  padding: 0;
  border: 0 !important;
}

body[data-page="product"] .pdp-purchase-utilities button {
  min-height: 30px;
  padding: 0 12px;
}

body[data-page="product"] .pdp-purchase-utilities button:first-child {
  padding-left: 0;
}

body[data-page="product"] .pdp-purchase-utilities button + button {
  border-left: 1px solid var(--v6-line-warm) !important;
}

/* Establish one consistent vertical rhythm from price through colour and size. */
body[data-page="product"] .pdp-price-row,
body[data-page="product"] .option-block {
  margin-top: 24px;
}

/* Price-to-colour is deliberately more compact than colour-to-size. */
body[data-page="product"] #productOptions .option-block:first-child {
  margin-top: 14px;
}

body[data-page="product"] .size-guide-trigger {
  align-items: center;
  gap: 7px;
  padding-bottom: 0;
  border-bottom: 0 !important;
  text-decoration: none !important;
}

body[data-page="product"] .size-guide-trigger > span {
  display: inline-block;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
}

body[data-page="product"] .size-guide-trigger svg {
  flex: 0 0 auto;
  border: 0 !important;
}

/* Save / Share now sit beside the title, so no rule follows Add to Bag. */
body[data-page="product"] .pdp-actions + .pdp-purchase-utilities {
  border: 0 !important;
}

/* Recommendation carousels ------------------------------------------------ */

body[data-page="product"] .recommendations .section-heading {
  position: relative;
  display: block;
  min-height: 0;
  padding-inline: 56px;
}

body[data-page="product"] .recommendations .section-heading > div:first-child {
  display: block;
  width: 100%;
}

body[data-page="product"] .recommendations .pdp-rail-controls {
  position: absolute;
  top: 7px;
  right: 0;
  left: 0;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100% !important;
  height: 42px;
  grid-column: auto !important;
  grid-template-columns: none !important;
  margin: 0;
  pointer-events: none;
  transform: none;
}

body[data-page="product"] .recommendations .pdp-rail-controls .icon-button {
  pointer-events: auto;
}

body[data-page="product"] .recommendations .product-card-info {
  display: grid;
  grid-template-rows: minmax(2.32em, auto) minmax(2.56em, auto) auto;
  align-content: start;
  row-gap: 3px;
  padding-top: 12px;
}

body[data-page="product"] .recommendations .product-card-info h3 {
  min-height: 2.32em;
  margin: 0 !important;
  line-height: 1.16;
}

body[data-page="product"] .recommendations .product-card-info .product-card-subtitle {
  min-height: 2.56em;
  margin: 0 !important;
  line-height: 1.28;
}

body[data-page="product"] .recommendations .product-card-info .money {
  margin: 1px 0 0 !important;
  line-height: 1.22;
}

/* Recommendation cards do not always include a subtitle. In that case, keep
   the price directly beneath the title rather than reserving an empty row. */
body[data-page="product"] .recommendations .product-card-info:not(:has(.product-card-subtitle)) {
  grid-template-rows: auto auto;
  row-gap: 4px;
}

body[data-page="product"] .recommendations .product-card-info:not(:has(.product-card-subtitle)) h3 {
  min-height: 0;
}

@media (max-width: 900px) {
  body[data-page="product"] .pdp-title-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  body[data-page="product"] .pdp-purchase-utilities button {
    padding-inline: 9px;
  }
}

@media (max-width: 680px) {
  body[data-page="product"] .pdp-title-row {
    display: block;
  }

  body[data-page="product"] .pdp-purchase-utilities {
    justify-content: flex-start;
    margin-top: 10px;
  }

  body[data-page="product"] .recommendations .section-heading {
    padding-inline: 48px;
  }
}
