/**
 * Phase 21 — shared premium carousel navigation.
 * Uses native WoodMart/Swiper controls and does not alter carousel geometry.
 */

:is(
  .home-amazing .amazing-sale-products,
  .home-featured .featured-products-carousel,
  .home-gifts .gift-products-carousel,
  .home-editorial .project-editorial-cards,
  .home-magazine .project-magazine-cards
) {
  --project-carousel-control-size: 38px;
  --project-carousel-control-bg: rgba(255, 255, 255, .96);
  --project-carousel-control-color: #c10917;
  --project-carousel-control-shadow: 0 4px 14px rgba(35, 35, 35, .1);
  --project-carousel-dot: rgba(35, 35, 35, .24);
  --project-carousel-dot-active: #c10917;
}

/* Native WoodMart arrows: preserve placement, replace only their visual system. */
:is(
  .home-amazing .amazing-sale-products,
  .home-featured .featured-products-carousel,
  .home-gifts .gift-products-carousel,
  .home-editorial .project-editorial-cards,
  .home-magazine .project-magazine-cards
) .wd-btn-arrow {
  width: var(--project-carousel-control-size);
  height: var(--project-carousel-control-size);
  border: 0;
  border-radius: 50%;
  background: var(--project-carousel-control-bg);
  color: var(--project-carousel-control-color);
  box-shadow: var(--project-carousel-control-shadow);
  opacity: 1 !important;
  transition: color .22s ease, background-color .22s ease, box-shadow .22s ease, transform .22s ease, opacity .22s ease;
}

:is(
  .home-amazing .amazing-sale-products,
  .home-featured .featured-products-carousel,
  .home-gifts .gift-products-carousel,
  .home-editorial .project-editorial-cards,
  .home-magazine .project-magazine-cards
) .wd-btn-arrow .wd-arrow-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: inherit;
}

.home-gifts .gift-products-carousel .wd-btn-arrow .wd-arrow-inner {
  color: inherit !important;
}

:is(
  .home-amazing .amazing-sale-products,
  .home-featured .featured-products-carousel,
  .home-gifts .gift-products-carousel,
  .home-editorial .project-editorial-cards,
  .home-magazine .project-magazine-cards
) .wd-btn-arrow .wd-arrow-inner::after {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  font-family: initial;
  transition: transform .22s ease;
}

:is(
  .home-amazing .amazing-sale-products,
  .home-featured .featured-products-carousel,
  .home-gifts .gift-products-carousel,
  .home-editorial .project-editorial-cards,
  .home-magazine .project-magazine-cards
) .wd-btn-arrow.wd-prev .wd-arrow-inner::after {
  transform: rotate(-135deg);
}

:is(
  .home-amazing .amazing-sale-products,
  .home-featured .featured-products-carousel,
  .home-gifts .gift-products-carousel,
  .home-editorial .project-editorial-cards,
  .home-magazine .project-magazine-cards
) .wd-btn-arrow.wd-next .wd-arrow-inner::after {
  transform: rotate(45deg);
}

@media (hover: hover) and (pointer: fine) {
  :is(
    .home-amazing .amazing-sale-products,
    .home-featured .featured-products-carousel,
    .home-gifts .gift-products-carousel,
    .home-editorial .project-editorial-cards,
    .home-magazine .project-magazine-cards
  ) .wd-btn-arrow:not(.wd-disabled):hover {
    background: #c10917;
    color: #fff;
    box-shadow: 0 6px 18px rgba(193, 9, 23, .22);
    transform: translateY(-1px);
  }
}

:is(
  .home-amazing .amazing-sale-products,
  .home-featured .featured-products-carousel,
  .home-gifts .gift-products-carousel,
  .home-editorial .project-editorial-cards,
  .home-magazine .project-magazine-cards
) .wd-btn-arrow.wd-disabled {
  opacity: .45 !important;
  cursor: default;
  box-shadow: 0 4px 14px rgba(35, 35, 35, .08);
}

/* WoodMart bullet pagination: compact circles and a clear active pill. */
:is(
  .home-amazing .amazing-sale-products,
  .home-featured .featured-products-carousel,
  .home-gifts .gift-products-carousel,
  .home-editorial .project-editorial-cards,
  .home-magazine .project-magazine-cards
) .wd-nav-pagin {
  align-items: center;
  justify-content: center;
  gap: 6px;
}

:is(
  .home-amazing .amazing-sale-products,
  .home-featured .featured-products-carousel,
  .home-gifts .gift-products-carousel,
  .home-editorial .project-editorial-cards,
  .home-magazine .project-magazine-cards
) .wd-nav-pagin-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5px;
  min-width: 5px;
  height: 9px;
  margin: 0;
  transition: width .24s ease;
}

