/* ============================================================
   BOUTIQUE — Layout, sidebar, grille produits
   ============================================================ */

/* ── Fav button ──────────────────────────────────────────── */
.shop-card__img { position: relative; }
.fav-btn {
  position: absolute;
  top: 8px; right: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(8,15,24,.7);
  border: 0.5px solid rgba(255,255,255,0.1);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.45);
  transition: all .2s;
  z-index: 2;
}
.fav-btn:hover { background: rgba(8,15,24,.9); color: rgba(255,80,80,0.8); border-color: rgba(255,80,80,0.3); }
.fav-btn--active { background: rgba(8,15,24,.9); color: #e53935; border-color: rgba(229,57,53,0.4); }
.fav-btn--active svg { fill: #e53935; }
[data-theme="light"] .fav-btn { background: rgba(255,255,255,.85); border-color: transparent; color: #9e9e9e; }
[data-theme="light"] .fav-btn:hover, [data-theme="light"] .fav-btn--active { background: #fff; color: #e53935; border-color: transparent; }

/* ── Nav active link ─────────────────────────────────────── */
.nav__link--active {
  color: var(--clr-accent) !important;
  font-weight: 600;
}


/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
  background: var(--clr-bg);
  border-bottom: 0.5px solid rgba(255,255,255,0.04);
  padding: 9px 0;
  font-size: .78rem;
  color: rgba(255,255,255,0.3);
}
.breadcrumb a { color: rgba(255,255,255,0.3); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--clr-accent); }
.breadcrumb span { margin: 0 6px; color: rgba(255,215,0,0.4); }

/* ── Wrapper global ──────────────────────────────────────── */
.boutique-wrap { background: var(--clr-bg); min-height: calc(100vh - 64px); padding: 28px 0 64px; }

/* ── Layout sidebar + main ───────────────────────────────── */
.boutique-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.shop-sidebar {
  background: var(--clr-bg-alt);
  border-radius: var(--radius);
  border: 0.5px solid rgba(255,255,255,0.05);
  border-right: 0.5px solid rgba(255,255,255,0.05);
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,215,0,0.3) transparent;
}

.shop-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 0.5px solid rgba(255,255,255,0.05);
}
.shop-sidebar__title {
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,215,0,0.5);
}
.sidebar-close {
  display: none;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--clr-text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.sidebar-close:hover { background: var(--clr-bg-alt); }

/* ── Liste des catégories ────────────────────────────────── */
.cat-list {
  list-style: none;
  padding: 10px 10px;
}
.cat-list__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 14px;
  border-radius: 0;
  border: none;
  border-left: 2px solid transparent;
  background: none;
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 400;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
}
.cat-list__item:hover { background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.8); }
.cat-list__item.active {
  background: rgba(255,215,0,0.06);
  color: var(--clr-accent);
  border-left-color: var(--clr-accent);
}
.cat-list__icon { font-size: 1rem; flex-shrink: 0; }
.cat-list__name { flex: 1; }
.cat-list__count {
  font-size: .68rem;
  font-weight: 400;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.3);
  padding: 1px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}
.cat-list__item.active .cat-list__count { background: rgba(255,215,0,0.1); color: rgba(255,215,0,0.6); }

/* ── Catégorie Promotions ────────────────────────────────── */
.cat-list__item--promo {
  color: var(--clr-accent-blue);
}
.cat-list__item--promo .cat-list__count {
  background: rgba(91,163,232,0.1);
  color: var(--clr-accent-blue);
}
.cat-list__item--promo:hover {
  background: rgba(91,163,232,0.05);
  color: var(--clr-accent-blue);
}
.cat-list__item--promo.active {
  background: rgba(91,163,232,0.08);
  color: var(--clr-accent-blue);
  border-left-color: var(--clr-accent-blue);
}
.cat-list__item--promo.active .cat-list__count { background: rgba(91,163,232,0.15); color: var(--clr-accent-blue); }

