/*
	Theme Name: Loquet Child Theme
	
	Description: Child theme of Loquet theme
	Author: GP
	License: GNU General Public License v2 or later
	License URI: http://www.gnu.org/licenses/gpl-2.0.html
	Text Domain: loquet
	Template: loquet
	Version: 1.0.0
*/


/* ==========================================================
   TOKENS
   ========================================================== */

:root {
  --nbj-warm-bg: #f2eee4;
}

html {
  scroll-behavior: smooth;
}
/* ==========================================================
   HERO SLIDER — KEN BURNS
   ========================================================== */

.gt-portfolio-slider .swiper-slide {
  overflow: hidden;
}

.gt-portfolio-slider .gt-image {
  will-change: transform;
  transform: scale(1.15) translate(2.5%, 2.5%);
}

.gt-portfolio-slider .swiper-slide-active .gt-image {
  animation: kenburns 16s ease-out forwards;
}

@keyframes kenburns {
  0%   { transform: scale(1.15) translate(2.5%, 2.5%); }
  100% { transform: scale(1.15) translate(-2.5%, -2.5%); }
}

.gt-portfolio-slider .gt-content {
  position: relative;
  z-index: 2;
}

.gt-portfolio-slider .gt-content > * {
  opacity: 0;
  transform: translateY(30px);
}

.gt-portfolio-slider .swiper-slide-active .gt-content > * {
  animation: gtSlideUp 1s ease-out forwards;
}

.gt-portfolio-slider .swiper-slide-active .gt-content > *:nth-child(1) { animation-delay: 0.2s; }
.gt-portfolio-slider .swiper-slide-active .gt-content > *:nth-child(2) { animation-delay: 0.4s; }
.gt-portfolio-slider .swiper-slide-active .gt-content > *:nth-child(3) { animation-delay: 0.6s; }
.gt-portfolio-slider .swiper-slide-active .gt-content > *:nth-child(4) { animation-delay: 0.8s; }

@keyframes gtSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ==========================================================
   PRODUCT CATEGORY SLIDER
   ========================================================== */

.nbj-category-carousel {
  position: relative;
}

.nbj-category-carousel .swiper {
  overflow: hidden;
}

.nbj-category-carousel .swiper-wrapper {
  display: flex;
}

.nbj-cat-card {
  display: block;
  text-decoration: none;
  color: inherit;
  text-align: center;
}

.nbj-cat-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #f3f2ef;
  margin-bottom: 22px;
}

.nbj-cat-card__media img {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.nbj-cat-card:hover .nbj-cat-card__media img {
  transform: scale(1.06);
}

.nbj-cat-card__title {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}

.nbj-cat-card__count {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b6b6b;
  opacity: 1;
}

/* Pre-init state — prevents layout jump on page load */

.nbj-category-carousel .swiper:not(.swiper-initialized) {
  visibility: hidden;
  min-height: 560px;
}

.nbj-category-carousel .swiper:not(.swiper-initialized) .swiper-slide {
  flex: 0 0 25%;
  max-width: 25%;
}

@media (min-width: 600px) {
  .nbj-category-carousel .swiper:not(.swiper-initialized) {
    min-height: 420px;
  }
}

@media (max-width: 1199px) {
  .nbj-category-carousel .swiper:not(.swiper-initialized) .swiper-slide {
    flex-basis: 33.333%;
    max-width: 33.333%;
  }
}

@media (max-width: 899px) {
  .nbj-category-carousel .swiper:not(.swiper-initialized) .swiper-slide {
    flex-basis: 50%;
    max-width: 50%;
  }
}


/* ==========================================================
   FEATURED PRODUCT SLIDER
   ========================================================== */

.nbj-product-carousel,
.nbj-product-carousel .swiper {
  width: 100% !important;
  max-width: 100% !important;
}

.nbj-product-carousel .swiper {
  overflow: hidden;
}

.nbj-product-carousel li.product {
  display: flex;
  flex-direction: column;
}

.nbj-product-carousel li.product a img,
.nbj-product-carousel li.product img {
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  width: 100% !important;
  height: auto !important;
  background-color: var(--nbj-warm-bg);
  padding: 16px;
  box-sizing: border-box;
}

.nbj-product-carousel li.product .woocommerce-loop-product__title {
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  margin: 18px 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nbj-product-carousel li.product .price {
  font-size: 14px;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.nbj-product-carousel li.product .button,
.nbj-product-carousel li.product a.button {
  display: inline-block;
  width: auto;
  padding: 10px 24px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #1a1a1a;
  color: #fff;
  border: 0;
  transition: background 0.3s ease;
}

.nbj-product-carousel li.product .button:hover,
.nbj-product-carousel li.product a.button:hover {
  background: #3a3a3a;
  color: #fff;
}


/* ==========================================================
   SHARED SLIDER NAVIGATION
   ========================================================== */

.nbj-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 50px;
}

.nbj-prev,
.nbj-next {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: #1a1a1a;
  opacity: 0.55;
  transition: opacity 0.3s ease;
}

.nbj-prev:hover,
.nbj-next:hover {
  opacity: 1;
}

.nbj-prev.swiper-button-disabled,
.nbj-next.swiper-button-disabled {
  opacity: 0.2;
  cursor: default;
}

.nbj-pagination {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nbj-pagination.swiper-pagination-horizontal,
.nbj-category-carousel .nbj-pagination,
.nbj-product-carousel .nbj-pagination {
  position: static !important;
  width: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
}

.nbj-pagination .swiper-pagination-bullet {
  width: auto;
  height: auto;
  margin: 0 !important;
  background: none;
  border-radius: 0;
  opacity: 0.35;
  font-size: 14px;
  line-height: 1;
  color: #1a1a1a;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.nbj-pagination .swiper-pagination-bullet:hover {
  opacity: 0.7;
}

.nbj-pagination .swiper-pagination-bullet-active {
  opacity: 1;
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 599px) {
  .nbj-category-carousel,
  .nbj-product-carousel {
    padding: 0 16px;
  }
  .nbj-category-carousel .swiper,
  .nbj-product-carousel .swiper {
    padding: 0;
  }
}

@media (max-width: 767px) {
  .nbj-controls {
    gap: 18px;
    margin-top: 32px;
  }
  .nbj-prev svg,
  .nbj-next svg {
    width: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .gt-portfolio-slider .swiper-slide-active .gt-image,
  .gt-portfolio-slider .swiper-slide-active .gt-content > * {
    animation: none;
  }

  .gt-portfolio-slider .gt-content > * {
    opacity: 1;
    transform: none;
  }
}