/* ==========================================================================
   Eyefind Store — feuille de style dédiée, isolée du reste du site.

   Isolation : tout est scopé sous body.eyefind-store (ajouté sur les pages
   Store uniquement — eyefind-store.php, store/*.php). Rien ici ne modifie une
   règle globale non préfixée : les classes existantes utilisées ailleurs sur
   le site (.btn, .company-badge, .account-form, .footer, .topbar...) restent
   intactes pour les autres pages, on ne fait que les redéclarer *scopées*
   pour leur donner l'identité visuelle du Store à cet endroit précis.

   Thème : le Store a une apparence UNIQUE et FIXE, volontairement indépendante
   du thème clair/sombre/système du reste du site (includes/theme-init.php /
   prefers-color-scheme). Ce choix est demandé explicitement : le Store ne
   doit jamais changer de rendu, quel que soit le thème du navigateur/OS ou
   le réglage global d'Eyefind. `color-scheme: light` ci-dessous fige aussi
   l'apparence des contrôles natifs (inputs, select, scrollbars). Toutes les
   règles du fichier consomment exclusivement les variables --store-*, qui ne
   sont donc définies qu'une seule fois, ici, sans variante par thème.
   ========================================================================== */

body.eyefind-store {
  color-scheme: light;

  /* ---- Palette unique du Store. 3 niveaux (bg < surface < surface-soft)
     — la hiérarchie vient de la typo/l'espacement, pas de blocs colorés. ---- */
  --store-bg: #f4f7f8;
  --store-surface: #ffffff;
  --store-surface-soft: #eef2f4;
  --store-surface-hover: #e6ebee;
  --store-border: #e2e8eb;
  --store-border-strong: #cdd7db;
  --store-text: #102c3a;
  --store-muted: #647985;
  --store-accent: #0f2a44;
  --store-accent-strong: #17436a;
  --store-accent-ink: #ffffff;
  --store-accent-soft: rgba(15, 42, 68, 0.08);
  --store-cyan: #1fb6c9;
  --store-cyan-soft: rgba(31, 182, 201, 0.12);
  --store-yellow: #fbbc05;
  --store-yellow-soft: rgba(251, 188, 5, 0.16);
  --store-danger: #d64545;
  --store-danger-soft: rgba(214, 69, 69, 0.1);
  --store-success: #1f9d5c;
  --store-success-soft: rgba(31, 157, 92, 0.1);
  --store-radius-lg: 16px;
  --store-radius-md: 12px;
  --store-radius-sm: 9px;
  --store-shadow: 0 16px 32px rgba(16, 44, 58, 0.1);
  --store-shadow-soft: 0 1px 2px rgba(16, 44, 58, 0.04), 0 8px 20px rgba(16, 44, 58, 0.06);
  --store-ease: cubic-bezier(0.4, 0, 0.2, 1);

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(244, 247, 248, 0.75) 45%, rgba(244, 247, 248, 0.92) 100%),
    url('../fondstore.png');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: var(--store-bg);
  color: var(--store-text);
}

body.eyefind-store a {
  color: var(--store-muted);
}

/* ==========================================================================
   Barre de navigation supérieure — vraie navbar : liens nus posés sur fond
   blanc, aucune pill/bouton/encadré. Structure en un seul flex row : logo,
   liens de navigation, puis zone compte poussée à droite (margin-left:auto).
   Scopé à body.eyefind-store, donc sans effet sur le topbar des autres pages
   du site (même principe que .annonces-topbar pour le module Annonces).
   ========================================================================== */

body.eyefind-store .topbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 32px;
  padding: 0 clamp(24px, 3vw, 40px);
  min-height: 80px;
  background: #ffffff;
  border-bottom: 1px solid var(--store-border);
}

.store-navbar-logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.store-navbar-logo {
  display: block;
  width: 150px;
  height: auto;
  object-fit: contain;
}

.store-navbar-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 26px;
}

.store-navbar-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 28px 0;
  color: var(--store-text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.18s var(--store-ease);
}

.store-navbar-link:hover {
  color: var(--store-accent-strong);
  text-decoration: none;
}

