/* Match the header's 13px vertical stripes on the product section container. */
.liz-product-tabs-container {
  background: repeating-linear-gradient(
    to right,
    #f8dadc 0,
    #f8dadc 32px,
    #fbe8e8 32px,
    #fbe8e8 64px
  );
}

.liz-product-tabs .wp-block-tab-list button[aria-selected="true"]::before {
  display: none;
}
.liz-product-tabs .wp-block-tab-list button {
  padding-left: var(--wp--preset--spacing--50);
  padding-right: var(--wp--preset--spacing--50);
}
.liz-product-tabs .wp-block-tab-list button[aria-selected="true"] {
  background-color: var(--wp--preset--color--lavender);
  color: #fff !important;
}

/* Keep the editor's query loops editable; enhance only the front-end markup. */
.liz-product-tabs .liz-product-carousel {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  touch-action: auto;
}
.liz-product-tabs .liz-product-carousel::-webkit-scrollbar {
  display: none;
}
.liz-product-tabs .liz-product-carousel.is-embla-ready {
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y pinch-zoom;
}
.liz-product-tabs .liz-product-carousel.is-embla-ready:active {
  cursor: grabbing;
}
.liz-product-tabs .liz-product-carousel > .wp-block-post-template {
  display: flex;
  flex-wrap: nowrap;
  gap: 15px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.liz-product-tabs
  .liz-product-carousel
  > .wp-block-post-template
  > .wp-block-post {
  flex: 0 0 clamp(220px, 19.25vw, 308px);
  min-width: 0;
  margin: 0;
}
.liz-product-tabs
  .liz-product-carousel
  > .wp-block-post-template
  > .wp-block-post:first-child {
  margin-left: 20px;
}
.liz-product-tabs
  .liz-product-carousel
  > .wp-block-post-template
  > .wp-block-post:last-child {
  margin-right: 20px;
}
@media (max-width: 767px) {
  .liz-product-tabs .liz-product-carousel {
    box-sizing: border-box;
    padding-left: var(--wp--style--root--padding-left);
    padding-right: var(--wp--style--root--padding-right);
  }
  .liz-product-tabs .liz-product-carousel > .wp-block-post-template {
    /* Grid containment would collapse the intrinsic width of the scroll row. */
    container-type: normal;
    width: max-content;
    max-width: none;
  }
  .liz-product-tabs .wp-block-tab-list {
    box-sizing: border-box;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-left: var(--wp--style--root--padding-left);
    padding-right: var(--wp--style--root--padding-right);
    scroll-padding-left: var(--wp--style--root--padding-left);
    scroll-padding-right: var(--wp--style--root--padding-right);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .liz-product-tabs .wp-block-tab-list::-webkit-scrollbar {
    display: none;
  }
  .liz-product-tabs .wp-block-tab-list [role="tab"] {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .liz-product-tabs
    .liz-product-carousel
    > .wp-block-post-template
    > .wp-block-post:first-child {
    margin-left: 0;
  }
  .liz-product-tabs
    .liz-product-carousel
    > .wp-block-post-template
    > .wp-block-post:last-child {
    margin-right: 0;
  }
  .liz-product-tabs
    .liz-product-carousel
    > .wp-block-post-template
    > .wp-block-post {
    /* viewport = one card + 15px gap + one-third of the next card */
    flex-basis: calc(75vw - 22.5px);
  }
}
.liz-product-tabs .liz-product-carousel .wp-block-post-featured-image {
  margin: 0;
}
.liz-product-tabs .liz-product-carousel .wp-block-post-featured-image img {
  display: block;
  box-sizing: border-box;
  aspect-ratio: 1;
  width: 100%;
}
.liz-product-tabs .liz-product-carousel:focus-visible {
  outline: 2px solid #fae7ea;
  outline-offset: -2px;
}
.liz-product-tabs .wp-block-tab-list [role="tab"]:focus {
  outline: none !important;
  box-shadow: none !important;
}
.liz-product-tabs .wp-block-tab-list [role="tab"]:focus-visible {
  outline: 2px solid currentColor !important;
  outline-offset: 2px;
}

/* Shop header only; desktop product layout belongs to the Query Loop blocks. */
.liz-shop-products {
  position: relative;
}

.liz-shop-products > .wp-block-heading {
  position: absolute;
  top: -48px;
  left: max(var(--wp--style--root--padding-left), calc((100% - var(--wp--style--global--wide-size)) / 2));
  width: 301px;
  max-width: calc(100% - 40px);
  margin: 0 !important;
  font-size: 90px !important;
  line-height: 1;
  text-align: center;
  transform: rotate(-4deg);
}

.liz-shop-products > .wp-block-heading::after {
  content: "";
  display: block;
  width: 301px;
  max-width: 100%;
  height: 12px;
  background: url("../images/lets-shop-underline.png") center / 100% 100% no-repeat;
}

.liz-shop-products > .wp-block-buttons {
  position: absolute;
  top: 28px;
  right: max(var(--wp--style--root--padding-right), calc((100% - var(--wp--style--global--wide-size)) / 2));
  margin: 0 !important;
}

.liz-shop-products > .wp-block-buttons .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-inline: 16px;
}

.liz-shop-products > .wp-block-buttons .wp-block-button__link::after {
  content: "";
  flex: 0 0 24.5px;
  width: 24.5px;
  height: 15px;
  background: url("../images/shopmy-arrow.png") center / contain no-repeat;
}

@media (max-width: 767px) {
  .liz-shop-products > .wp-block-heading {
    left: 50%;
    transform: translateX(-50%) rotate(-4deg);
    font-size: clamp(64px, 18.2vw, 80px) !important;
  }

  .liz-shop-products > .wp-block-heading::after {
    width: 95%;
    margin: -8px auto 0;
  }

  .liz-shop-products > .wp-block-buttons {
    position: static;
    padding-block: 34px 62px;
    justify-content: center;
  }

  /* A constrained Tab Panel still needs a full-width native scroll viewport. */
  .liz-shop-products .wp-block-tab-panel {
    padding-inline: 0 !important;
  }

  .liz-shop-products .wp-block-tab-panel > .liz-product-carousel {
    max-width: none;
    margin-inline: 0;
  }
}
