/* ============================================================
   assets/css/shop.css — Nissi Vision Center
   Styles spécifiques à la page Boutique (shop.php).
   ============================================================ */

/* ── CARTES PRODUIT ── */
.product-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 24px;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
}
.product-card:hover {
  background: rgba(255,255,255,0.13);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}
.product-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,168,75,0.35);
}

.product-img-wrap {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  margin-bottom: 16px;
}
.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s;
}
.product-card:hover .product-img-wrap img { transform: scale(1.08); }

/* ── BENTO GRID (section services) ── */
.bento-card {
  border-radius: 20px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.bento-card:hover { transform: translateY(-5px); box-shadow: 0 20px 48px rgba(26,47,110,0.12); }

.bento-card .ghost-icon {
  position: absolute;
  bottom: -16px; right: -16px;
  font-size: 96px;
  opacity: 0.04;
  transition: opacity 0.3s;
  pointer-events: none;
}
.bento-card:hover .ghost-icon { opacity: 0.08; }

/* ── SERVICE MAIN CARD ── */
.service-main-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 24px;
  overflow: hidden;
}
.service-main-card .img-col {
  min-height: 280px;
  background-size: cover;
  background-position: center;
}

/* ══════════════════════════════════════════════════════════════
   VIRTUAL TRY-ON — Studio plein écran
   Le studio occupe toute la hauteur visible sous le header.
   Le header sticky mesure ~64px ; on utilise la variable CSS
   --vto-header-offset pour être robuste.
   ══════════════════════════════════════════════════════════════ */

/* ── Section racine ── */
#vto-section {
  --vto-header-h: 56px;        /* hauteur du bandeau interne de la section */
  --vto-sidebar-w: 240px;      /* largeur sidebar desktop */
  --vto-gap: 0px;
  --ctrl-gap: 12px;            /* marge des contrôles flottants */

  display: flex;
  flex-direction: column;
  /* hauteur = viewport - header principal du site (~68px) */
  height: calc(100dvh - 68px);
  background: linear-gradient(145deg, var(--blue-deep) 0%, #1e3a8a 100%);
  color: #fff;
  overflow: hidden;            /* rien ne déborde */
}

/* ── Bandeau header interne (statut + bouton import) ── */
#vto-header {
  flex: 0 0 var(--vto-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(8px);
  gap: 12px;
  min-height: var(--vto-header-h);
}

#vto-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.vto-section-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

#vto-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#vto-selected-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(200,168,75,0.18);
  border: 1px solid rgba(200,168,75,0.4);
  color: #f0d078;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Bouton importer photo */
#vto-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.14);
  border: 1.5px dashed rgba(255,255,255,0.35);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
#vto-upload-btn:hover {
  background: rgba(255,255,255,0.24);
  border-color: rgba(255,255,255,0.6);
}
.vto-upload-label-text { /* masqué sur très petit écran */ }

/* ── Corps du studio (canvas + sidebar) ── */
#vto-studio {
  flex: 1 1 0;           /* prend tout l'espace restant sous le header interne */
  display: flex;
  overflow: hidden;
}

/* ── Colonne canvas ── */
#vto-canvas-col {
  flex: 1 1 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0d1525;
}

/* Wrapper du canvas : positionné pour contenir les overlays */
#vto-canvas-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Le canvas lui-même remplit tout l'espace dispo */
#vto-canvas {
  display: block;
  /* Les dimensions sont gérées par JS (resizeCanvas) */
  max-width: 100%;
  max-height: 100%;
  cursor: grab;
  border-radius: 0;
  background: transparent;
}
#vto-canvas:active { cursor: grabbing; }

/* ── Contrôles flottants superposés sur le canvas ── */
.vto-overlay-controls {
  position: absolute;
  bottom: var(--ctrl-gap);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(10,20,50,0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 6px 8px;
  z-index: 10;
}
.vto-ctrl-left  { left: var(--ctrl-gap); }
.vto-ctrl-right { right: var(--ctrl-gap); }

.vto-ctrl-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.18);
  margin: 0 2px;
}

/* Boutons dans les overlays */
.vto-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 9px;
  padding: 7px 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
  line-height: 1;
}
.vto-btn .material-symbols-outlined { font-size: 18px; }
.vto-btn:hover  { background: rgba(255,255,255,0.22); transform: scale(1.08); }
.vto-btn:active { transform: scale(0.96); }

.vto-btn-reset {
  background: rgba(200,168,75,0.2);
  border-color: rgba(200,168,75,0.4);
}
.vto-btn-reset:hover { background: rgba(200,168,75,0.38); }
.vto-reset-label { font-size: 12px; font-weight: 700; }

/* ── Sidebar ── */
#vto-sidebar {
  flex: 0 0 var(--vto-sidebar-w);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 14px;
  overflow-y: auto;
  background: rgba(0,0,0,0.22);
  border-left: 1px solid rgba(255,255,255,0.08);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.vto-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 14px;
}
.vto-card-gold {
  background: rgba(200,168,75,0.1);
  border-color: rgba(200,168,75,0.25);
}
.vto-card-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.vto-card-title .material-symbols-outlined { font-size: 16px; }
.vto-card-text {
  font-size: 11.5px;
  color: rgba(255,255,255,0.6);
  line-height: 1.65;
  margin: 0;
}

.vto-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.vto-steps li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  color: rgba(255,255,255,0.65);
  line-height: 1.45;
}
.vto-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
  color: #fff;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

/* Tablette (< 900px) : sidebar en bas, hauteur réduite */
@media (max-width: 900px) {
  #vto-section {
    height: auto;           /* on abandonne le full-screen, sidebar en bas */
  }
  #vto-studio {
    flex-direction: column;
  }
  #vto-sidebar {
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: wrap;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 12px;
    gap: 10px;
    overflow-y: visible;
  }
  .vto-card { flex: 1 1 200px; }
  #vto-canvas-col {
    min-height: 55vw;      /* canvas visible sans scroll */
  }
}

/* Mobile (< 600px) */
@media (max-width: 600px) {
  #vto-section {
    --vto-header-h: 48px;
  }
  #vto-header {
    padding: 0 12px;
    gap: 8px;
  }
  .vto-upload-label-text { display: none; }  /* icône seule sur mobile */
  #vto-upload-btn { padding: 8px 10px; }
  .vto-section-pill { display: none; }       /* pill masqué pour gagner de la place */
  #vto-canvas-col { min-height: 72vw; }
  .vto-overlay-controls { padding: 5px 6px; gap: 4px; }
  .vto-btn { padding: 6px 7px; }
  .vto-btn .material-symbols-outlined { font-size: 17px; }
  .vto-reset-label { display: none; }
  #vto-sidebar { flex-direction: column; }
  .vto-card { flex: 1 1 100%; }
}