.store-navbar-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  height: 2px;
  background: var(--store-cyan);
  transform: scaleX(0);
  transition: transform 0.18s var(--store-ease);
}

.store-navbar-link:hover::after {
  transform: scaleX(0.55);
}

.store-navbar-link.active {
  color: var(--store-text);
}

.store-navbar-link.active::after {
  transform: scaleX(1);
}

.store-navbar-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  color: var(--store-text);
}

.store-navbar-account {
  display: flex;
  align-items: center;
  margin-left: auto;
  padding-left: 28px;
  border-left: 1px solid var(--store-border);
}

.store-navbar-account-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--store-text);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.18s var(--store-ease);
}

.store-navbar-account-link:hover {
  color: var(--store-accent-strong);
  text-decoration: none;
}

.store-navbar-link:focus-visible,
.store-navbar-account-link:focus-visible {
  outline: 2px solid var(--store-cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

.store-cart-link {
  position: relative;
}

body.eyefind-store .store-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: 2px;
  border-radius: 999px;
  background: var(--store-cyan);
  color: #ffffff;
  font-size: 10px;
  font-weight: bold;
  vertical-align: middle;
}

@media (max-width: 760px) {
  body.eyefind-store .topbar {
    min-height: 64px;
    gap: 10px 20px;
  }
  .store-navbar-logo {
    width: 116px;
  }
  .store-navbar-links {
    gap: 6px 18px;
  }
  .store-navbar-link {
    padding: 20px 0;
    font-size: 14px;
  }
  .store-navbar-link::after {
    bottom: 15px;
  }
  .store-navbar-account {
    padding-left: 16px;
  }
  .store-navbar-account-label {
    display: none;
  }
}

/* -------------------- Footer : bleu marine premium, encadre la boutique -------------------- */

body.eyefind-store .footer {
  background: #08263a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
}

body.eyefind-store .footer-top {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.eyefind-store .footer a {
  color: rgba(255, 255, 255, 0.72);
}

body.eyefind-store .footer-links a:hover {
  color: #ffffff;
  text-decoration: none;
}

body.eyefind-store .gtaw-badge:hover {
  background: rgba(255, 255, 255, 0.08);
}

body.eyefind-store .gtaw-badge-text {
  color: rgba(255, 255, 255, 0.72);
}

/* -------------------- Boutons / badges / formulaires (recolorés) -------------------- */

body.eyefind-store .btn {
  background: var(--store-surface);
  border: 1px solid var(--store-border);
  border-radius: 999px;
  color: var(--store-text);
  transition: border-color 0.2s var(--store-ease), background 0.2s var(--store-ease), transform 0.15s var(--store-ease);
}

body.eyefind-store .btn:hover {
  border-color: var(--store-border-strong);
  background: var(--store-surface-hover);
  box-shadow: none;
}

body.eyefind-store .btn-primary {
  background: var(--store-accent);
  border-color: var(--store-accent);
  color: var(--store-accent-ink);
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(15, 42, 68, 0.22);
}

body.eyefind-store .btn-primary:hover {
  background: var(--store-accent-strong);
  border-color: var(--store-accent-strong);
  box-shadow: 0 5px 14px rgba(15, 42, 68, 0.3);
  transform: translateY(-1px);
}

body.eyefind-store .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(15, 42, 68, 0.24);
}

body.eyefind-store .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

body.eyefind-store .company-badge-neutral { background: var(--store-surface-soft); color: var(--store-muted); }
body.eyefind-store .company-badge-info { background: var(--store-accent-soft); color: var(--store-accent); }
body.eyefind-store .company-badge-success { background: var(--store-success-soft); color: var(--store-success); }
body.eyefind-store .company-badge-warning { background: var(--store-yellow-soft); color: var(--store-yellow); }
body.eyefind-store .company-badge-danger { background: var(--store-danger-soft); color: var(--store-danger); }

body.eyefind-store .account-errors {
  background: var(--store-danger-soft);
  color: var(--store-danger);
  border-radius: var(--store-radius-sm);
}

body.eyefind-store .company-notice-success {
  background: var(--store-success-soft);
  color: var(--store-success);
}

body.eyefind-store .company-notice-error {
  background: var(--store-danger-soft);
  color: var(--store-danger);
}

body.eyefind-store .account-form label {
  color: var(--store-muted);
}

body.eyefind-store .account-form input,
body.eyefind-store .account-form textarea,
body.eyefind-store .account-form select {
  background: var(--store-surface);
  border-color: var(--store-border);
  color: var(--store-text);
}

body.eyefind-store .account-form input:focus,
body.eyefind-store .account-form textarea:focus,
body.eyefind-store .account-form select:focus {
  border-color: var(--store-accent);
}

body.eyefind-store .account-link {
  color: var(--store-accent);
}

body.eyefind-store .admin-table th {
  color: var(--store-muted);
  border-bottom-color: var(--store-border);
}

body.eyefind-store .admin-table td {
  color: var(--store-text);
  border-bottom-color: var(--store-border);
}

/* -------------------- Structure de page -------------------- */

.store-page {
  width: min(1760px, 100%);
  margin: 0 auto 80px;
  padding: 0 clamp(24px, 3vw, 40px);
}

.store-page-narrow {
  width: min(880px, 100%);
  margin: 0 auto 80px;
  padding: 0 24px;
}

.store-page h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 8px 0 28px;
  color: var(--store-text);
}

