/* =========================================================
   Barbalys — shop.css
   Styles pour archive-product.php + content-product.php
   Utilise uniquement les variables de style.css
   ========================================================= */

/* =========================================================
   HERO ÉDITORIAL
   ========================================================= */
.shop-hero {
  padding: 160px 24px 80px; /* 160px = header fixe + respiration */
  text-align: center;
  background: var(--brand-cream);
  border-bottom: 1px solid rgba(191,181,168,.3);
}
.shop-hero__inner {
  max-width: 640px;
  margin: 0 auto;
}
.shop-hero__eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--brand-gold);
  margin: 0 0 20px;
}
.shop-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--brand-black);
  margin: 0 0 24px;
}
.shop-hero__rule {
  width: 48px;
  height: 1px;
  background: var(--brand-gold);
  margin: 0 auto 24px;
}
.shop-hero__lead {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: rgba(15,15,15,.55);
  margin: 0;
}

/* =========================================================
   CORPS : FILTRES + GRILLE
   ========================================================= */
.shop-body {
  background: var(--brand-beige);
  padding: 64px 0 96px;
}
.shop-body__inner {
  display: flex;
  gap: 56px;
  align-items: flex-start;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   SIDEBAR FILTRES
   ========================================================= */
.shop-filters {
  flex: 0 0 220px;
  max-width: 220px;
  position: sticky;
  top: 90px; /* sous le header fixe */
}
.shop-filters__form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Bloc filtre individuel */
.shop-filter {
  padding: 24px 0;
  border-bottom: 1px solid rgba(191,181,168,.4);
}
.shop-filter:first-child { padding-top: 0; }
.shop-filter--actions { border-bottom: none; padding-bottom: 0; }

/* Titre section */
.shop-filter__title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--brand-gold);
  margin: 0 0 14px;
}

/* Champ recherche */
.shop-filter__search {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid var(--brand-border);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--brand-black);
  outline: none;
  transition: border-color .3s ease;
}
.shop-filter__search:focus { border-color: var(--brand-gold); }
.shop-filter__search::placeholder { color: var(--brand-taupe); }

/* Liste catégories */
.shop-filter__cats {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.shop-filter__cat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(15,15,15,.65);
  border-radius: 2px;
  transition: color .3s ease, background .3s ease;
}
.shop-filter__cat:hover {
  color: var(--brand-black);
  background: rgba(197,165,114,.12);
}
.shop-filter__cat.is-active {
  color: var(--brand-gold);
  font-weight: 700;
}
.shop-filter__count {
  font-size: 11px;
  color: var(--brand-taupe);
}

/* Inputs prix */
.shop-filter__price {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}
.shop-filter__price label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.shop-filter__price label span {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brand-taupe);
}
.shop-filter__price input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid var(--brand-border);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--brand-black);
  outline: none;
  transition: border-color .3s ease;
  -moz-appearance: textfield;
}
.shop-filter__price input[type="number"]::-webkit-outer-spin-button,
.shop-filter__price input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
.shop-filter__price input[type="number"]:focus { border-color: var(--brand-gold); }

.shop-filter__hint {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--brand-taupe);
  margin: 0;
}

/* Select tri */
.shop-filter__select {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 32px 10px 12px;
  background: transparent;
  border: 1px solid var(--brand-border);
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--brand-black);
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color .3s ease;
}
.shop-filter__select:focus { border-color: var(--brand-gold); }

/* Boutons actions */
.shop-filter--actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shop-filter__apply {
  padding: 12px 0;
  background: var(--brand-black);
  color: var(--brand-cream);
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: uppercase;
  border: 1px solid var(--brand-black);
  cursor: pointer;
  transition: background .3s ease, color .3s ease;
}
.shop-filter__apply:hover {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: var(--brand-black);
}
.shop-filter__reset {
  display: block;
  text-align: center;
  padding: 10px 0;
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--brand-taupe);
  border: 1px solid var(--brand-border);
  transition: color .3s ease, border-color .3s ease;
}
.shop-filter__reset:hover {
  color: var(--brand-black);
  border-color: var(--brand-black);
}

/* =========================================================
   ZONE GRILLE
   ========================================================= */
.shop-grid-wrap {
  flex: 1 1 0;
  min-width: 0;
}

/* Barre haut */
.shop-grid-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(191,181,168,.4);
}
.shop-grid-bar__count {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brand-taupe);
  margin: 0;
}

/* Grille WooCommerce — remplace ul.products */
.shop-grid-wrap ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  gap: 48px 24px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* =========================================================
   CARTE PRODUIT — .shop-card (article dans content-product.php)
   ========================================================= */
.shop-card {
  position: relative;
  cursor: pointer;
  background: transparent;
  margin: 0;
  padding: 0;
}

/* Lien image */
.shop-card__media-link {
  display: block;
  text-decoration: none;
}

/* Conteneur image */
.shop-card__media {
  position: relative;
  overflow: hidden;
  background: var(--brand-cream);
  margin-bottom: 16px;
  aspect-ratio: 4 / 5;
}

