/* GenFul homepage shoppable video rail and story viewer. */

.gf-shoppable-section {
  position: relative;
  overflow: hidden;
  padding: clamp(44px, 6vw, 80px) 0;
  background: #fff8fb;
  border-top: 1px solid #f2dce6;
  border-bottom: 1px solid #f2dce6;
}

.gf-shoppable-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.gf-shoppable-heading h2 {
  margin-top: 10px;
  color: #241e2b;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.gf-shoppable-heading h2 em {
  color: #e94f91;
  font-weight: 500;
}

.gf-shoppable-rail-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
}

.gf-shoppable-rail-controls button,
.gf-story-top-actions button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #ded8e3;
  border-radius: 50%;
  background: #fff;
  color: #241e2b;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.gf-shoppable-rail-controls button:hover:not(:disabled),
.gf-shoppable-rail-controls button:focus-visible,
.gf-story-top-actions button:hover,
.gf-story-top-actions button:focus-visible {
  border-color: #241e2b;
  background: #241e2b;
  color: #fff;
}

.gf-shoppable-rail-controls button:active:not(:disabled) {
  transform: scale(.95);
}

.gf-shoppable-rail-controls button:disabled {
  cursor: default;
  opacity: .35;
}

.gf-shoppable-rail-controls svg,
.gf-story-top-actions svg,
.gf-story-peek svg,
.gf-story-play-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gf-shoppable-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(190px, 20vw, 252px);
  gap: clamp(12px, 1.6vw, 20px);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
  cursor: grab;
  padding: 2px 1px 8px;
}

.gf-shoppable-rail.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
  user-select: none;
}

.gf-shoppable-rail.is-dragging * {
  pointer-events: none;
}

.gf-shoppable-rail::-webkit-scrollbar,
.gf-story-products::-webkit-scrollbar {
  display: none;
}

.gf-shoppable-card {
  min-width: 0;
  scroll-snap-align: start;
}

.gf-shoppable-card-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.gf-shoppable-card-button:focus-visible {
  outline: 3px solid rgba(233, 79, 145, .42);
  outline-offset: 4px;
}

.gf-shoppable-media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(36, 30, 43, .12);
  border-radius: 8px;
  background: #eee9ef;
  box-shadow: 0 12px 30px rgba(56, 42, 63, .11);
  transform: translateZ(0);
}

.gf-shoppable-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #eee9ef;
  transition: transform 450ms cubic-bezier(.2, .75, .25, 1);
  -webkit-user-drag: none;
  user-select: none;
}

.gf-shoppable-card-button:hover .gf-shoppable-media video {
  transform: scale(1.025);
}

.gf-shoppable-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(20, 14, 24, .02) 35%, rgba(20, 14, 24, .78) 100%);
}

.gf-shoppable-play {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  background: rgba(255, 255, 255, .88);
  color: #241e2b;
  box-shadow: 0 5px 15px rgba(20, 14, 24, .18);
  transition: transform 180ms ease, background-color 180ms ease;
}

.gf-shoppable-play svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.gf-shoppable-card-button:hover .gf-shoppable-play {
  transform: scale(1.08);
  background: #fff;
}

.gf-shoppable-position {
  position: absolute;
  top: 17px;
  left: 14px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .45);
}

.gf-shoppable-card-copy {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: grid;
  gap: 9px;
  color: #fff;
}

.gf-shoppable-card-copy > strong {
  display: -webkit-box;
  overflow: hidden;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(18px, 1.65vw, 22px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .38);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.gf-shoppable-product-chip {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 6px 9px 6px 6px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 7px;
  background: rgba(255, 255, 255, .93);
  color: #241e2b;
  box-shadow: 0 5px 18px rgba(20, 14, 24, .18);
  backdrop-filter: blur(7px);
}

.gf-shoppable-product-chip img {
  width: 36px;
  height: 36px;
  border-radius: 5px;
  object-fit: cover;
  background: #f6f3f5;
}

.gf-shoppable-product-chip > span {
  min-width: 0;
}

.gf-shoppable-product-chip b,
.gf-shoppable-product-chip small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gf-shoppable-product-chip b {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.gf-shoppable-product-chip small {
  margin-top: 2px;
  color: #746c7c;
  font-size: 10px;
  font-weight: 700;
}

body.gf-story-open {
  overflow: hidden;
}

.gf-story-modal[hidden] {
  display: none !important;
}

.gf-story-modal {
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 54px 24px 24px;
  isolation: isolate;
}

.gf-story-backdrop {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(11, 9, 13, .94);
  backdrop-filter: blur(12px);
}

.gf-story-dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(100px, 180px) minmax(280px, 430px) minmax(100px, 180px);
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.2vw, 34px);
  width: min(100%, 1040px);
  height: min(82vh, 765px);
  color: #fff;
}