.store-footer-actions {
  text-align: center;
  margin-top: 40px;
}

.store-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--store-muted);
  margin: 24px 0 8px;
}

.store-breadcrumb a {
  color: var(--store-accent);
  font-size: 12px;
}

.store-breadcrumb span[aria-hidden] {
  color: var(--store-muted);
  opacity: 0.6;
}

/* -------------------- Intro (courte, pas de hero géant) -------------------- */

.store-intro {
  padding: 28px 0 20px;
}

.store-intro p {
  font-size: 14.5px;
  color: var(--store-muted);
  margin: 0;
}

/* ==========================================================================
   Carousel promotionnel (page d'accueil Store uniquement) — les slides sont
   détectées automatiquement depuis store/assets/slides/ (voir
   includes/store/slides.php) : aucune limite de nombre, rien à coder pour
   en ajouter. Masqué entièrement côté PHP si le dossier est vide. Les images
   sont volontairement en object-fit: cover (bannières plein cadre conçues
   pour ce format), contrairement aux photos produit qui restent en contain.
   ========================================================================== */

.store-carousel {
  position: relative;
  margin: 4px 0 40px;
  border-radius: var(--store-radius-lg);
  overflow: hidden;
  box-shadow: var(--store-shadow);
  background: var(--store-surface-soft);
}

.store-carousel-track {
  display: flex;
  transition: transform 0.5s var(--store-ease);
}

.store-carousel-slide {
  position: relative;
  flex: 0 0 100%;
  aspect-ratio: 21 / 4.5;
}

.store-carousel-slide-link {
  display: block;
  width: 100%;
  height: 100%;
}

.store-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.store-carousel-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 5% 8%;
  max-width: 640px;
  background: linear-gradient(90deg, rgba(8, 20, 33, 0.75) 0%, rgba(8, 20, 33, 0.38) 60%, rgba(8, 20, 33, 0) 100%);
  color: #ffffff;
}

.store-carousel-overlay h2 {
  font-size: clamp(20px, 2.6vw, 34px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
  color: #ffffff;
}

.store-carousel-subtitle {
  font-size: clamp(13px, 1.4vw, 17px);
  font-weight: 600;
  color: var(--store-yellow);
  margin: 0;
}

.store-carousel-text {
  font-size: clamp(12px, 1.1vw, 14.5px);
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  max-width: 460px;
}

.store-carousel-cta {
  display: inline-block;
  width: fit-content;
  margin-top: 8px;
  padding: 10px 22px;
  border-radius: 999px;
}

.store-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(8, 20, 33, 0.45);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s var(--store-ease);
}

.store-carousel-arrow:hover {
  background: rgba(8, 20, 33, 0.7);
}

.store-carousel-arrow.prev { left: 16px; }
.store-carousel-arrow.next { right: 16px; }

.store-carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
}

