/* KUANGXIANG — editable homepage v6.5 */

.kx-home {
  --kx-navy: #101849;
  --kx-blue: #4656dc;
  --kx-paper: #f8f3e9;
  --kx-card: #eee7d8;
  --kx-ink: #111426;
  --kx-muted: #79766d;
  --kx-line: rgba(17, 20, 38, .13);
  overflow-x: clip;
  overflow-y: visible;
  background: var(--kx-paper);
  color: var(--kx-ink);
  font-family: "Montserrat", "Manrope", sans-serif;
}

.kx-home *,
.kx-home *::before,
.kx-home *::after {
  box-sizing: border-box;
}

.kx-home img {
  display: block;
  width: 100%;
}

.kx-home h1,
.kx-home h2,
.kx-home h3 {
  font-family: "Cormorant Garamond", "Fraunces", serif;
}

.kx-home-wrap {
  width: min(calc(100% - 80px), 1240px);
  margin-inline: auto;
}

.kx-home-sections {
  display: flex;
  flex-direction: column;
  gap: 96px;
  padding: 92px 0 110px;
}

.kx-home-section {
  min-width: 0;
}

/* Hero */
.kx-home-hero-shell {
  position: relative;
}

.kx-home-hero {
  position: relative;
  min-height: calc(100vh - 94px);
  min-height: calc(100svh - 94px);
  overflow: hidden;
  background: #000;
}

.kx-home-hero-picture,
.kx-home-hero-picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.kx-home-hero-picture img {
  object-fit: cover;
  object-position: center;
}

.kx-home-hero-cta {
  position: absolute;
  z-index: 3;
  left: clamp(40px, 13vw, 220px);
  top: 50%;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  background: rgba(28, 29, 32, .76);
  box-shadow: 0 15px 42px rgba(0, 0, 0, .22);
  color: #fff;
  opacity: 0;
  transform: translateY(-50%);
  animation: kx-home-cta-in .7s cubic-bezier(.22, .61, .36, 1) .45s forwards;
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
}

.kx-home-hero-cta span {
  padding: 0 13px 0 18px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.kx-home-hero-cta strong {
  font-size: 15px;
  font-weight: 700;
}

.kx-home-hero-cta a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--kx-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .075em;
  text-decoration: none;
  transition: background-color .22s ease, transform .22s ease;
  white-space: nowrap;
}

.kx-home-hero-cta a:hover,
.kx-home-hero-cta a:focus-visible {
  background: #3344ce;
  transform: translateY(-1px);
}

@keyframes kx-home-cta-in {
  to {
    opacity: 1;
  }
}

/* Products */
.kx-home-products {
  scroll-margin-top: 110px;
}

.kx-home-products h2 {
  margin: 0 0 42px;
  color: var(--kx-navy);
  font-size: clamp(38px, 4.5vw, 64px);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: .95;
}

.kx-home-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
}

.kx-home-product-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--kx-line);
  background: var(--kx-paper);
}

.kx34-product-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: transparent;
}

.kx34-product-image {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
}

.kx34-product-image-primary {
  position: relative;
  z-index: 1;
  opacity: 1;
  visibility: visible;
}

.kx34-product-image-hover {
  position: absolute;
  z-index: 2;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

@media (hover: hover) and (pointer: fine) {
  .kx34-product-media:has(.kx34-product-image-hover):hover .kx34-product-image-primary {
    opacity: 0;
    visibility: hidden;
  }

  .kx34-product-media:hover .kx34-product-image-hover {
    opacity: 1;
    visibility: visible;
  }
}

@media (hover: none), (pointer: coarse) {
  .kx34-product-image-primary {
    opacity: 1 !important;
  }

  .kx34-product-image-hover {
    display: none !important;
  }

  .kx34-product-media.is-mobile-hover .kx34-product-image-primary {
    opacity: 0 !important;
    visibility: hidden;
  }

  .kx34-product-media.is-mobile-hover .kx34-product-image-hover {
    display: block !important;
    opacity: 1 !important;
    visibility: visible;
  }
}

.kx-home-badge {
  position: absolute;
  z-index: 4;
  top: 16px;
  left: 16px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--kx-navy);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.kx-home-badge.is-blue {
  background: var(--kx-blue);
}

.kx-home-product-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 25px 23px 27px;
  background: var(--kx-card);
}

.kx-home-product-name {
  color: var(--kx-navy);
  font-family: "Cormorant Garamond", "Fraunces", serif;
  font-size: 25px;
  font-style: italic;
  font-weight: 700;
  line-height: 1.05;
  text-decoration: none;
}

.kx-home-product-copy > p {
  min-height: 3.2em;
  margin: 9px 0 0;
  color: var(--kx-muted);
  font-size: 12px;
  line-height: 1.6;
}

.kx-home-product-buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 21px;
}

