/*
 * Template Boutique — Styles scopés
 * Fait partie de WP Vendor Nexus 3.9.0 — Templates de boutique personnalisables
 *
 * Toutes les règles sont préfixées sous .nx-template-boutique.
 * Les tokens dynamiques (--nxt-accent, --nxt-accent-hover, --nxt-accent-soft)
 * sont injectés au runtime par TemplateRenderer via <style id="nx-shop-tokens">.
 * Les imports Google Fonts sont gérés par TemplateRenderer selon $tokens['heading_font'].
 */

/* ── Reset local ─────────────────────────────────────────────────────────── */
.nx-template-boutique *,
.nx-template-boutique *::before,
.nx-template-boutique *::after {
  box-sizing: border-box;
}

.nx-template-boutique img {
  max-width: 100%;
  display: block;
}

.nx-template-boutique a {
  color: inherit;
}

/* ── Variables de mode ───────────────────────────────────────────────────── */
.nx-template-boutique.is-light:not(.nx-shop-theme-v2) {
  --nxt-bg:     #ffffff;
  --nxt-text:   #0a0a0a;
  --nxt-border: #e5e5e5;
  --nxt-muted:  #666;
}

.nx-template-boutique.is-dark:not(.nx-shop-theme-v2) {
  --nxt-bg:     #0a0a0a;
  --nxt-text:   #f4f4f4;
  --nxt-border: #2a2a2a;
  --nxt-muted:  #aaa;
}

/* ── Racine du template ──────────────────────────────────────────────────── */
.nx-template-boutique {
  background: var(--nx-color-page, var(--nxt-bg));
  color: var(--nx-color-text, var(--nxt-text));
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
}

.nx-template-boutique h1,
.nx-template-boutique h2,
.nx-template-boutique h3 {
  margin: 0;
  font-family: var(--nxt-heading-font, 'Playfair Display', Georgia, serif);
  font-weight: 300;
  letter-spacing: -0.015em;
}

/* ── Titres de sections ──────────────────────────────────────────────────── */
.nx-template-boutique .nxt-section-title {
  font-size: clamp(28px, 3.6vw, 42px);
  margin: 80px 0 28px;
  text-align: center;
  font-weight: 300;
}

.nx-template-boutique .nxt-section-sub {
  text-align: center;
  color: var(--nxt-muted);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: -16px 0 32px;
}

/* ── Placeholder image ───────────────────────────────────────────────────── */
.nx-template-boutique .nxt-img-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(120% 80% at 30% 20%, var(--nxt-accent-soft) 0%, transparent 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--nxt-text) 6%, var(--nxt-bg)), var(--nxt-bg));
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.nx-template-boutique .nxt-hero {
  position: relative;
  height: 56vh;
  min-height: 440px;
  overflow: hidden;
  background: var(--nxt-border);
}

.nx-template-boutique .nxt-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.nx-template-boutique .nxt-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.nx-template-boutique .nxt-hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 clamp(20px, 5vw, 80px);
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, .05) 30%, rgba(0, 0, 0, .45));
}

.nx-template-boutique .nxt-hero-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 14px;
  opacity: .92;
}

.nx-template-boutique .nxt-hero-title {
  font-size: clamp(40px, 6vw, 72px);
  max-width: 16ch;
  line-height: 1.05;
}

.nx-template-boutique .nxt-hero-sub {
  margin-top: 12px;
  max-width: 36ch;
  font-size: 17px;
  font-weight: 300;
  opacity: .94;
}

.nx-template-boutique .nxt-hero-cta {
  display: inline-block;
  margin-top: 28px;
  background: var(--nxt-bg);
  color: var(--nxt-text);
  padding: 14px 28px;
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  transition: all .2s ease;
}

.nx-template-boutique .nxt-hero-cta:hover {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1px #fff;
}

/* ── Header compact ──────────────────────────────────────────────────────── */
.nx-template-boutique .nxt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(20px, 5vw, 80px);
  border-bottom: 1px solid var(--nxt-border);
}