/* ── Groupes Ukraine / Russie ────────────────────────────── */
.cat-list__group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 14px;
  border-radius: 0;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
}
.cat-list__group-header:hover { background: rgba(255,255,255,0.03); color: #fff; }
.cat-list__group-header.active {
  color: var(--clr-accent);
}
.cat-list__group-header.active .cat-list__count { background: rgba(255,215,0,0.1); color: rgba(255,215,0,0.6); }
.cat-list__arrow {
  font-size: .65rem;
  color: rgba(255,255,255,0.25);
  transition: transform .25s ease;
  margin-left: auto;
  flex-shrink: 0;
}
.cat-list__group-header.active .cat-list__arrow { color: rgba(255,215,0,0.5); }
.cat-list__group.open > .cat-list__group-header .cat-list__arrow { transform: rotate(180deg); }
.cat-list__sub {
  list-style: none;
  padding: 0 0 4px 8px;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.cat-list__group.open > .cat-list__sub { max-height: 1400px; }
.cat-list__item--sub {
  padding-left: 22px;
  font-size: .85rem;
}
/* Groupe imbriqué (3ème niveau) */
.cat-list__group--nested {
  margin: 0;
}
.cat-list__group-header--nested {
  font-size: .85rem;
  font-weight: 500;
  padding: 7px 12px 7px 22px;
}
.cat-list__item--subsub {
  padding-left: 36px;
  font-size: .82rem;
}

/* ── Filtre prix ─────────────────────────────────────────── */
.sidebar-filter {
  padding: 14px 16px 18px;
  border-top: 0.5px solid rgba(255,255,255,0.05);
}
.sidebar-filter__title {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--clr-text-muted);
  margin-bottom: 12px;
}
.price-range__inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.price-range__inputs input {
  width: 0;
  flex: 1;
  padding: 8px 10px;
  border: 1.5px solid var(--clr-border);
  border-radius: 7px;
  font-family: var(--font);
  font-size: .88rem;
  background: var(--clr-surface);
  color: var(--clr-text);
  transition: border-color var(--transition);
}
.price-range__inputs input:focus { outline: none; border-color: var(--clr-accent); }
.price-range__inputs span { color: var(--clr-text-muted); flex-shrink: 0; }
.price-range__btn { width: 100%; justify-content: center; padding: 9px; font-size: .85rem; }

/* ── Dual range price slider ─────────────────────────────── */
.price-slider-wrap {
  position: relative;
  height: 30px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}
.price-slider__track {
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  background: var(--clr-border);
  border-radius: 2px;
  pointer-events: none;
}
.price-slider__fill {
  position: absolute;
  height: 100%;
  background: var(--clr-accent);
  border-radius: 2px;
  left: 0; width: 100%;
}
.price-slider__input {
  position: absolute;
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  outline: none;
  margin: 0;
}
.price-slider__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--clr-accent);
  border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,.28);
  cursor: pointer;
  pointer-events: all;
  transition: transform .15s ease, box-shadow .15s ease;
}
.price-slider__input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.price-slider__input::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--clr-accent);
  border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,.28);
  cursor: pointer;
  pointer-events: all;
}
.price-slider__input::-webkit-slider-thumb { border-color: #080F18; }
.price-slider__input::-moz-range-thumb     { border-color: #080F18; }
[data-theme="light"] .price-slider__input::-webkit-slider-thumb { border-color: #fff; }
[data-theme="light"] .price-slider__input::-moz-range-thumb     { border-color: #fff; }

/* ── Overlay sidebar mobile ──────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 149;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ── MAIN ────────────────────────────────────────────────── */
.shop-main { min-width: 0; }

/* ── Toolbar ─────────────────────────────────────────────── */
.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.shop-toolbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.shop-toolbar__count {
  font-size: .88rem;
  color: var(--clr-text-muted);
  font-weight: 500;
}
.sidebar-toggle-btn {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 6px;
  border: 0.5px solid var(--clr-border-sub);
  background: var(--clr-surface);
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all var(--transition);
}
.sidebar-toggle-btn:hover { border-color: rgba(255,215,0,0.3); color: var(--clr-accent); }

.shop-sort {
  padding: 7px 10px;
  border: 0.5px solid var(--clr-border-sub);
  border-radius: 6px;
  font-family: var(--font);
  font-size: .82rem;
  background: var(--clr-surface);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: border-color var(--transition);
}
.shop-sort:focus { outline: none; border-color: rgba(255,215,0,0.3); }

/* ── Grille produits ─────────────────────────────────────── */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.shop-card {
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--clr-border-sub);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s cubic-bezier(.25,.46,.45,.94), box-shadow .3s ease, border-color .3s ease;
}
@keyframes cardAppear {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.shop-card--visible {
  animation: cardAppear .4s cubic-bezier(.25,.46,.45,.94) forwards;
}
.shop-card--visible:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  border-color: rgba(255,215,0,0.2);
}

.shop-card__img {
  position: relative;
  background: var(--clr-bg-alt);
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shop-card__emoji { font-size: 4rem; }

/* ── Carousel multi-images ───────────────────────────────── */
.card-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}
.card-carousel__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.card-carousel__img.active { opacity: 1; }

.card-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.45);
  color: #fff;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s, background .2s;
  z-index: 3;
  padding: 0;
}
.card-carousel__btn:hover { background: rgba(0,0,0,.65); }
.shop-card__img:hover .card-carousel__btn { opacity: 1; }
.card-carousel__btn--prev { left: 7px; }
.card-carousel__btn--next { right: 7px; }

.card-carousel__dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 3;
}
.card-carousel__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.card-carousel__dot.active {
  background: #fff;
  transform: scale(1.25);
}