.store-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s var(--store-ease), transform 0.2s var(--store-ease);
}

.store-carousel-dot.active {
  background: #ffffff;
  transform: scale(1.3);
}

@media (max-width: 760px) {
  .store-carousel-slide {
    aspect-ratio: 16 / 9;
  }
  .store-carousel-overlay {
    max-width: 100%;
    padding: 7% 7%;
    justify-content: flex-end;
    background: linear-gradient(180deg, rgba(8, 20, 33, 0.1) 0%, rgba(8, 20, 33, 0.78) 100%);
  }
  .store-carousel-arrow {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
}

/* -------------------- Mise en page : sidebar + catalogue -------------------- */

.store-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 60px;
}

@media (max-width: 860px) {
  .store-layout {
    grid-template-columns: 1fr;
  }
}

.store-sidebar {
  position: sticky;
  top: 20px;
}

@media (max-width: 860px) {
  .store-sidebar {
    position: static;
  }
}

.store-sidebar-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius-md);
  background: var(--store-surface);
  color: var(--store-text);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.store-sidebar-toggle svg {
  width: 16px;
  height: 16px;
  color: var(--store-muted);
  transition: transform 0.2s var(--store-ease);
  flex-shrink: 0;
}

.store-sidebar-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

@media (max-width: 860px) {
  .store-sidebar-toggle {
    display: flex;
  }
  .store-sidebar-panel {
    display: none;
    margin-top: 8px;
  }
  .store-sidebar-panel.open {
    display: block;
  }
}

.store-sidebar-panel {
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius-lg);
  background: var(--store-surface);
  box-shadow: var(--store-shadow-soft);
  padding: 18px;
}

.store-sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--store-muted);
  margin-bottom: 14px;
}

.store-sidebar-header svg {
  width: 15px;
  height: 15px;
  color: var(--store-cyan);
}

.store-sidebar-header h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin: 0;
}

.store-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.store-sidebar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--store-radius-sm);
  color: var(--store-muted);
  font-size: 13.5px;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: background 0.15s var(--store-ease), color 0.15s var(--store-ease), border-color 0.15s var(--store-ease);
}

.store-sidebar-item:hover {
  background: var(--store-surface-soft);
  color: var(--store-text);
  text-decoration: none;
}

.store-sidebar-item.active {
  background: var(--store-accent-soft);
  color: var(--store-text);
  border-left-color: var(--store-accent);
  font-weight: 700;
}

.store-sidebar-count {
  font-size: 11px;
  color: var(--store-muted);
  background: var(--store-surface-soft);
  border-radius: 999px;
  padding: 1px 7px;
  flex-shrink: 0;
}

.store-sidebar-item.active .store-sidebar-count {
  background: var(--store-surface);
  color: var(--store-accent);
}

/* -------------------- Toolbar recherche/tri -------------------- */

.store-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.store-search {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 42px;
  border: 1px solid var(--store-border);
  border-radius: 999px;
  background: var(--store-surface);
  transition: border-color 0.15s var(--store-ease);
}

.store-search:focus-within {
  border-color: var(--store-accent);
}

.store-search svg {
  width: 16px;
  height: 16px;
  color: var(--store-muted);
  flex-shrink: 0;
}

.store-search input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  color: var(--store-text);
  font-size: 13.5px;
  font-family: inherit;
}

.store-sort {
  position: relative;
  display: inline-flex;
}

.store-sort select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  height: 42px;
  padding: 0 34px 0 16px;
  border: 1px solid var(--store-border);
  border-radius: 999px;
  background: var(--store-surface);
  color: var(--store-text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.store-sort select:focus {
  outline: none;
  border-color: var(--store-accent);
}

.store-sort::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 15px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--store-muted);
  border-bottom: 1.5px solid var(--store-muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

/* -------------------- Sections (avis, produits similaires...) -------------------- */

.store-section {
  margin-bottom: 60px;
  scroll-margin-top: 24px;
}

.store-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 12px;
}

.store-section-header h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--store-text);
}

.store-section-header a {
  font-size: 13px;
  color: var(--store-accent);
  white-space: nowrap;
}

