/* ============================================================
   Shop face buyer (public profile landing) — styles
   Préfixe : .zh-shop-*  (root scopé sous .zh-shop-root)
   Inclut : header, catalog grid, card, detail, drawer, address,
            totals, success overlay, FAB, toasts.
   Responsive : 1 col < 600px, 2 cols 600-900, 3 cols >= 900.
   ============================================================ */

/* Hidden override : indispensable car `.zh-shop-root` définit `display: flex`
   plus loin (même spécificité que `[hidden]`, gagne par ordre déclaration). */
.zh-shop-root[hidden],
.zh-shop-drawer-overlay[hidden],
.zh-shop-success-overlay[hidden],
.zh-shop-gallery-lightbox[hidden],
.zh-shop-fab[hidden] {
  display: none !important;
}

.zh-shop-root {
  /* Tokens shop scopés */
  --zh-shop-primary: #8d22ff;
  --zh-shop-primary-dk: #7314e0;
  --zh-shop-text: #1f1840;
  --zh-shop-text-soft: #6b7280;
  --zh-shop-text-mute: #9ca3af;
  --zh-shop-border: #e9e7f3;
  --zh-shop-border-soft: #f0eef9;
  --zh-shop-bg: #ffffff;
  --zh-shop-bg-soft: #f8f6ff;
  --zh-shop-bg-row: #faf9ff;
  --zh-shop-success: #10b981;
  --zh-shop-success-bg: #d1fae5;
  --zh-shop-error: #ef4444;
  --zh-shop-error-bg: #fee2e2;
  --zh-shop-radius-sm: 10px;
  --zh-shop-radius-md: 14px;
  --zh-shop-radius-lg: 20px;
  --zh-shop-shadow-card: 0 6px 20px rgba(141, 34, 255, 0.07);
  --zh-shop-shadow-card-hover: 0 12px 28px rgba(141, 34, 255, 0.16);
  --zh-shop-shadow-elev: 0 20px 60px rgba(15, 8, 38, 0.18);

  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  padding: 4px 4px 12px;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  color: var(--zh-shop-text);
  box-sizing: border-box;
  min-height: 100%;
}

.zh-shop-root *,
.zh-shop-root *::before,
.zh-shop-root *::after {
  box-sizing: inherit;
}

/* Quand la carte profil affiche la face shop : un peu plus d'air. */
.zh-pp-card.zh-pp-card--shop-active {
  /* Permet à la grille de respirer dans la carte. */
  padding-bottom: 24px;
}

/* ─── Header local face Shop ───────────────────────────────────────── */

.zh-shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 4px 0;
}

.zh-shop-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.zh-shop-title {
  margin: 0;
  font-family: "Space Grotesk", "DM Sans", sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--zh-shop-text);
}

.zh-shop-count {
  margin: 0;
  font-size: 13px;
  color: var(--zh-shop-text-soft);
  min-height: 16px;
}

.zh-shop-header-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--zh-shop-border);
  border-radius: 50%;
  background: var(--zh-shop-bg);
  color: var(--zh-shop-text);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease,
    transform 120ms ease;
  flex-shrink: 0;
}
.zh-shop-header-cart:hover {
  background: var(--zh-shop-bg-soft);
  border-color: var(--zh-shop-primary);
  color: var(--zh-shop-primary);
}
.zh-shop-header-cart:active {
  transform: scale(0.96);
}
.zh-shop-header-cart svg {
  width: 20px;
  height: 20px;
}

.zh-shop-header-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--zh-shop-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(141, 34, 255, 0.4);
}

/* ─── Catalogue grille ─────────────────────────────────────────────── */

.zh-shop-catalog {
  width: 100%;
  min-height: 0;
}