.shop-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--clr-accent);
  color: #080F18;
  font-size: .65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.shop-card__badge--promo { background: var(--clr-accent); color: #080F18; }

.shop-card__body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 130px;
}
.shop-card__cat {
  font-size: .68rem;
  font-weight: 400;
  color: var(--clr-accent-blue);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 4px;
}
.shop-card__name {
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 12px;
  flex: 1;
}
.shop-card__footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
  width: 100%;
}
.shop-card__footer .btn-voir {
  align-self: flex-end;
}
.shop-card__price-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.shop-card__price-lbl {
  font-size: .82rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  white-space: nowrap;
  line-height: 1.2;
}
.shop-card__price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-accent);
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 6px;
}

/* Tag réduction */
.discount-badge {
  display: inline-flex;
  align-items: center;
  background: #e53935;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: .03em;
  flex-shrink: 0;
}

/* Prix barré */
.price-old {
  text-decoration: line-through;
  color: var(--clr-text-muted);
  font-size: .9rem;
  font-weight: 500;
}

/* Prix réduit */
.price-new {
  color: #e53935;
  font-size: .92rem;
  font-weight: 700;
}

/* ── Empty state ─────────────────────────────────────────── */
.shop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 80px 20px;
  text-align: center;
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--clr-border-sub);
}
.shop-empty span { font-size: 3rem; opacity: .4; }
.shop-empty p    { color: var(--clr-text-muted); font-size: .95rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ── Tablette (≤ 960px) ──────────────────────────────────── */
@media (max-width: 960px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Tablette portrait (≤ 820px) ────────────────────────── */
@media (max-width: 820px) {
  .boutique-layout { grid-template-columns: 1fr; }

  /* Sidebar en drawer mobile */
  .shop-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    width: 300px;
    max-width: 85vw;
    border-radius: 0;
    z-index: 150;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .3s ease;
    border: none;
    box-shadow: var(--shadow-lg);
  }
  .shop-sidebar.open { transform: translateX(0); }

  .sidebar-close { display: flex; }
  .sidebar-toggle-btn { display: flex; }
}

/* ── Mobile (≤ 560px) ────────────────────────────────────── */
@media (max-width: 560px) {
  .boutique-wrap { padding: 16px 0 48px; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .shop-card__img { height: 140px; }
  .shop-card__emoji { font-size: 3rem; }
  .shop-card__body { padding: 10px 12px 12px; }
  .shop-card__name { font-size: .85rem; }
  .shop-card__price { font-size: .82rem; }
  .btn-voir { padding: 6px 10px; font-size: .75rem; }
  .shop-toolbar { gap: 8px; }
  .shop-sort { font-size: .82rem; padding: 7px 10px; }
}

/* ── Petit mobile (≤ 380px) ──────────────────────────────── */
@media (max-width: 380px) {
  .shop-grid { grid-template-columns: 1fr; }
}

/* ── Backdrop modal ──────────────────────────────────────── */
#productDetailModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
}
#productDetailModal.show { display: flex; }

/* ── Modal détail produit ────────────────────────────────── */
.product-modal {
  background: var(--clr-surface);
  border: 0.5px solid var(--clr-border-sub);
  border-radius: var(--radius-lg);
  max-width: 700px;
  width: 94%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 36px 32px 32px;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.product-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--clr-bg-alt);
  color: var(--clr-text);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.product-modal__close:hover { background: var(--clr-border); }
.product-modal__title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 20px;
  padding-right: 36px;
}
.product-modal__carousel-wrap {
  border-radius: 12px;
  overflow: hidden;
  background: var(--clr-bg-alt);
  margin-bottom: 20px;
}
.product-modal__single-img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
  background: var(--clr-bg-alt);
  border-radius: 12px;
}
.product-modal__no-img {
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}
.product-modal__desc {
  color: var(--clr-text-muted);
  font-size: .95rem;
  line-height: 1.65;
  margin-bottom: 20px;
  white-space: pre-wrap;
}
.product-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.product-modal__price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--clr-accent);
}
.product-modal__cart-btn { white-space: nowrap; }

/* ── Carousel modal (grand format) ──────────────────────── */
.modal-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--clr-bg-alt);
}
.modal-carousel__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  opacity: 0;
  transition: opacity .35s ease;
}
.modal-carousel__img.active { opacity: 1; }

.modal-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.45);
  color: #fff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: background .2s;
  padding: 0;
}
.modal-carousel__btn:hover { background: rgba(0,0,0,.65); }
.modal-carousel__btn--prev { left: 12px; }
.modal-carousel__btn--next { right: 12px; }

.modal-carousel__dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
  z-index: 3;
}
.modal-carousel__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.modal-carousel__dot.active {
  background: #fff;
  transform: scale(1.3);
}

@media (max-width: 560px) {
  .product-modal { padding: 24px 16px 20px; }
  .product-modal__title { font-size: 1.15rem; }
  .modal-carousel__btn { width: 34px; height: 34px; font-size: 1.4rem; }
}