/* -------------------- État vide -------------------- */

.store-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  color: var(--store-muted);
  padding: 70px 20px;
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius-lg);
  background: var(--store-surface);
  box-shadow: var(--store-shadow-soft);
}

.store-empty svg {
  width: 34px;
  height: 34px;
  color: var(--store-muted);
  opacity: 0.6;
  margin-bottom: 4px;
}

.store-empty h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--store-text);
  margin: 0;
}

.store-empty p {
  font-size: 13px;
  margin: 0;
  max-width: 320px;
}

/* ==========================================================================
   Grille produits + cartes — compactes, premium, image jamais recadrée
   (object-fit: contain), posée sur un fond propre qui remplit la zone quel
   que soit le ratio de l'image source.
   ========================================================================== */

.store-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

@media (min-width: 520px) and (max-width: 860px) {
  .store-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
  .store-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1240px) {
  .store-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1600px) {
  .store-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 480px) {
  .store-grid { grid-template-columns: 1fr; }
}

/* Une grille avec un seul produit (catégorie qui n'en contient qu'un, ex:
   EyefindPrime seul dans "Abonnements") : la carte reste petite et isolée
   dans une grille pensée pour plusieurs colonnes - pleine largeur + mise en
   page horizontale (image à gauche, contenu à droite) façon bannière plutôt
   qu'une carte verticale étirée artificiellement. */
.store-grid:has(> .product-card:only-child) {
  grid-template-columns: 1fr;
}

.store-grid:has(> .product-card:only-child) > .product-card {
  flex-direction: row;
}

.store-grid:has(> .product-card:only-child) > .product-card .product-card-media {
  aspect-ratio: auto;
  width: 320px;
  flex-shrink: 0;
}

.store-grid:has(> .product-card:only-child) > .product-card .product-card-body {
  flex: 1;
  justify-content: center;
}

@media (max-width: 640px) {
  .store-grid:has(> .product-card:only-child) > .product-card {
    flex-direction: column;
  }
  .store-grid:has(> .product-card:only-child) > .product-card .product-card-media {
    width: 100%;
    aspect-ratio: 4 / 3;
  }
}

.store-grid-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 14px;
}

.store-grid-scroll .product-card {
  flex: 0 0 220px;
}

.product-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--store-radius-md);
  border: 1px solid var(--store-border);
  background: var(--store-surface);
  box-shadow: var(--store-shadow-soft);
  overflow: hidden;
  transition: box-shadow 0.2s var(--store-ease), transform 0.2s var(--store-ease), border-color 0.2s var(--store-ease);
}

.product-card:hover {
  box-shadow: var(--store-shadow);
  transform: translateY(-3px);
  border-color: var(--store-accent);
}

.product-card-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background: var(--store-surface-soft);
  overflow: hidden;
}

.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 16px;
  display: block;
}

.product-card-media-fallback {
  width: 56px;
  height: 56px;
  color: var(--store-cyan);
  opacity: 0.85;
}

.product-card-media-fallback svg {
  width: 100%;
  height: 100%;
}

.product-card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
}

.product-badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--store-accent-strong);
  background: var(--store-accent-soft);
  box-shadow: 0 1px 2px rgba(16, 44, 58, 0.08);
}

.product-badge-promo { background: var(--store-danger-soft); color: var(--store-danger); }
.product-badge-bestseller { background: var(--store-yellow-soft); color: #8a6a00; }
.product-badge-new { background: var(--store-success-soft); color: var(--store-success); }
.product-badge-limited { background: rgba(147, 51, 234, 0.1); color: #8324d1; }
.product-badge-sponsored { background: var(--store-accent-soft); color: var(--store-accent-strong); }
.product-badge-prime { background: rgba(251, 188, 5, 0.16); color: #8a6a00; }

.product-card-cta-prime {
  background: rgba(251, 188, 5, 0.14);
  border-color: rgba(251, 188, 5, 0.4);
  color: #8a6a00;
}

.product-card-cta-prime:hover {
  background: rgba(251, 188, 5, 0.22);
  border-color: rgba(251, 188, 5, 0.6);
}

.product-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.product-card-category {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--store-muted);
}

.product-card-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--store-text);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.product-card-name:hover {
  color: var(--store-accent);
  text-decoration: none;
}

.product-card-desc {
  font-size: 12.5px;
  color: var(--store-muted);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card-rating {
  color: var(--store-muted);
}

.product-card-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.product-card-price {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--store-accent);
}

.product-card-old-price {
  font-size: 12px;
  color: var(--store-muted);
  text-decoration: line-through;
}

.product-card-discount {
  font-size: 11px;
  font-weight: 800;
  color: var(--store-danger);
}

.product-card-price-prime {
  color: var(--store-success);
}

.product-card-prime-tag {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--store-success-soft);
  color: var(--store-success);
}