.nx-template-boutique .nxt-header-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nx-template-boutique .nxt-header-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--nxt-border);
  padding: 4px;
  flex-shrink: 0;
}

.nx-template-boutique .nxt-header-name {
  font-size: clamp(20px, 2.2vw, 26px);
}

.nx-template-boutique .nxt-header-meta {
  display: flex;
  gap: 14px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--nxt-muted);
}

.nx-template-boutique .nxt-header-meta .strong {
  color: var(--nxt-text);
}

@media (max-width: 768px) {
  .nx-template-boutique .nxt-header-meta {
    display: none;
  }
}

/* ── Shoppable lifestyle / hotspots ──────────────────────────────────────── */
.nx-template-boutique .nxt-shoppable {
  padding: 0 clamp(20px, 5vw, 80px);
}

.nx-template-boutique .nxt-shop-frame {
  position: relative;
  max-width: 1280px;
  margin: 0 auto 48px;
  overflow: hidden;
  background: var(--nxt-border);
}

.nx-template-boutique .nxt-shop-frame__img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .nx-template-boutique .nxt-shop-frame__img {
    aspect-ratio: 4 / 5;
  }
}

/* Hotspot dot ─────────────────────────────────────────────────── */
.nx-template-boutique .nxt-hotspot {
  position: absolute;
  top: var(--y);
  left: var(--x);
  transform: translate(-50%, -50%);
  z-index: 2;
}

.nx-template-boutique .nxt-hotspot-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(254, 253, 251, .95);
  color: var(--nxt-text);
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--bd-shadow-card);
  transition: transform .25s ease, background .25s ease;
  position: relative;
}

.nx-template-boutique .nxt-hotspot-dot::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(254, 253, 251, .7);
  animation: nxt-boutique-pulse 2.2s ease-out infinite;
}

@keyframes nxt-boutique-pulse {
  0%   { transform: scale(.8); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

.nx-template-boutique .nxt-hotspot:hover .nxt-hotspot-dot,
.nx-template-boutique .nxt-hotspot:focus-within .nxt-hotspot-dot {
  background: var(--nxt-accent);
  color: #fff;
  transform: scale(1.1);
}

.nx-template-boutique .nxt-hotspot:hover .nxt-hotspot-dot::before,
.nx-template-boutique .nxt-hotspot:focus-within .nxt-hotspot-dot::before {
  animation: none;
  opacity: 0;
}

/* Hotspot card ────────────────────────────────────────────────── */
.nx-template-boutique .nxt-hotspot-card {
  position: absolute;
  top: 50%;
  left: calc(100% + 14px);
  transform: translateY(-50%) translateX(-6px);
  width: 240px;
  background: var(--nxt-bg);
  padding: 12px;
  box-shadow: var(--bd-shadow-lg);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .25s ease;
}

.nx-template-boutique .nxt-hotspot:hover .nxt-hotspot-card,
.nx-template-boutique .nxt-hotspot:focus-within .nxt-hotspot-card {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.nx-template-boutique .nxt-hotspot--right .nxt-hotspot-card {
  left: auto;
  right: calc(100% + 14px);
  transform: translateY(-50%) translateX(6px);
}

.nx-template-boutique .nxt-hotspot--right:hover .nxt-hotspot-card,
.nx-template-boutique .nxt-hotspot--right:focus-within .nxt-hotspot-card {
  transform: translateY(-50%) translateX(0);
}

.nx-template-boutique .nxt-hotspot-card img {
  width: 80px;
  aspect-ratio: 1;
  object-fit: cover;
}

.nx-template-boutique .nxt-hotspot-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nx-template-boutique .nxt-hotspot-card-name {
  font-size: 13px;
  line-height: 1.3;
  color: var(--nxt-text);
}

.nx-template-boutique .nxt-hotspot-card-price {
  font-size: 12px;
  color: var(--nxt-muted);
}

.nx-template-boutique .nxt-hotspot-card-cta {
  display: inline-block;
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--nxt-accent);
  border-bottom: 1px solid var(--nxt-accent);
  padding-bottom: 2px;
  text-decoration: none;
  align-self: flex-start;
}

@media (max-width: 768px) {
  .nx-template-boutique .nxt-hotspot-card {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: auto;
    width: auto;
    transform: translateY(100%);
    pointer-events: none;
  }

  .nx-template-boutique .nxt-hotspot:hover .nxt-hotspot-card,
  .nx-template-boutique .nxt-hotspot:focus-within .nxt-hotspot-card {
    transform: translateY(0);
  }

  .nx-template-boutique .nxt-hotspot--right .nxt-hotspot-card {
    right: 12px;
    transform: translateY(100%);
  }

  .nx-template-boutique .nxt-hotspot--right:hover .nxt-hotspot-card,
  .nx-template-boutique .nxt-hotspot--right:focus-within .nxt-hotspot-card {
    transform: translateY(0);
  }
}

/* ── Note fondatrice / Story ─────────────────────────────────────────────── */
.nx-template-boutique .nxt-founder {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 56px;
  align-items: center;
  padding: 96px clamp(20px, 5vw, 80px);
  max-width: 1280px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .nx-template-boutique .nxt-founder {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 64px clamp(20px, 5vw, 80px);
  }
}

.nx-template-boutique .nxt-founder-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2px;
}

.nx-template-boutique .nxt-founder-portrait .nxt-img-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
}