.gf-story-progress {
  position: fixed;
  z-index: 5;
  top: max(12px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  left: max(18px, env(safe-area-inset-left));
  display: flex;
  gap: 5px;
  height: 3px;
}

.gf-story-progress span {
  position: relative;
  flex: 1 1 0;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, .28);
}

.gf-story-progress span::after {
  position: absolute;
  inset: 0;
  width: var(--story-progress, 0%);
  background: #fff;
  content: "";
  transition: width 80ms linear;
}

.gf-story-progress span.is-complete::after {
  width: 100%;
}

.gf-story-topbar {
  position: fixed;
  z-index: 8;
  top: max(24px, calc(env(safe-area-inset-top) + 11px));
  right: max(24px, env(safe-area-inset-right));
  left: max(24px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.gf-story-counter {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  background: rgba(20, 16, 23, .58);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.gf-story-top-actions {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.gf-story-top-actions button {
  border-color: rgba(255, 255, 255, .34);
  background: rgba(20, 16, 23, .58);
  color: #fff;
  backdrop-filter: blur(8px);
}

.gf-story-top-actions .gf-sound-off,
.gf-story-top-actions button.is-muted .gf-sound-on {
  display: none;
}

.gf-story-top-actions button.is-muted .gf-sound-off {
  display: block;
}

.gf-story-stage,
.gf-story-peek {
  position: relative;
  overflow: hidden;
  height: 100%;
  max-height: 765px;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  background: #151117;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .48);
}

.gf-story-stage {
  grid-column: 2;
  width: auto;
  max-width: 430px;
  justify-self: center;
}

.gf-story-stage > video {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #151117;
}

.gf-story-loading-poster {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.gf-story-loading-poster.is-hidden {
  opacity: 0;
}

.gf-story-video-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .05) 48%, rgba(9, 7, 10, .86) 100%);
}

.gf-story-copy {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 132px;
  left: 14px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}

.gf-story-copy p {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.gf-story-copy h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(21px, 2vw, 28px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0;
}

.gf-story-play-toggle {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .64);
  border-radius: 50%;
  background: rgba(20, 16, 23, .52);
  color: #fff;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 180ms ease, background-color 180ms ease;
  backdrop-filter: blur(8px);
}

.gf-story-stage:hover .gf-story-play-toggle,
.gf-story-play-toggle:focus-visible,
.gf-story-play-toggle.is-paused {
  opacity: 1;
}

.gf-story-play-toggle:hover {
  background: rgba(20, 16, 23, .82);
}

.gf-story-play-toggle .gf-story-play-icon,
.gf-story-play-toggle.is-paused .gf-story-pause-icon {
  display: none;
}

.gf-story-play-toggle.is-paused .gf-story-play-icon {
  display: block;
}

.gf-story-products {
  position: absolute;
  z-index: 3;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}

.gf-story-product {
  display: grid;
  flex: 0 0 calc(100% - 2px);
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 104px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  color: #241e2b;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  scroll-snap-align: start;
  text-shadow: none;
  backdrop-filter: blur(10px);
}

.gf-story-product-image {
  display: block;
  width: 58px;
  height: 72px;
  overflow: hidden;
  border-radius: 6px;
  background: #f5f1f4;
}

.gf-story-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gf-story-product-copy {
  min-width: 0;
}

.gf-story-product-name {
  display: -webkit-box;
  overflow: hidden;
  color: #241e2b;
  font-family: "Fraunces", Georgia, serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.gf-story-product-name:hover,
.gf-story-product-name:focus-visible {
  color: #d93e81;
  text-decoration: underline;
}

.gf-story-product-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 800;
}

.gf-story-product-price del {
  color: #8b8392;
  font-size: 11px;
  font-weight: 600;
}

.gf-story-product-discount {
  display: inline-block;
  margin-top: 4px;
  color: #d93e81;
  font-size: 10px;
  font-weight: 800;
}

.gf-story-add {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #241e2b;
  color: #fff;
  transition: background-color 180ms ease, transform 180ms ease;
}

.gf-story-add svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gf-story-add:hover:not(:disabled),
.gf-story-add:focus-visible {
  background: #d93e81;
}

.gf-story-add:active:not(:disabled) {
  transform: scale(.94);
}

.gf-story-add:disabled {
  cursor: not-allowed;
  background: #a49da8;
}

.gf-story-add.is-added {
  background: #2c9b73;
}

.gf-story-peek {
  width: 100%;
  height: 76%;
  max-height: 600px;
  padding: 0;
  border-color: rgba(255, 255, 255, .12);
  opacity: .5;
  transition: opacity 180ms ease, transform 180ms ease;
}

.gf-story-peek:hover:not(:disabled),
.gf-story-peek:focus-visible {
  opacity: .82;
  transform: scale(1.015);
}

.gf-story-peek:disabled {
  visibility: hidden;
}

.gf-story-peek img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gf-story-peek > span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  background: rgba(18, 14, 20, .62);
  color: #fff;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(6px);
}

.gf-story-peek-prev {
  grid-column: 1;
}

.gf-story-peek-next {
  grid-column: 3;
}

@media (max-width: 767px) {
  .gf-shoppable-section {
    padding: 42px 0 48px;
  }

  .gf-shoppable-heading {
    align-items: center;
    margin-bottom: 20px;
  }

  .gf-shoppable-heading h2 {
    font-size: 32px;
  }

  .gf-shoppable-rail-controls {
    display: none;
  }

  .gf-shoppable-rail {
    grid-auto-columns: minmax(190px, 66vw);
    margin-right: calc(var(--gf-gutter, 20px) * -1);
    padding-right: var(--gf-gutter, 20px);
  }

  .gf-story-modal {
    padding: 0;
  }

  .gf-story-dialog {
    display: block;
    width: 100%;
    height: 100dvh;
    max-height: none;
  }

  .gf-story-stage {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
  }

  .gf-story-stage > video {
    object-fit: contain;
  }

  .gf-story-peek {
    position: fixed;
    z-index: 7;
    top: 44%;
    display: grid;
    width: 42px;
    height: 58px;
    place-items: center;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    transform: translateY(-50%);
  }

  .gf-story-peek:hover:not(:disabled),
  .gf-story-peek:focus-visible {
    transform: translateY(-50%);
  }

  .gf-story-peek-prev {
    left: max(8px, env(safe-area-inset-left));
  }

  .gf-story-peek-next {
    right: max(8px, env(safe-area-inset-right));
  }

  .gf-story-peek img {
    display: none;
  }

  .gf-story-peek > span {
    position: static;
    width: 36px;
    height: 48px;
    border-color: rgba(255, 255, 255, .38);
    transform: none;
  }

  .gf-story-topbar {
    top: max(25px, calc(env(safe-area-inset-top) + 12px));
    right: max(12px, env(safe-area-inset-right));
    left: max(12px, env(safe-area-inset-left));
  }

  .gf-story-progress {
    right: max(10px, env(safe-area-inset-right));
    left: max(10px, env(safe-area-inset-left));
  }

  .gf-story-copy {
    right: 12px;
    bottom: calc(126px + env(safe-area-inset-bottom));
    left: 12px;
  }

  .gf-story-products {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
  }

  .gf-story-product {
    min-height: 106px;
  }
}

@media (max-width: 390px) {
  .gf-shoppable-rail {
    grid-auto-columns: 72vw;
  }

  .gf-story-product {
    grid-template-columns: 52px minmax(0, 1fr) 40px;
    gap: 7px;
    padding: 8px;
  }

  .gf-story-product-image {
    width: 52px;
    height: 68px;
  }

  .gf-story-add {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gf-shoppable-rail,
  .gf-shoppable-media video,
  .gf-shoppable-play,
  .gf-story-peek,
  .gf-story-progress span::after {
    scroll-behavior: auto;
    transition: none;
  }
}