.product-card-stock {
  font-size: 11px;
  color: var(--store-success);
}

.product-card-stock.low {
  color: var(--store-danger);
}

.product-card-cta {
  margin-top: 8px;
  width: 100%;
  font-weight: 700;
  font-size: 13px;
  height: 38px;
  border-radius: 999px;
}

/* ==========================================================================
   Fiche produit — grande zone image à gauche (jamais recadrée), informations
   + achat à droite sur desktop ; image au-dessus, contenu dessous sur mobile.
   ========================================================================== */

body.eyefind-store .product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 24px 56px;
  align-items: start;
  margin: 8px 0 60px;
}

body.eyefind-store .product-detail-gallery {
  grid-column: 1;
  grid-row: 1 / 3;
}

body.eyefind-store .product-detail-info {
  grid-column: 2;
  grid-row: 1;
}

body.eyefind-store .product-detail-buybox-col {
  grid-column: 2;
  grid-row: 2;
}

@media (max-width: 860px) {
  body.eyefind-store .product-detail {
    grid-template-columns: 1fr;
  }
  body.eyefind-store .product-detail-gallery,
  body.eyefind-store .product-detail-info,
  body.eyefind-store .product-detail-buybox-col {
    grid-column: 1;
    grid-row: auto;
  }
}

body.eyefind-store .product-detail-gallery-main {
  aspect-ratio: 1 / 1;
  border-radius: var(--store-radius-lg);
  overflow: hidden;
  background: var(--store-surface-soft);
  border: 1px solid var(--store-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.eyefind-store .product-detail-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 36px;
}

body.eyefind-store .product-detail-gallery-main .product-card-media-fallback {
  width: 150px;
  height: 150px;
}

body.eyefind-store .product-detail-gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  overflow-x: auto;
}

body.eyefind-store .product-detail-gallery-thumbs img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  padding: 8px;
  border-radius: var(--store-radius-sm);
  border: 1px solid var(--store-border);
  background: var(--store-surface-soft);
  flex-shrink: 0;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.15s var(--store-ease), border-color 0.15s var(--store-ease);
}

body.eyefind-store .product-detail-gallery-thumbs img:hover {
  opacity: 1;
  border-color: var(--store-border-strong);
}

body.eyefind-store .product-detail-category {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--store-muted);
  margin-bottom: 10px;
}

body.eyefind-store .product-detail-info h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--store-text);
}

body.eyefind-store .product-detail-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

body.eyefind-store .product-detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 14px 0 18px;
  flex-wrap: wrap;
}

body.eyefind-store .product-detail-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--store-text);
}

body.eyefind-store .product-detail-old-price {
  font-size: 17px;
  color: var(--store-muted);
  text-decoration: line-through;
}

body.eyefind-store .product-detail-desc {
  color: var(--store-muted);
  font-size: 14.5px;
  line-height: 1.75;
  margin-bottom: 4px;
}

body.eyefind-store .product-detail-buybox {
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius-lg);
  background: var(--store-surface);
  box-shadow: var(--store-shadow-soft);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

body.eyefind-store .product-detail-stock {
  font-size: 13px;
  font-weight: 600;
}

body.eyefind-store .product-specs {
  margin: 8px 0 48px;
  padding: 24px;
  border-radius: var(--store-radius-lg);
  border: 1px solid var(--store-border);
  background: var(--store-surface);
}

body.eyefind-store .product-specs h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--store-text);
}