.kx-home-product-price {
  color: var(--kx-ink);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.kx-home-product-price del {
  margin-right: 5px;
  opacity: .43;
  font-size: .86em;
}

.kx-home-product-price ins {
  text-decoration: none;
}

.kx-home-buy.button {
  display: inline-flex !important;
  min-height: 38px !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 18px !important;
  border: 1.5px solid var(--kx-ink) !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--kx-ink) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .065em !important;
  line-height: 1.1 !important;
  text-align: center !important;
  text-transform: uppercase !important;
  transition: background-color .2s ease, color .2s ease !important;
  white-space: nowrap !important;
}

.kx-home-buy.button:hover,
.kx-home-buy.button:focus-visible {
  background: var(--kx-ink) !important;
  color: #fff !important;
}

.kx-home-buy.button.shop-in-cart {
  background: var(--kx-ink) !important;
  color: #fff !important;
}

.kx-home-product-buy .added_to_cart.wc-forward {
  display: none !important;
}

.kx-home-empty {
  padding: 40px;
  border: 1px dashed var(--kx-line);
  color: var(--kx-muted);
  text-align: center;
}

/* Shared image treatment */
.kx-home-bigphoto picture,
.kx-home-story-media,
.kx-home-framed-media,
.kx-home-three figure > div,
.kx-home-double picture {
  display: block;
  overflow: hidden;
  border-radius: 28px;
  background: #e7e0d3;
}

.kx-home-bigphoto picture {
  aspect-ratio: 16 / 9;
}

.kx-home-bigphoto img,
.kx-home-story-media img,
.kx-home-framed-media img,
.kx-home-three img,
.kx-home-double img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Image + text */
.kx-home-story-grid {
  display: grid;
  grid-template-areas:
    "eyebrow media"
    "copy media";
  grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
  column-gap: clamp(48px, 8vw, 130px);
  align-items: start;
}