.zh-shop-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 599px) {
  .zh-shop-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (min-width: 900px) {
  .zh-shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 1200px) {
  .zh-shop-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ─── Card produit ─────────────────────────────────────────────────── */

.zh-shop-card {
  position: relative;
  background: var(--zh-shop-bg);
  border: 1px solid var(--zh-shop-border);
  border-radius: var(--zh-shop-radius-md);
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease,
    border-color 160ms ease;
  box-shadow: var(--zh-shop-shadow-card);
}
.zh-shop-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--zh-shop-shadow-card-hover);
  border-color: var(--zh-shop-primary);
}
.zh-shop-card.is-oos {
  opacity: 0.78;
}

.zh-shop-card-btn {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.zh-shop-card-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--zh-shop-bg-soft);
  overflow: hidden;
}
.zh-shop-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: var(--zh-shop-bg-soft);
  transition: transform 280ms ease;
  display: block;
}
.zh-shop-card:hover .zh-shop-card-image img {
  transform: scale(1.02);
}

.zh-shop-card-image-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--zh-shop-text-mute);
}
.zh-shop-card-image-placeholder svg {
  width: 36%;
  height: 36%;
  max-width: 60px;
  max-height: 60px;
}

.zh-shop-card-discount {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  background: var(--zh-shop-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 10px rgba(141, 34, 255, 0.3);
}

.zh-shop-card-oos {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  background: rgba(31, 24, 64, 0.92);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
}

.zh-shop-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px 14px;
}

.zh-shop-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--zh-shop-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  min-height: 2.7em;
}

.zh-shop-card-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.zh-shop-card-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--zh-shop-primary);
}

.zh-shop-card-compare {
  font-size: 13px;
  color: var(--zh-shop-text-mute);
  text-decoration: line-through;
}

/* ─── Empty state catalogue ────────────────────────────────────────── */

.zh-shop-empty {
  text-align: center;
  padding: 48px 16px;
  background: var(--zh-shop-bg-soft);
  border: 1px dashed var(--zh-shop-border);
  border-radius: var(--zh-shop-radius-md);
  color: var(--zh-shop-text-soft);
}
.zh-shop-empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--zh-shop-bg);
  color: var(--zh-shop-primary);
}
.zh-shop-empty-icon svg {
  width: 28px;
  height: 28px;
}
.zh-shop-empty-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--zh-shop-text);
}
.zh-shop-empty-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* ─── Vue détail produit ───────────────────────────────────────────── */

.zh-shop-detail {
  background: var(--zh-shop-bg);
  border: 1px solid var(--zh-shop-border);
  border-radius: var(--zh-shop-radius-md);
  padding: 18px;
  box-shadow: var(--zh-shop-shadow-card);
  flex: 0 0 auto;
}

.zh-shop-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  margin-bottom: 14px;
  background: transparent;
  color: var(--zh-shop-text-soft);
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.zh-shop-detail-back:hover {
  background: var(--zh-shop-bg-soft);
  color: var(--zh-shop-primary);
}
.zh-shop-detail-back svg {
  width: 14px;
  height: 14px;
}

.zh-shop-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 720px) {
  .zh-shop-detail-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 24px;
  }
}

.zh-shop-detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.zh-shop-detail-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--zh-shop-bg-soft);
  border-radius: var(--zh-shop-radius-md);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--zh-shop-text-mute);
}
.zh-shop-detail-image.is-zoomable {
  cursor: zoom-in;
}
.zh-shop-detail-image.is-zoomable:focus-visible {
  outline: 2px solid var(--zh-shop-primary);
  outline-offset: 3px;
}
.zh-shop-detail-image img {
  width: 100%;
  height: 100%;
  max-height: min(72vh, 640px);
  object-fit: contain;
  object-position: center;
  background: var(--zh-shop-bg-soft);
  display: block;
  transition: transform 0.12s ease-out;
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  .zh-shop-detail-image.is-zoomable:hover img {
    cursor: zoom-in;
  }
}
@media (prefers-reduced-motion: reduce) {
  .zh-shop-detail-image img {
    transition: none;
  }
}
.zh-shop-detail-image video,
.zh-shop-detail-image video,
.zh-shop-detail-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}
.zh-shop-detail-image-placeholder svg {
  width: 56px;
  height: 56px;
}