body.eyefind-store .product-specs dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px 16px;
  margin: 0;
  max-width: 520px;
}

body.eyefind-store .product-specs dt {
  font-size: 13px;
  color: var(--store-muted);
}

body.eyefind-store .product-specs dd {
  font-size: 13px;
  color: var(--store-text);
  margin: 0;
}

/* -------------------- Stepper quantité (fiche produit + panier) -------------------- */

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--store-border);
  border-radius: 999px;
  overflow: hidden;
  width: fit-content;
}

.qty-stepper button {
  width: 34px;
  height: 34px;
  border: none;
  background: var(--store-surface-soft);
  color: var(--store-text);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  transition: background-color 0.15s var(--store-ease), color 0.15s var(--store-ease);
}

.qty-stepper button:hover {
  background: var(--store-accent-soft);
  color: var(--store-accent);
}

.qty-stepper input {
  width: 42px;
  height: 34px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--store-border);
  border-right: 1px solid var(--store-border);
  background: transparent;
  color: var(--store-text);
  font-size: 14px;
}

.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ==========================================================================
   Panier
   ========================================================================== */

.store-cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
  margin: 8px 0 60px;
}

@media (max-width: 900px) {
  .store-cart-layout { grid-template-columns: 1fr; }
}

.store-cart-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-item-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius-lg);
  background: var(--store-surface);
  box-shadow: var(--store-shadow-soft);
  flex-wrap: wrap;
  transition: box-shadow 0.2s var(--store-ease), border-color 0.2s var(--store-ease);
}

.cart-item-card:hover {
  box-shadow: var(--store-shadow);
  border-color: var(--store-border-strong);
}

.cart-item-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--store-radius-md);
  overflow: hidden;
  background: var(--store-surface-soft);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 8px;
}

.cart-item-thumb .product-card-media-fallback {
  width: 40px;
  height: 40px;
}

.cart-item-info {
  flex: 1;
  min-width: 160px;
}

.cart-item-name {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--store-text);
}

.cart-item-price {
  font-size: 13px;
  color: var(--store-muted);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
  margin-left: auto;
}

.cart-item-line-total {
  font-weight: 800;
  font-size: 15px;
  min-width: 70px;
  text-align: right;
  color: var(--store-text);
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--store-danger);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.cart-item-remove:hover {
  text-decoration: underline;
}

.store-cart-summary {
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius-lg);
  background: var(--store-surface);
  box-shadow: var(--store-shadow-soft);
  padding: 24px;
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.store-cart-summary h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--store-text);
}

.store-cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--store-muted);
}

.store-cart-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 800;
  color: var(--store-text);
  padding-top: 14px;
  border-top: 1px solid var(--store-border);
}

.store-cart-summary-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.store-cart-summary-actions .btn-primary {
  border-radius: 999px;
  height: 46px;
}

.store-cart-summary-clear {
  background: none;
  border: none;
  color: var(--store-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-align: center;
}

.store-cart-summary-clear:hover {
  text-decoration: underline;
  color: var(--store-text);
}

/* EyefindPrime / code promo (panier) */

.store-cart-summary-discount {
  color: var(--store-success);
}

.store-cart-promo-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.store-cart-promo-form input[type="text"] {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--store-border);
  border-radius: 999px;
  background: var(--store-surface);
  color: var(--store-text);
  font-size: 13px;
  font-family: inherit;
}

.store-cart-promo-form input[type="text"]:focus {
  outline: none;
  border-color: var(--store-accent);
}

.store-cart-promo-form .btn {
  flex-shrink: 0;
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
}

.store-cart-promo-applied {
  flex: 1;
  font-size: 13px;
  color: var(--store-success);
}

.store-cart-promo-remove {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--store-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.store-cart-promo-remove:hover {
  text-decoration: underline;
  color: var(--store-text);
}

/* Mention discrète "Paiement sécurisé par VELYN" (fiche produit + panier) */

.store-secure-payment {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 11.5px;
  color: var(--store-muted);
}

.store-secure-payment a {
  color: var(--store-muted);
  text-decoration: underline;
}

.store-secure-payment a:hover {
  color: var(--store-text);
}

.store-secure-payment-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--store-muted);
}