.kx-home-eyebrow {
  grid-area: eyebrow;
  margin: 2px 0 58px;
  color: var(--kx-blue);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.kx-home-story-media {
  grid-area: media;
  aspect-ratio: 4 / 3;
}

.kx-home-story-copy {
  grid-area: copy;
  align-self: center;
  max-width: 500px;
}

.kx-home-story-copy h2,
.kx-home-framed-copy h2 {
  margin: 0 0 26px;
  color: var(--kx-navy);
  font-size: clamp(40px, 5vw, 67px);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: .98;
}

.kx-home-story-copy p,
.kx-home-framed-copy p {
  margin: 0;
  color: #55534d;
  font-size: 15px;
  line-height: 1.85;
}

/* Framed image + text */
.kx-home-framed-card {
  display: grid;
  grid-template-areas:
    "media eyebrow"
    "media copy";
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  column-gap: clamp(44px, 7vw, 105px);
  align-items: start;
  padding: clamp(32px, 5vw, 72px);
  border-radius: 34px;
  background: #eee6d6;
}

.kx-home-framed-card > .kx-home-eyebrow {
  grid-area: eyebrow;
}

.kx-home-framed-media {
  grid-area: media;
  aspect-ratio: 4 / 3;
}

.kx-home-framed-copy {
  grid-area: copy;
  align-self: center;
}

/* Three photos */
.kx-home-three-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.kx-home-three figure {
  min-width: 0;
  margin: 0;
}

.kx-home-three figure > div {
  aspect-ratio: 9 / 16;
}

.kx-home-three figcaption {
  padding: 20px 8px 0;
  color: var(--kx-navy);
  font-family: "Cormorant Garamond", "Fraunces", serif;
  font-size: clamp(25px, 2.5vw, 34px);
  font-style: italic;
  font-weight: 600;
  text-align: center;
}

/* Navy facts strip */
.kx-home-strip {
  position: relative;
  padding: 72px 0;
  overflow: hidden;
  background: var(--kx-navy);
  color: #fff;
}

.kx-home-strip::before {
  position: absolute;
  width: min(42vw, 620px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 50%;
  content: "";
  right: -13%;
  top: -92%;
}

.kx-home-strip-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(40px, 7vw, 100px);
}

.kx-home-strip article {
  min-width: 0;
}

.kx-home-strip span {
  display: block;
  margin-bottom: 28px;
  color: #9ba7ff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: .18em;
}

.kx-home-strip h2 {
  margin: 0 0 15px;
  font-size: clamp(28px, 3vw, 38px);
  font-style: italic;
  font-weight: 600;
  line-height: 1.05;
}

.kx-home-strip p {
  margin: 0;
  color: rgba(255, 255, 255, .7);
  font-size: 12px;
  line-height: 1.75;
}

/* Final pair */
.kx-home-double-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.kx-home-double picture {
  aspect-ratio: 16 / 9;
}

.kx-home-double > .kx-home-wrap > p {
  max-width: 850px;
  margin: 46px auto 0;
  color: var(--kx-navy);
  font-family: "Cormorant Garamond", "Fraunces", serif;
  font-size: clamp(34px, 4.8vw, 64px);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.03;
  text-align: center;
  text-wrap: balance;
}

@media (max-width: 980px) {
  .kx-home-wrap {
    width: min(calc(100% - 48px), 1240px);
  }

  .kx-home-sections {
    gap: 76px;
    padding: 76px 0 90px;
  }

  .kx-home-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kx-home-story-grid,
  .kx-home-framed-card {
    column-gap: 44px;
  }

  .kx-home-strip-grid {
    gap: 46px;
  }
}

@media (max-width: 760px) {
  .kx-home-wrap {
    width: calc(100% - 32px);
  }

  .kx-home-sections {
    gap: 66px;
    padding: 64px 0 78px;
  }

  .kx-home-hero {
    height: calc(100vh - var(--kx-mobile-header-height, 84px));
    height: calc(100lvh - var(--kx-mobile-header-height, 84px));
    min-height: calc(100vh - var(--kx-mobile-header-height, 84px));
    min-height: calc(100lvh - var(--kx-mobile-header-height, 84px));
  }

  .kx-home-hero-picture img {
    object-position: center;
  }

  .kx-home-hero-cta {
    position: fixed;
    z-index: 99;
    top: auto;
    right: auto;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    width: max-content;
    max-width: calc(100vw - 28px);
    transform: translateX(-50%) translateY(0) scale(1);
    transform-origin: center bottom;
    animation: kx-home-cta-mobile-in .7s cubic-bezier(.22, .61, .36, 1) .45s forwards;
    transition: transform .38s ease-in-out, opacity .28s ease-in-out;
  }

  .kx-home-hero-cta.is-compact {
    transform: translateX(-50%) translateY(0) scale(.52);
  }

  .kx-home-hero-cta span {
    padding-inline: 15px 10px;
    font-size: 12px;
  }

  .kx-home-hero-cta strong {
    font-size: 13px;
  }

  .kx-home-hero-cta a {
    min-height: 48px;
    padding-inline: 22px;
    font-size: 10px;
  }

  @keyframes kx-home-cta-mobile-in {
    to {
      opacity: 1;
    }
  }

  .kx-home-products h2 {
    margin-bottom: 30px;
    font-size: 39px;
  }

  .kx-home-product-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .kx-home-product-copy > p {
    min-height: 0;
  }

  .kx-home-bigphoto picture {
    aspect-ratio: 3 / 4;
  }

  .kx-home-bigphoto picture,
  .kx-home-story-media,
  .kx-home-framed-media,
  .kx-home-three figure > div,
  .kx-home-double picture {
    border-radius: 20px;
  }

  .kx-home-story-grid {
    grid-template-areas:
      "eyebrow"
      "media"
      "copy";
    grid-template-columns: 1fr;
  }

  .kx-home-eyebrow {
    margin: 0 0 22px;
  }

  .kx-home-story-copy {
    margin-top: 28px;
  }

  .kx-home-story-copy h2,
  .kx-home-framed-copy h2 {
    margin-bottom: 17px;
    font-size: 40px;
    line-height: .98;
  }

  .kx-home-story-copy p,
  .kx-home-framed-copy p {
    font-size: 14px;
    line-height: 1.75;
  }

  .kx-home-framed-card {
    grid-template-areas:
      "eyebrow"
      "media"
      "copy";
    grid-template-columns: 1fr;
    padding: 24px;
    border-radius: 26px;
  }

  .kx-home-framed-copy {
    margin-top: 28px;
  }

  .kx-home-three-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .kx-home-three figure {
    width: min(100%, 520px);
    margin-inline: auto;
  }

  .kx-home-three figcaption {
    padding-top: 14px;
    font-size: 28px;
  }

  .kx-home-strip {
    padding: 58px 0;
  }

  .kx-home-strip::before {
    width: 90vw;
    top: -12%;
    right: -50%;
  }

  .kx-home-strip-grid {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .kx-home-strip span {
    margin-bottom: 17px;
  }

  .kx-home-strip h2 {
    font-size: 31px;
  }

  .kx-home-double-images {
    gap: 12px;
  }

  .kx-home-double picture {
    aspect-ratio: 3 / 4;
  }

  .kx-home-double > .kx-home-wrap > p {
    margin-top: 32px;
    font-size: 36px;
  }
}

/* Mobile Safari keeps a translucent browser dock over the bottom of the page.
   Extend only the iOS/WebKit hero so the photograph continues behind that dock. */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 760px) {
    .kx-home-hero {
      height: calc(100lvh - var(--kx-mobile-header-height, 84px) + clamp(64px, 8lvh, 84px));
      min-height: calc(100lvh - var(--kx-mobile-header-height, 84px) + clamp(64px, 8lvh, 84px));
    }
  }
}

@media (max-width: 430px) {
  .kx-home-product-buy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .kx-home-product-price {
    min-width: 0;
    white-space: normal;
  }

  .kx-home-buy.button {
    min-width: 148px;
    padding-inline: 15px !important;
  }

  .kx-home-framed-card {
    padding: 18px;
  }
}

@media (max-width: 760px) and (orientation: landscape) and (max-height: 540px) {
  .kx-home-hero {
    height: calc(100lvh - var(--kx-mobile-header-height, 84px));
    min-height: calc(100lvh - var(--kx-mobile-header-height, 84px));
  }

  .kx-home-hero-cta {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .kx-home *,
  .kx-home *::before,
  .kx-home *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}