.zh-shop-detail-thumbs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.zh-shop-detail-thumb button {
  display: block;
  width: 56px;
  height: 56px;
  padding: 0;
  background: var(--zh-shop-bg-soft);
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 140ms ease;
  flex-shrink: 0;
}
.zh-shop-detail-thumb button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.zh-shop-detail-thumb-media {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}
.zh-shop-detail-thumb-media img,
.zh-shop-detail-thumb-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.zh-shop-detail-thumb-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}
.zh-shop-detail-thumb-play {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.72);
  color: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}
.zh-shop-detail-thumb-play svg {
  width: 11px;
  height: 11px;
  margin-left: 1px;
}
.zh-shop-detail-thumb.is-active button {
  border-color: var(--zh-shop-primary);
}

.zh-shop-detail-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zh-shop-detail-name {
  margin: 0;
  font-family: "Space Grotesk", "DM Sans", sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--zh-shop-text);
}

.zh-shop-detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.zh-shop-detail-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--zh-shop-primary);
}
.zh-shop-detail-compare {
  font-size: 15px;
  color: var(--zh-shop-text-mute);
  text-decoration: line-through;
}
.zh-shop-detail-discount {
  padding: 3px 8px;
  background: var(--zh-shop-error-bg);
  color: var(--zh-shop-error);
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
}

.zh-shop-detail-stock {
  margin: 0;
  font-size: 13px;
  color: var(--zh-shop-text-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}
.zh-shop-detail-stock.is-oos {
  color: var(--zh-shop-error);
}
.zh-shop-detail-stock.is-low {
  color: #d97706;
}

.zh-shop-detail-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--zh-shop-text-soft);
  white-space: pre-wrap;
}

.zh-shop-detail-variants {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zh-shop-variant-group {
  margin: 0;
  padding: 0;
  border: 0;
}
.zh-shop-variant-legend {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--zh-shop-text-soft);
  margin-bottom: 6px;
}
.zh-shop-variant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.zh-shop-variant-chip {
  padding: 6px 12px;
  border: 1.5px solid var(--zh-shop-border);
  border-radius: 999px;
  background: var(--zh-shop-bg);
  color: var(--zh-shop-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.zh-shop-variant-chip:hover {
  border-color: var(--zh-shop-primary);
}
.zh-shop-variant-chip.is-active {
  background: var(--zh-shop-primary);
  color: #fff;
  border-color: var(--zh-shop-primary);
}

.zh-shop-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

@media (min-width: 480px) {
  .zh-shop-detail-actions {
    flex-direction: row;
  }
  .zh-shop-detail-actions .zh-shop-btn {
    flex: 1;
  }
}

/* ─── Boutons ──────────────────────────────────────────────────────── */

.zh-shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1.5px solid transparent;
  border-radius: var(--zh-shop-radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease,
    color 160ms ease, transform 120ms ease, box-shadow 160ms ease;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}
.zh-shop-btn:active {
  transform: scale(0.98);
}
.zh-shop-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.zh-shop-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.zh-shop-btn--primary {
  background: var(--zh-shop-primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(141, 34, 255, 0.28);
}
.zh-shop-btn--primary:hover:not(:disabled) {
  background: var(--zh-shop-primary-dk);
}

.zh-shop-btn--ghost {
  background: var(--zh-shop-bg);
  color: var(--zh-shop-text);
  border-color: var(--zh-shop-border);
}
.zh-shop-btn--ghost:hover:not(:disabled) {
  background: var(--zh-shop-bg-soft);
  border-color: var(--zh-shop-primary);
  color: var(--zh-shop-primary);
}

.zh-shop-btn--full {
  width: 100%;
}

.zh-shop-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: zh-shop-spin 720ms linear infinite;
}
@keyframes zh-shop-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── Drawer panier ────────────────────────────────────────────────── */

.zh-shop-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}
.zh-shop-drawer-overlay[hidden] {
  display: none;
}

.zh-shop-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 8, 38, 0.45);
  border: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: auto;
}
.zh-shop-drawer-overlay.is-open .zh-shop-drawer-backdrop {
  opacity: 1;
}