:is(
  .home-amazing .amazing-sale-products,
  .home-featured .featured-products-carousel,
  .home-gifts .gift-products-carousel,
  .home-editorial .project-editorial-cards,
  .home-magazine .project-magazine-cards
) .wd-nav-pagin-item > span {
  display: block;
  width: 5px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: var(--project-carousel-dot);
  opacity: 1;
  transition: width .24s ease, background-color .24s ease, opacity .24s ease;
}

:is(
  .home-amazing .amazing-sale-products,
  .home-featured .featured-products-carousel,
  .home-gifts .gift-products-carousel,
  .home-editorial .project-editorial-cards,
  .home-magazine .project-magazine-cards
) .wd-nav-pagin-item.wd-active {
  width: 20px;
  min-width: 20px;
}

:is(
  .home-amazing .amazing-sale-products,
  .home-featured .featured-products-carousel,
  .home-gifts .gift-products-carousel,
  .home-editorial .project-editorial-cards,
  .home-magazine .project-magazine-cards
) .wd-nav-pagin-item.wd-active > span {
  width: 20px;
  background: var(--project-carousel-dot-active);
}

/* Colored campaign surfaces use a bright active pill with sufficient contrast. */
:is(
  .home-amazing .amazing-sale-products,
  .home-featured .featured-products-carousel,
  .home-gifts .gift-products-carousel
) {
  --project-carousel-dot: rgba(255, 255, 255, .48);
  --project-carousel-dot-active: #fff;
  --project-carousel-control-shadow: 0 4px 14px rgba(35, 35, 35, .14);
}

/* Elementor/Swiper hero controls use the same visual language. */
.home-hero .home-hero__slider .elementor-swiper-button {
  display: flex;
  align-items: center;
  justify-content: center;
  top: 50% !important;
  bottom: auto !important;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .72);
  color: #c10917 !important;
  box-shadow: 0 2px 8px rgba(35, 35, 35, .08);
  backdrop-filter: blur(4px);
  transform: translateY(-50%);
  transition: color .22s ease, background-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.home-hero .home-hero__slider .elementor-swiper-button-prev {
  right: auto;
  left: 16px;
}

.home-hero .home-hero__slider .elementor-swiper-button-next {
  right: 16px;
  left: auto;
}

.home-hero .home-hero__slider .elementor-swiper-button svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

@media (hover: hover) and (pointer: fine) {
  .home-hero .home-hero__slider .elementor-swiper-button:hover {
    background: rgba(255, 255, 255, .9);
    color: #ad0c14 !important;
    box-shadow: 0 3px 10px rgba(35, 35, 35, .12);
    transform: translateY(-50%);
  }
}

.home-hero .home-hero__slider .swiper-pagination-bullet {
  width: 5px !important;
  height: 5px !important;
  margin-inline: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .4);
  opacity: 1;
  transition: width .24s ease, background-color .24s ease;
}

.home-hero .home-hero__slider .swiper-pagination-bullet-active {
  width: 20px !important;
  background: #c10917 !important;
}

@media (max-width: 1024px) {
  .home-hero .home-hero__slider .elementor-swiper-button {
    width: 32px;
    height: 32px;
  }

  .home-hero .home-hero__slider .elementor-swiper-button-prev {
    left: 14px;
  }

  .home-hero .home-hero__slider .elementor-swiper-button-next {
    right: 14px;
  }

  .home-hero .home-hero__slider .elementor-swiper-button svg {
    width: 12px;
    height: 12px;
  }
}

@media (max-width: 768px) {
  :is(
    .home-amazing .amazing-sale-products,
    .home-featured .featured-products-carousel,
    .home-gifts .gift-products-carousel,
    .home-editorial .project-editorial-cards,
    .home-magazine .project-magazine-cards
  ) {
    --project-carousel-control-size: 34px;
  }

  :is(
    .home-amazing .amazing-sale-products,
    .home-featured .featured-products-carousel,
    .home-gifts .gift-products-carousel,
    .home-editorial .project-editorial-cards,
    .home-magazine .project-magazine-cards
  ) .wd-btn-arrow .wd-arrow-inner::after {
    width: 8px;
    height: 8px;
    border-width: 1.8px;
  }

  .home-hero .home-hero__slider .elementor-swiper-button {
    width: 32px;
    height: 32px;
  }

  .home-hero .home-hero__slider .elementor-swiper-button svg {
    width: 12px;
    height: 12px;
  }

  .home-editorial .project-editorial-cards .wd-btn-arrow {
    bottom: -72px !important;
  }

  .home-magazine .project-magazine-cards .wd-btn-arrow {
    bottom: -60px !important;
  }

  .home-magazine .project-magazine-cards .wd-nav-pagin-wrap {
    bottom: -43px;
  }
}

