/* navigation */

.navbar-search-no-results {
  display: none;
  position: absolute;
  background: #f70808;
  color: #fff;
  z-index: 1;
  top: calc(100% + 8px);
  padding: 12px;
  z-index: 2;
  line-height: 16px;
  border-radius: 8px;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
}

.navbar-search-no-results::before {
  content: "";
  position: absolute;
  border: 6px solid transparent;
  border-bottom: 4px solid #f70808;
  bottom: 100%;
  left: 24px;
  right: auto;
  top: auto;
  margin-top: 0;
}

.navbar-search-no-results.show {
  display: block;
}

.navbar-search-error,
.navbar-search-failed {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  margin: 0;
  color: #fff;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 16px;
  border-radius: 8px;
  background: #f70808;
  padding: 8px 12px;
  z-index: 2;
}

.navbar-search-error::before,
.navbar-search-failed::before {
  content: "";
  position: absolute;
  border: 6px solid transparent;
  border-bottom: 4px solid #f70808;
  bottom: 100%;
  left: 24px;
  right: auto;
  top: auto;
  margin-top: 0;
}

.navbar-search-error.show,
.navbar-search-failed.show {
  display: block;
}

/* mini cart - the WC widget wrappers sit between .mcart and the template's .mcart-body (woocommerce/cart/mini-cart.php).
   They carry .mcart's flex column down, so .mcart-items scrolls and .mcart-foot stays inside the panel:
   full height on desktop, the 85vh bottom sheet on phones */
.mcart > .widget_shopping_cart,
.mcart .widget_shopping_cart_content,
.mcart-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.mcart-foot {
  flex-shrink: 0;
}

/* breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 18px 0 20px;
  font-size: 14px;
  color: var(--fg-tertiary, #6b7a77);
}

.breadcrumbs .separator {
  font-size: 0;
  display: inline-block;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l6 6-6 6' fill='none' stroke='%236b7a77' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* phones: the trail stays on one line, 1px smaller than its desktop / page size; one still wider than the
   screen scrolls sideways instead of wrapping every crumb onto two lines. Touch swipes it with no scrollbar;
   a mouse (narrow desktop window) gets a thin one to drag, invisible until the trail is hovered (it keeps its
   space, so nothing moves) */
@media (max-width: 720px) {
  .breadcrumbs {
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
  }

  .breadcrumbs:hover {
    scrollbar-color: var(--ink-300) transparent;
  }

  .breadcrumbs>* {
    flex-shrink: 0;
  }

  .breadcrumbs li {
    font-size: calc(1em - 1px);
  }
}

@media (max-width: 720px) and (hover: none) {
  .breadcrumbs {
    scrollbar-width: none;
  }

  .breadcrumbs::-webkit-scrollbar {
    display: none;
  }
}





/* swiper */

body .swiper-scrollbar {
  position: relative !important;
  margin: 20px 0px 0px;
}

body .swiper-pagination-horizontal {
  text-align: center;
  margin: 10px 0px 14px;
}

body .swiper-pagination-bullet {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--ink-300);
  transition: width 0.18s, background 0.18s;
  opacity: 1;
}

body .swiper-pagination-bullet-active {
  width: 18px;
  height: 6px;
  border-radius: 3px;
  background: var(--ink-900);
  transition: width 0.18s, background 0.18s;
}

/* products slider - final slide widths before swiper inits (swiper.css makes every slide 100% wide until then),
   match the slidesPerView / spaceBetween breakpoints in init-swiper.js */
.products-slider:not(.swiper-initialized) .swiper-slide {
  width: calc((100% - 8px) / 2);
  margin-right: 8px;
}

@media (min-width: 560px) {
  .products-slider:not(.swiper-initialized) .swiper-slide {
    width: calc((100% - 40px) / 3);
    margin-right: 20px;
  }
}

@media (min-width: 768px) {
  .products-slider:not(.swiper-initialized) .swiper-slide {
    width: calc((100% - 60px) / 4);
  }
}

@media (min-width: 992px) {
  .products-slider:not(.swiper-initialized) .swiper-slide {
    width: calc((100% - 80px) / 5);
  }
}


/* google greptcha */

.grecaptcha-badge {
  visibility: hidden;
}

.grecaptcha-text {
  font-size: 14px;
  color: #000;
  line-height: 1.5;
  margin: 20px 0 0;
  text-align: center;
  padding: 0px;
}

.grecaptcha-text a {
  text-decoration: underline;
  color: #000;
}

/* single product */

.pdp-price.regular {
  color: var(--ink-900);
}

/* add to cart rejected (woo-add-to-cart.js) - styled like the woocommerce error notices (checkout.css) */
.pdp-atc-error {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #fbe3e0;
  border: 1px solid #f4b7b1;
  font-size: 13px;
  line-height: 1.55;
  color: #4a1412;
}

.pdp-atc-error p {
  margin: 0;
}

.pdp-atc-error p + p {
  margin-top: 6px;
}