.zh-shop-drawer {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: var(--zh-shop-bg);
  display: flex;
  flex-direction: column;
  box-shadow: -16px 0 40px rgba(15, 8, 38, 0.22);
  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  color: var(--zh-shop-text);

  /* Tokens locaux pour le drawer (mêmes que root). */
  --zh-shop-primary: #8d22ff;
  --zh-shop-primary-dk: #7314e0;
  --zh-shop-text: #1f1840;
  --zh-shop-text-soft: #6b7280;
  --zh-shop-text-mute: #9ca3af;
  --zh-shop-border: #e9e7f3;
  --zh-shop-bg: #ffffff;
  --zh-shop-bg-soft: #f8f6ff;
  --zh-shop-radius-sm: 10px;
  --zh-shop-radius-md: 14px;
}
.zh-shop-drawer-overlay.is-open .zh-shop-drawer {
  transform: translateX(0);
}

@media (max-width: 767px) {
  .zh-shop-drawer {
    max-width: 100%;
  }
}

.zh-shop-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--zh-shop-border);
  flex-shrink: 0;
}
.zh-shop-drawer-title {
  margin: 0;
  font-family: "Space Grotesk", "DM Sans", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.zh-shop-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--zh-shop-text-soft);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.zh-shop-drawer-close:hover {
  background: var(--zh-shop-bg-soft);
  color: var(--zh-shop-text);
}
.zh-shop-drawer-close svg {
  width: 18px;
  height: 18px;
}

.zh-shop-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.zh-shop-drawer-empty {
  text-align: center;
  padding: 48px 16px 24px;
  color: var(--zh-shop-text-soft);
}
.zh-shop-drawer-empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--zh-shop-bg-soft);
  color: var(--zh-shop-primary);
}
.zh-shop-drawer-empty-icon svg {
  width: 28px;
  height: 28px;
}
.zh-shop-drawer-empty-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--zh-shop-text);
}
.zh-shop-drawer-empty-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

/* Items panier */

.zh-shop-cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zh-shop-cart-row {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--zh-shop-bg-soft);
  border-radius: var(--zh-shop-radius-md);
  align-items: flex-start;
}

.zh-shop-cart-row-image {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--zh-shop-bg);
  flex-shrink: 0;
}
.zh-shop-cart-row-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.zh-shop-cart-row-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.zh-shop-cart-row-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--zh-shop-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}
.zh-shop-cart-row-variant {
  font-size: 11px;
  color: var(--zh-shop-text-mute);
}
.zh-shop-cart-row-variant:empty {
  display: none;
}
.zh-shop-cart-row-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--zh-shop-primary);
}

.zh-shop-cart-row-qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  background: var(--zh-shop-bg);
  border: 1px solid var(--zh-shop-border);
  border-radius: 999px;
  padding: 2px;
  width: fit-content;
}
.zh-shop-qty-btn {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--zh-shop-text);
  cursor: pointer;
  transition: background 140ms ease;
}
.zh-shop-qty-btn:hover {
  background: var(--zh-shop-bg-soft);
}
.zh-shop-qty-btn svg {
  width: 12px;
  height: 12px;
}
.zh-shop-qty-value {
  min-width: 22px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.zh-shop-cart-row-remove {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--zh-shop-text-mute);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
  flex-shrink: 0;
}
.zh-shop-cart-row-remove:hover {
  background: var(--zh-shop-error-bg);
  color: var(--zh-shop-error);
}
.zh-shop-cart-row-remove svg {
  width: 14px;
  height: 14px;
}

