/* ============================================================
   PATTES & PRESTIGE — shop.css
   Styles boutique catalogue
   ============================================================ */

/* ── NAV ACTIVE ── */
.nav__links a.active {
  color: var(--text);
  font-weight: 400;
}
.nav__links a.active::after { transform: scaleX(1); }

/* ── SEARCH BAR ── */
.search-bar {
  position: fixed;
  top: var(--nav-h, 80px);
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, 90vw);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  z-index: 99;
  border-radius: var(--radius-md, 18px);
  animation: slideDown 0.25s cubic-bezier(0.4,0,0.2,1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.search-bar__input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Jost', sans-serif;
  font-size: 1rem;
  font-weight: 300;
  color: var(--text, #3a2f27);
  outline: none;
}
.search-bar__input::placeholder { color: var(--text-light, #8a7a6a); }

.search-bar__close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-light, #8a7a6a);
  transition: color 0.2s;
  padding: 4px;
}
.search-bar__close:hover { color: var(--text, #3a2f27); }

/* ── SHOP HEADER ── */
.shop-header {
  padding: calc(var(--nav-h, 80px) + 4rem) 8vw 4rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.shop-header__content { max-width: 500px; }
.shop-header__content h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin: 0.5rem 0 1rem; }
.shop-header__content h1 em { font-style: italic; color: var(--season-text-accent, #c4748a); }
.shop-header__content p { color: var(--text-light, #8a7a6a); font-size: 1rem; }

.shop-header__deco {
  font-size: 2rem;
  letter-spacing: 10px;
  opacity: 0.4;
  padding-bottom: 0.5rem;
}

/* ── FILTRES ── */
.shop-filters {
  margin: 0 6vw 3rem;
  padding: 1.8rem 2rem;
  position: relative;
  z-index: 2;
}

.shop-filters__row {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-light, #8a7a6a);
  min-width: 70px;
  flex-shrink: 0;
}

.filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 7px 16px;
  border-radius: 50px;
  font-family: 'Jost', sans-serif;
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  border: 1px solid rgba(58,47,39,0.14);
  background: rgba(255,255,255,0.3);
  color: var(--text-mid, #5a4a3a);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  white-space: nowrap;
}

.filter-pill:hover {
  background: rgba(255,255,255,0.6);
  border-color: color-mix(in srgb, var(--season-primary, #e8a4b8) 35%, transparent);
  color: var(--text, #3a2f27);
  transform: translateY(-1px);
}

.filter-pill.active {
  background: rgba(255,255,255,0.75);
  border-color: color-mix(in srgb, var(--season-primary, #e8a4b8) 50%, transparent);
  color: var(--text, #3a2f27);
  font-weight: 400;
  box-shadow: 0 3px 12px color-mix(in srgb, var(--season-primary, #e8a4b8) 18%, transparent),
              inset 0 1px 0 rgba(255,255,255,0.9);
}

.shop-filters__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(58,47,39,0.07);
  flex-wrap: wrap;
  gap: 1rem;
}

.results-count {
  font-size: 0.8rem;
  color: var(--text-light, #8a7a6a);
  letter-spacing: 0.05em;
}

.sort-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-select {
  padding: 8px 14px;
  border-radius: 50px;
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text, #3a2f27);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a7a6a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* ── GRILLE PRODUITS ── */
.shop-main {
  padding: 0 6vw 8rem;
  position: relative;
  z-index: 1;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* ── LOADING ── */
.products-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 6rem 2rem;
  color: var(--text-light, #8a7a6a);
}
.products-loading span { font-size: 3rem; display: block; margin-bottom: 1rem; animation: spin 2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── EMPTY STATE ── */
.shop-empty {
  text-align: center;
  padding: 6rem 2rem;
  color: var(--text-light, #8a7a6a);
}
.shop-empty span { font-size: 3rem; display: block; margin-bottom: 1.5rem; }
.shop-empty h3 { font-size: 1.5rem; margin-bottom: 0.8rem; color: var(--text, #3a2f27); }
.shop-empty p { font-size: 0.9rem; }
.link-btn {
  background: none; border: none; cursor: pointer;
  color: var(--season-text-accent, #c4748a);
  font-family: inherit; font-size: inherit;
  text-decoration: underline;
}

/* ── PRODUCT CARD ── */
.product-card {
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1);
  animation: cardIn 0.4s cubic-bezier(0.4,0,0.2,1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.product-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 56px rgba(160,130,100,0.2), inset 0 1px 0 rgba(255,255,255,0.95);
}

/* Image / placeholder */
.product-card__img {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.product-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-card__img img { transform: scale(1.05); }

.product-card__placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-lg, 28px) var(--radius-lg, 28px) 0 0;
  transition: filter 0.3s;
}
.product-card:hover .product-card__placeholder { filter: brightness(1.04); }

.product-card__emoji { font-size: 4rem; }
.product-card__deco  { font-size: 1.2rem; letter-spacing: 4px; opacity: 0.7; }

/* Badge */
.product-card__badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--season-primary, #e8a4b8);
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Stock faible */
.product-card__low-stock {
  position: absolute;
  bottom: 10px; right: 10px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  background: rgba(255,255,255,0.85);
  color: #c07040;
  border: 1px solid rgba(192,112,64,0.3);
}

/* Rupture de stock */
.product-card__out-of-stock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245,239,230,0.7);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-lg, 28px) var(--radius-lg, 28px) 0 0;
}
.product-card__out-of-stock span {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-light, #8a7a6a);
  padding: 6px 16px;
  border: 1px solid rgba(58,47,39,0.15);
  border-radius: 50px;
  background: rgba(255,255,255,0.6);
}

/* Favoris */
.product-card__fav {
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.7);
  background: rgba(255,252,248,0.7);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
  font-size: 0.9rem;
}
.product-card:hover .product-card__fav { opacity: 1; }
.product-card__fav:hover { transform: scale(1.15); background: rgba(255,255,255,0.9); }
.product-card__fav.active { opacity: 1; color: var(--season-primary, #e8a4b8); }

/* Infos */
.product-card__info { padding: 1.2rem 1.4rem 1.4rem; }

.product-card__tags {
  display: flex;
  gap: 6px;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.product-card__tag {
  font-size: 0.63rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-light, #8a7a6a);
}

.product-card__tag + .product-card__tag::before {
  content: '·';
  margin-right: 6px;
}

.product-card__name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text, #3a2f27);
  margin-bottom: 0.3rem;
  line-height: 1.25;
}

.product-card__desc {
  font-size: 0.8rem;
  color: var(--text-light, #8a7a6a);
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-card__price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text, #3a2f27);
}

.product-card__compare {
  font-size: 0.85rem;
  color: var(--text-light, #8a7a6a);
  text-decoration: line-through;
  margin-left: 4px;
}

.product-card__add {
  padding: 9px 18px;
  border-radius: 50px;
  font-family: 'Jost', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text, #3a2f27);
  cursor: pointer;
  border: none;
  background: rgba(255,252,248,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 3px 12px rgba(160,130,100,0.1), inset 0 1px 0 rgba(255,255,255,0.9);
  transition: all 0.25s;
  white-space: nowrap;
}

.product-card__add:hover {
  background: rgba(255,255,255,0.85);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(160,130,100,0.15);
}

.product-card__add:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.product-card__add.added {
  background: rgba(154,187,154,0.3);
  border-color: rgba(154,187,154,0.5);
  color: #4a7a4a;
}

/* ══════════════════════════════════════════════════
   SIDEBAR LAYOUT
   ══════════════════════════════════════════════════ */

.shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  padding: 0 6vw 8rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

/* ── SIDEBAR ── */
.shop-sidebar {
  position: sticky;
  top: calc(var(--nav-h, 80px) + 20px);
  padding: 0;
  overflow: hidden;
}

.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.6rem 1rem;
  border-bottom: 1px solid rgba(58,47,39,0.06);
}

.sidebar__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text, #3a2f27);
}

.sidebar__reset {
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--season-text-accent, #c4748a);
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  padding: 0;
}
.sidebar__reset:hover { opacity: 0.7; }

/* ── RECHERCHE SIDEBAR ── */
.sidebar__section {
  padding: 0.8rem 1.6rem;
  border-bottom: 1px solid rgba(58,47,39,0.05);
}

.sidebar__search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 50px;
  background: rgba(255,255,255,0.4);
  border: 1px solid rgba(255,255,255,0.6);
}

.sidebar__search svg { color: var(--text-light, #8a7a6a); flex-shrink: 0; }

.sidebar__search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text, #3a2f27);
  outline: none;
}
.sidebar__search-input::placeholder { color: var(--text-light, #8a7a6a); }

/* ── SECTION TOGGLE ── */
.sidebar__section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.6rem 0;
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mid, #5a4a3a);
  transition: color 0.2s;
}
.sidebar__section-toggle:hover { color: var(--text, #3a2f27); }

.toggle-arrow {
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  color: var(--text-light, #8a7a6a);
}
.sidebar__section-toggle.collapsed .toggle-arrow { transform: rotate(-90deg); }

/* ── LISTE CASES ── */
.sidebar__check-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.5rem 0 0.8rem;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
  max-height: 500px;
}

.sidebar__check-list.collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0;
}

/* ── CASE À COCHER ── */
.sidebar__check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm, 12px);
  cursor: pointer;
  transition: background 0.18s;
  user-select: none;
}

.sidebar__check:hover { background: rgba(255,255,255,0.5); }

.sidebar__check input[type="radio"],
.sidebar__check input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

/* Case visuelle ronde (radio) */
.check-box {
  width: 17px; height: 17px;
  border-radius: 50%;
  border: 1.5px solid rgba(58,47,39,0.22);
  background: rgba(255,255,255,0.5);
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  position: relative;
}

.check-box::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--season-primary, #e8a4b8);
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
}

input:checked + .check-box {
  border-color: var(--season-primary, #e8a4b8);
  background: color-mix(in srgb, var(--season-primary, #e8a4b8) 10%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--season-primary, #e8a4b8) 12%, transparent);
}

input:checked + .check-box::after { transform: translate(-50%,-50%) scale(1); }

/* Case carrée (checkbox) */
.check-box--sq {
  border-radius: 5px;
}
.check-box--sq::after {
  width: 9px; height: 7px;
  border-radius: 0;
  background: none;
  border-bottom: 2px solid var(--season-primary, #e8a4b8);
  border-right: 2px solid var(--season-primary, #e8a4b8);
  transform: translate(-50%, -60%) scale(0) rotate(45deg);
}
input:checked + .check-box--sq::after {
  transform: translate(-50%, -60%) scale(1) rotate(45deg);
}

.check-label {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-mid, #5a4a3a);
  flex: 1;
  transition: color 0.2s;
}

.sidebar__check:has(input:checked) .check-label {
  color: var(--text, #3a2f27);
  font-weight: 400;
}

.check-count {
  font-size: 0.7rem;
  color: var(--text-light, #8a7a6a);
  background: rgba(58,47,39,0.06);
  padding: 2px 7px;
  border-radius: 50px;
  min-width: 24px;
  text-align: center;
}

/* ── TOOLBAR HAUT ── */
.shop-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.shop-toolbar .results-count {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text-light, #8a7a6a);
}

.sort-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-select {
  padding: 8px 32px 8px 14px;
  border-radius: 50px;
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text, #3a2f27);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a7a6a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* Bouton mobile filtres (caché sur desktop) */
.sidebar-mobile-toggle { display: none; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 50px; font-family: 'Jost', sans-serif; font-size: 0.82rem; }

/* ── TAGS FILTRES ACTIFS ── */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1.2rem;
  min-height: 0;
}

.active-filter-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text, #3a2f27);
  background: color-mix(in srgb, var(--season-primary, #e8a4b8) 14%, rgba(255,255,255,0.6));
  border: 1px solid color-mix(in srgb, var(--season-primary, #e8a4b8) 30%, transparent);
  animation: tagIn 0.2s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes tagIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.active-filter-tag button {
  background: none; border: none; cursor: pointer;
  font-size: 0.75rem; color: var(--text-light, #8a7a6a);
  padding: 0; line-height: 1;
  transition: color 0.15s;
}
.active-filter-tag button:hover { color: var(--text, #3a2f27); }

/* ── SHOP MAIN (dans le layout) ── */
.shop-main { min-width: 0; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .shop-layout {
    grid-template-columns: 1fr;
    padding: 0 4vw 6rem;
  }

  .shop-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 300px;
    z-index: 200;
    border-radius: 0 var(--radius-lg, 28px) var(--radius-lg, 28px) 0;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
    padding-top: 1rem;
  }

  .shop-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 40px rgba(160,130,100,0.2);
  }

  .sidebar-mobile-toggle { display: flex; }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(58,47,39,0.2);
    backdrop-filter: blur(4px);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }
  .sidebar-overlay.visible { opacity: 1; pointer-events: all; }
}