.nx-template-boutique .nxt-founder-heading {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  margin-bottom: 22px;
  max-width: 18ch;
}

.nx-template-boutique .nxt-founder-text {
  font-size: 16px;
  line-height: 1.75;
  color: var(--nxt-text);
  max-width: 52ch;
  margin: 0;
}

.nx-template-boutique .nxt-founder-stats {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--nxt-border);
}

/* stat-block integration ──────────────────────────────────────── */
.nx-template-boutique .nxt-stat-block {
  display: flex;
  gap: 32px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nx-template-boutique .nxt-stat-block__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nx-template-boutique .nxt-stat-block__number {
  display: block;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 26px;
  font-weight: 300;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--nxt-text);
  margin: 0;
}

.nx-template-boutique .nxt-stat-block__label {
  color: var(--nxt-muted);
  margin: 0;
}

/* ── Featured products ───────────────────────────────────────────────────── */
.nx-template-boutique .nxt-featured {
  padding: 0 clamp(20px, 5vw, 80px) 80px;
  max-width: 1280px;
  margin: 0 auto;
}

/* product-grid partial integration ───────────────────────────── */
.nx-template-boutique .nxt-product-grid {
  display: grid;
  grid-template-columns: repeat(var(--nxt-cols, 3), 1fr);
  gap: 32px;
}

.nx-template-boutique .nxt-product-grid[data-columns="3"] { --nxt-cols: 3; }
.nx-template-boutique .nxt-product-grid[data-columns="2"] { --nxt-cols: 2; }
.nx-template-boutique .nxt-product-grid[data-columns="4"] { --nxt-cols: 4; }

@media (max-width: 1024px) {
  .nx-template-boutique .nxt-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .nx-template-boutique .nxt-product-grid {
    grid-template-columns: 1fr;
  }
}

.nx-template-boutique .nxt-product-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.nx-template-boutique .nxt-product-card__image {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--nxt-border);
}

.nx-template-boutique .nxt-product-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.nx-template-boutique .nxt-product-card:hover .nxt-product-card__img {
  transform: scale(1.04);
}

.nx-template-boutique .nxt-product-card__img--placeholder {
  background: var(--nxt-border);
}

.nx-template-boutique .nxt-product-card__body {
  padding: 14px 0 0;
}

.nx-template-boutique .nxt-product-card__title {
  font-size: 14px;
  font-weight: 400;
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: normal;
  margin: 0;
}

.nx-template-boutique .nxt-product-card__price {
  font-size: 13px;
  color: var(--nxt-muted);
  display: block;
  margin-top: 4px;
}