/* Adresse */

.zh-shop-address {
  background: var(--zh-shop-bg-soft);
  border-radius: var(--zh-shop-radius-md);
  padding: 12px 14px;
}
.zh-shop-address-summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--zh-shop-text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.zh-shop-address-summary::-webkit-details-marker {
  display: none;
}
.zh-shop-address-summary::after {
  content: "▾";
  font-size: 12px;
  color: var(--zh-shop-text-mute);
  transition: transform 180ms ease;
}
.zh-shop-address[open] .zh-shop-address-summary::after {
  transform: rotate(180deg);
}
.zh-shop-address-hint {
  margin: 8px 0 12px;
  font-size: 12px;
  color: var(--zh-shop-text-soft);
}

.zh-shop-address-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 480px) {
  .zh-shop-address-form {
    grid-template-columns: 1fr 1fr;
  }
}

.zh-shop-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.zh-shop-field--full {
  grid-column: 1 / -1;
}
.zh-shop-field-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--zh-shop-text-soft);
}
.zh-shop-input {
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--zh-shop-text);
  background: var(--zh-shop-bg);
  border: 1.5px solid var(--zh-shop-border);
  border-radius: 8px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  width: 100%;
}
.zh-shop-input:focus {
  outline: none;
  border-color: var(--zh-shop-primary);
  box-shadow: 0 0 0 3px rgba(141, 34, 255, 0.16);
}
.zh-shop-input.is-error {
  border-color: var(--zh-shop-error);
}

.zh-shop-address-error {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--zh-shop-error);
}

/* Totaux */

.zh-shop-totals {
  background: var(--zh-shop-bg);
  border: 1px solid var(--zh-shop-border);
  border-radius: var(--zh-shop-radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.zh-shop-totals-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--zh-shop-text);
}
.zh-shop-totals-row--muted {
  color: var(--zh-shop-text-soft);
  font-size: 12px;
}
.zh-shop-totals-row--total {
  font-size: 16px;
  font-weight: 700;
  padding-top: 8px;
  border-top: 1px solid var(--zh-shop-border);
}
.zh-shop-totals-value {
  font-weight: 600;
  color: var(--zh-shop-primary);
}

/* Footer drawer */

.zh-shop-drawer-foot {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--zh-shop-border);
  flex-shrink: 0;
  background: var(--zh-shop-bg);
}
.zh-shop-checkout-help {
  margin: 8px 0 0;
  text-align: center;
  font-size: 11px;
  color: var(--zh-shop-text-mute);
}

/* ─── Overlay succès ───────────────────────────────────────────────── */

.zh-shop-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  background: rgba(15, 8, 38, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: zh-shop-fade-in 220ms ease;
}
.zh-shop-success-overlay[hidden] {
  display: none;
}
@keyframes zh-shop-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.zh-shop-success-card {
  background: #fff;
  border-radius: var(--zh-shop-radius-lg, 20px);
  padding: 32px 28px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: var(--zh-shop-shadow-elev, 0 20px 60px rgba(15, 8, 38, 0.22));
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  color: #1f1840;
}
.zh-shop-success-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #d1fae5;
  color: #10b981;
}
.zh-shop-success-icon svg {
  width: 36px;
  height: 36px;
}
.zh-shop-success-title {
  margin: 0 0 8px;
  font-family: "Space Grotesk", "DM Sans", sans-serif;
  font-size: 20px;
  font-weight: 700;
}
.zh-shop-success-body {
  margin: 0 0 22px;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}
.zh-shop-success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ─── FAB cart flottant ────────────────────────────────────────────── */