@media (max-width: 575px) {
  :is(
    .home-amazing .amazing-sale-products,
    .home-featured .featured-products-carousel,
    .home-gifts .gift-products-carousel,
    .home-editorial .project-editorial-cards,
    .home-magazine .project-magazine-cards
  ) {
    --project-carousel-control-size: 31px;
  }

  /* Product sliders use one compact, centered control row below the cards. */
  :is(
    .home-amazing .amazing-sale-products,
    .home-featured .featured-products-carousel,
    .home-gifts .gift-products-carousel
  ) .wd-nav-pagin-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 31px;
    min-height: 31px;
    margin-top: 15px;
  }

  :is(
    .home-amazing .amazing-sale-products,
    .home-featured .featured-products-carousel,
    .home-gifts .gift-products-carousel
  ) .wd-btn-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    top: auto !important;
    bottom: -31px !important;
    inset-block-start: auto !important;
    inset-block-end: -31px !important;
    width: 31px;
    min-width: 31px;
    height: 31px;
    padding: 0;
    border: 1px solid rgba(193, 9, 23, .22);
    border-radius: 50%;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 2px 8px rgba(35, 35, 35, .12);
    line-height: 1;
    box-sizing: border-box;
  }

  :is(
    .home-amazing .amazing-sale-products,
    .home-featured .featured-products-carousel,
    .home-gifts .gift-products-carousel
  ) .wd-btn-arrow.wd-disabled {
    border-color: rgba(193, 9, 23, .16);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 2px 8px rgba(35, 35, 35, .08);
    opacity: 1 !important;
  }

  :is(
    .home-amazing .amazing-sale-products,
    .home-featured .featured-products-carousel,
    .home-gifts .gift-products-carousel
  ) .wd-btn-arrow .wd-arrow-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 0;
    line-height: 0;
  }

  :is(
    .home-amazing .amazing-sale-products,
    .home-featured .featured-products-carousel,
    .home-gifts .gift-products-carousel
  ) .wd-btn-arrow.wd-disabled .wd-arrow-inner {
    opacity: .45;
  }

  :is(
    .home-amazing .amazing-sale-products,
    .home-featured .featured-products-carousel,
    .home-gifts .gift-products-carousel
  ) .wd-btn-arrow.wd-prev {
    right: auto;
    left: calc(50% - 60px);
  }

  :is(
    .home-amazing .amazing-sale-products,
    .home-featured .featured-products-carousel,
    .home-gifts .gift-products-carousel
  ) .wd-btn-arrow.wd-next {
    right: calc(50% - 60px);
    left: auto;
  }

  :is(
    .home-amazing .amazing-sale-products,
    .home-featured .featured-products-carousel,
    .home-gifts .gift-products-carousel
  ) .wd-nav-pagin {
    gap: 5px;
    margin: 0;
    transform: none !important;
  }

  :is(
    .home-amazing .amazing-sale-products,
    .home-featured .featured-products-carousel,
    .home-gifts .gift-products-carousel
  ) .wd-btn-arrow .wd-arrow-inner::after {
    width: 8px;
    height: 8px;
    border: 0 !important;
    border-top: 2px solid #c10917 !important;
    border-right: 2px solid #c10917 !important;
  }

  .home-hero .home-hero__slider .elementor-swiper-button {
    width: 29px;
    height: 29px;
  }

  .home-hero .home-hero__slider .elementor-swiper-button-prev {
    left: 10px;
  }

  .home-hero .home-hero__slider .elementor-swiper-button-next {
    right: 10px;
  }

  .home-hero .home-hero__slider .elementor-swiper-button svg {
    width: 11px;
    height: 11px;
  }

  :is(
    .home-featured .featured-products-carousel,
    .home-gifts .gift-products-carousel
  ) .wd-btn-arrow {
    bottom: -31px !important;
    inset-block-end: -31px !important;
  }

  .home-magazine .project-magazine-cards .wd-btn-arrow {
    bottom: -47px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(
    .home-amazing .amazing-sale-products,
    .home-featured .featured-products-carousel,
    .home-gifts .gift-products-carousel,
    .home-editorial .project-editorial-cards,
    .home-magazine .project-magazine-cards
  ) :is(.wd-btn-arrow, .wd-arrow-inner::after, .wd-nav-pagin-item, .wd-nav-pagin-item > span),
  .home-hero .home-hero__slider :is(.elementor-swiper-button, .swiper-pagination-bullet) {
    transition: none;
  }
}