/* ── Instagram wall ──────────────────────────────────────────────────────── */
.nx-template-boutique .nxt-instagram-wall {
  padding: 0 clamp(20px, 5vw, 80px) 96px;
}

.nx-template-boutique .nxt-ig-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

@media (max-width: 768px) {
  .nx-template-boutique .nxt-ig-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.nx-template-boutique .nxt-ig-cell {
  aspect-ratio: 1;
  overflow: hidden;
  display: block;
  background: var(--nxt-border);
  transition: opacity .3s ease;
}

.nx-template-boutique .nxt-ig-cell:hover {
  opacity: .8;
}

.nx-template-boutique .nxt-ig-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Demo flag ───────────────────────────────────────────────────────────── */
.nx-template-boutique .nxt-demo-flag {
  display: none;
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  background: var(--nx-color-accent, var(--nxt-accent, #c8462b));
  color: var(--nx-color-accent-text, #fff);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 2px;
  pointer-events: none;
  gap: 4px;
  align-items: center;
}

.nx-customizer-active .nx-template-boutique .nxt-demo-flag {
  display: inline-flex;
}

.nx-template-boutique .nxt-demo-flag__dot {
  font-size: 8px;
  line-height: 1;
}

/* ─── Section produits vendeur ─── */
.nx-template-boutique .nx-shop-front-products {
  padding: 0 clamp(20px, 5vw, 80px) 96px;
  max-width: 1280px;
  margin: 0 auto;
}

.nx-template-boutique .nx-shop-front-products__title {
  font-family: var(--nxt-heading-font, 'Playfair Display', Georgia, serif);
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 300;
  letter-spacing: -0.015em;
  text-align: center;
  margin: 80px 0 32px;
  color: var(--nxt-text);
}

.nx-template-boutique .nx-shop-front-products .nxt-product-grid {
  display: grid;
  grid-template-columns: repeat(var(--nxt-cols, 3), 1fr);
  gap: 32px;
}

.nx-template-boutique .nx-shop-front-products .nxt-product-grid[data-columns="2"] { --nxt-cols: 2; }
.nx-template-boutique .nx-shop-front-products .nxt-product-grid[data-columns="3"] { --nxt-cols: 3; }
.nx-template-boutique .nx-shop-front-products .nxt-product-grid[data-columns="4"] { --nxt-cols: 4; }

@media (max-width: 1024px) {
  .nx-template-boutique .nx-shop-front-products .nxt-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .nx-template-boutique .nx-shop-front-products .nxt-product-grid {
    grid-template-columns: 1fr;
  }
}

.nx-template-boutique .nx-shop-front-products .nxt-product-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.nx-template-boutique .nx-shop-front-products .nxt-product-card__image {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--nxt-border);
  border-radius: 2px;
}

.nx-template-boutique .nx-shop-front-products .nxt-product-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.nx-template-boutique .nx-shop-front-products .nxt-product-card:hover .nxt-product-card__img {
  transform: scale(1.04);
}

.nx-template-boutique .nx-shop-front-products .nxt-product-card__body {
  padding: 14px 0 0;
}

.nx-template-boutique .nx-shop-front-products .nxt-product-card__title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  margin: 0;
  color: var(--nxt-text);
}

.nx-template-boutique .nx-shop-front-products .nxt-product-card__price {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--nxt-muted);
}

.nx-template-boutique .nx-shop-front-products__pagination {
  margin-top: 48px;
  display: flex;
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.nx-template-boutique .nx-shop-front-products__pagination ul {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nx-template-boutique .nx-shop-front-products__pagination a,
.nx-template-boutique .nx-shop-front-products__pagination span {
  display: inline-block;
  padding: 10px 14px;
  color: var(--nxt-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nx-template-boutique .nx-shop-front-products__pagination .current {
  color: var(--nxt-accent);
  border-bottom: 1px solid var(--nxt-accent);
}

.nx-template-boutique .nx-shop-front-products__pagination a:hover {
  color: var(--nxt-text);
}