.zh-shop-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  background: #8d22ff;
  color: #fff;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(141, 34, 255, 0.4);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.zh-shop-fab:hover {
  background: #7314e0;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(141, 34, 255, 0.5);
}
.zh-shop-fab:active {
  transform: scale(0.95);
}
.zh-shop-fab[hidden] {
  display: none;
}
.zh-shop-fab svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 767px) {
  .zh-shop-fab {
    /* Au-dessus du wheel menu / drawer mobile (bottom 80px). */
    bottom: 96px;
    right: 16px;
    width: 52px;
    height: 52px;
  }
  .zh-shop-fab svg {
    width: 22px;
    height: 22px;
  }
}

.zh-shop-fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  border-radius: 999px;
  border: 2px solid #fff;
}
.zh-shop-fab-badge[hidden] {
  display: none;
}

@keyframes zh-shop-fab-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 12px 28px rgba(141, 34, 255, 0.4);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 16px 36px rgba(141, 34, 255, 0.55);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 12px 28px rgba(141, 34, 255, 0.4);
  }
}
.zh-shop-fab.is-pulse {
  animation: zh-shop-fab-pulse 480ms ease;
}

/* Indicateur dot rouge sur l'icône Shop de la zh-pp-faces-strip
   quand le panier contient des items (renforce la visibilité du FAB). */
.zh-pp-face.zh-pp-face--cart-pending {
  position: relative;
}
.zh-pp-face.zh-pp-face--cart-pending::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid #fff;
  pointer-events: none;
}

/* ─── Toasts ───────────────────────────────────────────────────────── */

.zh-shop-toasts {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
}
@media (max-width: 599px) {
  .zh-shop-toasts {
    top: auto;
    bottom: 20px;
    left: 16px;
    right: 16px;
  }
}

.zh-shop-toast {
  background: #1f1840;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 12px 28px rgba(15, 8, 38, 0.25);
  pointer-events: auto;
  animation: zh-shop-toast-in 240ms cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 360px;
}
.zh-shop-toast.is-success {
  background: #10b981;
}
.zh-shop-toast.is-error {
  background: #ef4444;
}
.zh-shop-toast.is-info {
  background: #1f1840;
}
.zh-shop-toast.is-leaving {
  animation: zh-shop-toast-out 180ms ease forwards;
}
@keyframes zh-shop-toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes zh-shop-toast-out {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ─── Visionneuse galerie (zoom + plein écran) ───────────────────────── */

.zh-shop-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.zh-shop-gallery-lightbox-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.zh-shop-gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(15, 8, 38, 0.82);
  cursor: pointer;
}
.zh-shop-gallery-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(96vw, 1100px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.zh-shop-gallery-lightbox-panel > * {
  pointer-events: auto;
}
.zh-shop-gallery-lightbox-body {
  width: 100%;
  max-height: calc(92vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--zh-shop-radius-md);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}
.zh-shop-gallery-lightbox-img {
  max-width: 100%;
  max-height: calc(92vh - 56px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
}
.zh-shop-gallery-lightbox-counter {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.02em;
}
.zh-shop-gallery-lightbox-close {
  position: absolute;
  top: -6px;
  right: 0;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 140ms ease;
}
.zh-shop-gallery-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.24);
}
.zh-shop-gallery-lightbox-close svg {
  width: 20px;
  height: 20px;
}
.zh-shop-gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 140ms ease, opacity 140ms ease;
}
.zh-shop-gallery-lightbox-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.24);
}
.zh-shop-gallery-lightbox-nav:disabled {
  opacity: 0.35;
  cursor: default;
}
.zh-shop-gallery-lightbox-nav svg {
  width: 22px;
  height: 22px;
}
.zh-shop-gallery-lightbox-nav--prev {
  left: -56px;
}
.zh-shop-gallery-lightbox-nav--next {
  right: -56px;
}
@media (max-width: 900px) {
  .zh-shop-gallery-lightbox-nav--prev {
    left: 4px;
  }
  .zh-shop-gallery-lightbox-nav--next {
    right: 4px;
  }
  .zh-shop-gallery-lightbox-close {
    top: 4px;
    right: 4px;
  }
}