/* Image */
.shop-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .7s ease;
  display: block;
}
.shop-card:hover .shop-card__img {
  transform: scale(1.05);
}

/* Badge promo */
.shop-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--brand-gold);
  color: var(--brand-black);
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: .3em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 10px;
  z-index: 1;
}

/* Bouton "Ajouter au panier" — overlay au hover */
.shop-card__atc,
.shop-card__media .button,
.shop-card__media a.button {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 14px 0 !important;
  background: var(--brand-black) !important;
  color: var(--brand-cream) !important;
  font-family: var(--font-body) !important;
  font-size: 10px !important;
  letter-spacing: .25em !important;
  text-transform: uppercase !important;
  text-align: center !important;
  border: none !important;
  border-radius: 0 !important;
  opacity: 1;
  transition: background .3s ease !important;
  display: block !important;
  text-decoration: none !important;
}
.shop-card__atc:hover,
.shop-card__media .button:hover {
  background: var(--brand-gold) !important;
  color: var(--brand-black) !important;
  opacity: 1 !important;
}

/* Volume */
.shop-card__volume {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(15,15,15,.45);
  margin: 0 0 5px;
}

/* Titre produit */
.shop-card__title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 8px;
  min-height: 3rem;
}
.shop-card__title a {
  color: var(--brand-black);
  text-decoration: none;
  transition: color .3s ease;
}
.shop-card__title a:hover {
  color: var(--brand-gold);
}

/* Prix */
.shop-card__price {
  color: var(--brand-gold);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .05em;
  margin: 0;
}
.shop-card__price del {
  color: var(--brand-taupe);
  font-weight: 400;
  margin-right: 6px;
}
.shop-card__price ins {
  text-decoration: none;
}

/* =========================================================
   PAGINATION
   ========================================================= */
.shop-pagination {
  margin-top: 64px;
  text-align: center;
}
.shop-pagination .woocommerce-pagination ul {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.shop-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--brand-black);
  border: 1px solid var(--brand-border);
  transition: all .3s ease;
  text-decoration: none;
}
.shop-pagination .page-numbers:hover,
.shop-pagination .page-numbers.current {
  background: var(--brand-black);
  border-color: var(--brand-black);
  color: var(--brand-cream);
}

/* =========================================================
   ÉTAT VIDE
   ========================================================= */
.shop-empty {
  text-align: center;
  padding: 80px 24px;
}
.shop-empty__eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--brand-gold);
  margin: 0 0 16px;
}
.shop-empty__title {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  color: var(--brand-black);
  margin: 0 0 32px;
}
.shop-empty__btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--brand-black);
  color: var(--brand-cream);
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: uppercase;
  border: 1px solid var(--brand-black);
  transition: all .3s ease;
}
.shop-empty__btn:hover {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: var(--brand-black);
}

/* =========================================================
   RESPONSIVE TABLETTE (< 1024px)
   ========================================================= */
@media (max-width: 1023px) {
  .shop-filters {
    flex: 0 0 180px;
    max-width: 180px;
  }
  .shop-body__inner { gap: 32px; }
}

/* =========================================================
   RESPONSIVE MOBILE (< 768px)
   ========================================================= */
@media (max-width: 767px) {
  .shop-hero { padding: 120px 16px 48px; }

  .shop-body { padding: 0 0 64px; }

  .shop-body__inner {
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  /* Filtres : bandeau horizontal scrollable */
  .shop-filters {
    flex: none;
    max-width: 100%;
    width: 100%;
    position: relative;
    top: auto;
    background: var(--brand-cream);
    border-bottom: 1px solid rgba(191,181,168,.4);
    padding: 0 16px;
  }
  .shop-filters__form {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .shop-filters__form::-webkit-scrollbar { display: none; }

  /* Chaque filtre = colonne verticale dans le scroll horizontal */
  .shop-filter {
    flex: 0 0 auto;
    min-width: 160px;
    padding: 20px 16px 20px 0;
    border-bottom: none;
    border-right: 1px solid rgba(191,181,168,.3);
  }
  .shop-filter:last-child { border-right: none; }

  /* Actions : boutons côte à côte */
  .shop-filter--actions {
    flex-direction: column;
    justify-content: flex-start;
    min-width: 140px;
  }

  /* Grille produits */
  .shop-grid-wrap {
    padding: 24px 16px 0;
  }
  .shop-grid-wrap ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 32px 12px !important;
  }

  /* Carte : titre et prix plus compacts */
  .shop-card__title { font-size: 15px; min-height: auto; }
  .shop-card__price { font-size: 13px; }

  /* Bouton visible sans hover sur tactile */
  .shop-card__atc,
  .shop-card__media .button,
  .shop-card__media a.button {
    position: relative !important;
    opacity: 1 !important;
    margin-top: 10px !important;
    padding: 12px 0 !important;
  }
}