/* ==========================================================================
   Confirmation de paiement (fleeca/retour.php)
   ========================================================================== */

.store-confirm {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 48px 32px;
  margin: 24px 0;
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius-lg);
  background: var(--store-surface);
  box-shadow: var(--store-shadow-soft);
}

.store-confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.store-confirm-icon svg {
  width: 26px;
  height: 26px;
}

.store-confirm-icon.success { background: var(--store-success-soft); color: var(--store-success); }
.store-confirm-icon.pending { background: var(--store-yellow-soft); color: var(--store-yellow); }
.store-confirm-icon.danger { background: var(--store-danger-soft); color: var(--store-danger); }
.store-confirm-icon.neutral { background: var(--store-surface-soft); color: var(--store-muted); }

.store-confirm h1 {
  font-size: 21px;
  font-weight: 700;
  margin: 0;
  color: var(--store-text);
}

.store-confirm p {
  font-size: 14px;
  color: var(--store-muted);
  max-width: 400px;
  margin: 6px 0 0;
  line-height: 1.6;
}

.store-confirm-summary {
  display: flex;
  gap: 32px;
  margin: 22px 0 4px;
  padding: 16px 28px;
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius-md);
  background: var(--store-surface-soft);
}

.store-confirm-summary div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.store-confirm-summary span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--store-muted);
}

.store-confirm-summary strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--store-text);
}

.store-confirm p.store-confirm-note {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 16px;
}

.store-confirm-note a {
  color: inherit;
}

.store-confirm-actions {
  margin-top: 24px;
}

/* ==========================================================================
   Mes commandes / détail de commande
   ========================================================================== */

.store-order-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 8px 0 40px;
}

.order-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius-lg);
  background: var(--store-surface);
  box-shadow: var(--store-shadow-soft);
  color: var(--store-text);
  flex-wrap: wrap;
  transition: box-shadow 0.2s var(--store-ease), transform 0.2s var(--store-ease), border-color 0.2s var(--store-ease);
}

.order-card:hover {
  border-color: var(--store-border-strong);
  text-decoration: none;
  box-shadow: var(--store-shadow);
  transform: translateY(-2px);
}

.order-card-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-card-number {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--store-text);
}

.order-card-date,
.order-card-items {
  font-size: 12px;
  color: var(--store-muted);
}

.order-card-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.order-card-total {
  font-weight: 800;
  font-size: 16px;
  color: var(--store-text);
}

.order-detail-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 24px 0;
}

.order-detail-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius-md);
  background: var(--store-surface);
}

.order-detail-item-name {
  flex: 1;
  font-size: 14px;
  color: var(--store-text);
}

.order-detail-item-qty {
  font-size: 13px;
  color: var(--store-muted);
}

.order-detail-item-total {
  font-weight: 700;
  font-size: 14px;
  color: var(--store-text);
}

/* ==========================================================================
   Avis clients (fiche produit)
   ========================================================================== */

.store-stars {
  display: inline-flex;
  gap: 1px;
  vertical-align: middle;
}
.store-stars svg {
  width: 15px;
  height: 15px;
}
.store-stars .star-filled {
  fill: var(--store-yellow);
}
.store-stars .star-empty {
  fill: var(--store-border);
}

.store-rating-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
  font-size: 13px;
  color: var(--store-muted);
}

.store-star-picker {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
  width: fit-content;
}
.store-star-picker input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.store-star-picker label {
  font-size: 28px;
  line-height: 1;
  color: var(--store-border);
  cursor: pointer;
  transition: color 0.1s var(--store-ease);
}
.store-star-picker label:hover,
.store-star-picker label:hover ~ label,
.store-star-picker input:checked ~ label {
  color: var(--store-yellow);
}

.store-review-form {
  border-bottom: 1px solid var(--store-border);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.store-review-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.store-review-item {
  display: flex;
  gap: 14px;
}

.store-review-item .comment-author {
  color: var(--store-text);
}

.store-review-item .comment-time,
.store-review-item .comment-text {
  color: var(--store-muted);
}