.pdp-atc-error a {
  color: #a8291f;
  font-weight: 600;
  text-decoration: underline;
}


.product__sliders-box .product__thumbnails-slider {
  flex: 1 0 64px;
}

/* desktop: the thumbs rail runs the main image's full height. contain: size leaves the thumbs out of the
   row's height, so the rail stretches to the image instead of setting a height of its own - photos that
   don't fit scroll inside it (init-swiper.js) */
@media (min-width: 901px) {
  .product__sliders-box .product__thumbnails-slider {
    contain: size;
  }

  /* square, from .pdp-gallery-thumb's aspect-ratio - swiper's height: 100% would stretch one thumb over the rail */
  .product__sliders-box .product__thumbnails-slider .swiper-slide {
    height: auto;
  }
}

.product__sliders-box .product__thumbnails-slider {
  overflow-y: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent 100%);
}

/* the bottom fade hints at more photos - none once they all fit or the rail is scrolled to the end */
.product__sliders-box .product__thumbnails-slider.is-end {
  mask-image: none;
  -webkit-mask-image: none;
}

.product__sliders-box .product__thumbnails-slider .swiper-slide img {
  max-width: 64px;
  max-height: 64px;
}

.product__sliders-box .product__main-slider {
  flex: 0 1 auto;
}

.product__sliders-box .product__main-slider .swiper-slide img {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--ink-100);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product__sliders-box {
  display: flex;
  gap: 14px;
}

/* desktop: the gallery rides alongside the buy box - align-self keeps it from stretching
   to the buy box height; --pdp-gal-top pins a taller-than-viewport gallery by its bottom (custom.js) */
@media (min-width: 901px) {
  .product__sliders-box {
    position: sticky;
    top: var(--pdp-gal-top, 24px);
    align-self: start;
  }
}

.product__thumbnails-slider .swiper-slide-thumb-active {
  border-color: var(--ink-900);
  background: rgb(255, 255, 255);
}

/* mobile: full-bleed image, thumbs as a horizontal strip below it
   (thumbs swiper switches direction at the same 900px - init-swiper.js) */
@media (max-width: 900px) {

  /* negative margins cancel the .container side padding, the thumbs strip adds it back */
  .product__sliders-box {
    flex-direction: column;
    gap: 10px;
    margin-left: -24px;
    margin-right: -24px;
  }

  .product__sliders-box .product__main-slider,
  .product__sliders-box>figure {
    order: 1;
    width: 100%;
  }

  .product__sliders-box .product__main-slider .swiper-slide img,
  .product__sliders-box>figure img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--ink-100);
    border: 1px solid var(--border);
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .product__sliders-box .product__thumbnails-slider {
    order: 2;
    flex: none;
    height: auto;
    margin: 0 24px;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .product__sliders-box .product__thumbnails-slider .pdp-gallery-thumb {
    width: 60px;
  }

  .product__sliders-box .product__thumbnails-slider .swiper-slide img {
    max-width: none;
    max-height: none;
  }

  /* a single photo needs no strip */
  .product__sliders-box .product__thumbnails-slider:has(.swiper-slide:only-child) {
    display: none;
  }

  /* prev / next arrows - swipe + thumbs on touch */
  .product__sliders-box .product__sliders-button {
    display: none;
  }
}

@media (max-width: 720px) {
  .product__sliders-box {
    margin-left: -14px;
    margin-right: -14px;
  }

  .product__sliders-box .product__thumbnails-slider {
    margin: 0 14px;
  }
}


/* product category + brands */

.loader-spinner::before {
  content: '';
  position: absolute;
  z-index: 11;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.7);
}

.loader-spinner::after {
  content: '';
  position: absolute;
  z-index: 12;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  width: 30px;
  height: 30px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%234D6562' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%0A%3E%3Cpath d='M21 12a9 9 0 11-6.219-8.56' /%3E%3C/svg%3E");
  animation: spin 0.5s infinite linear;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* video tiles + modal - ring spinning round the play button until the video plays (main.js .is-loading) */
.ct-video-play > span {
  position: relative;
}

.story-thumb-play::after,
.ct-video-play > span::after,
.vt-bigplay::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .25);
  border-top-color: #fff;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}

.story-thumb.is-loading .story-thumb-play::after,
.ct-video.is-loading .ct-video-play > span::after,
.vt-overlay.is-loading .vt-bigplay::after {
  opacity: 1;
  animation: spin .8s linear infinite;
}

/* the modal hides its play button on 'play' - before the video has a frame */
.vt-overlay.is-loading .vt-bigplay {
  display: flex;
}

/* woocommerce - site-wide (was woo-custom.css, which now loads on checkout / cart / account only) */
a.added_to_cart.wc-forward {
    display: none !important;
}

.cart-popup__box>.widget_shopping_cart,
.cart-popup__box .widget_shopping_cart_content {
    display: contents;
}

wc-order-attribution-inputs {
    display: none;
}
