/* ============================================================
   Vero Gusto — Popup Add-ons
   ============================================================ */

/* Overlay */
.vga-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.vga-overlay.vga-open {
  display: flex;
}

/* Popup */
.vga-popup {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: vgaSlideIn 0.25s ease;
}

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

/* ── Header blanc ──────────────────────────────────────────── */
.vga-popup__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
.vga-popup__title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #1a1a1a;
  margin: 0;
}
.vga-popup__close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #555;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.vga-popup__close:hover {
  background: #f5f5f5;
  color: #1a1a1a;
}

/* Body */
.vga-popup__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Image */
.vga-popup__image-wrap {
  text-align: center;
  margin-bottom: 14px;
}
.vga-popup__image {
  max-height: 180px;
  object-fit: contain;
  border-radius: 8px;
}

/* Description */
.vga-popup__description {
  font-size: 13px;
  color: #888;
  text-align: center;
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Prix de base */
.vga-popup__price-base {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #eb0029;
  margin-bottom: 20px;
}

/* ── Add-ons ─────────────────────────────────────────────── */
.vga-addon-group {
  margin-bottom: 18px;
}

/* Titre de groupe : fond beige */
.vga-addon-group__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: #1a1a1a;
  background: #fdf3e3;
  padding: 10px 14px;
  border-radius: 0;
  margin-bottom: 2px;
}

/* Liste 1 colonne */
.vga-addon-group__items {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Item add-on */
.vga-addon-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: default;
  transition: background 0.15s;
  border-bottom: 1px solid #f5f5f5;
}
.vga-addon-item:last-child {
  border-bottom: none;
}
.vga-addon-item:hover {
  background: #fafafa;
}

/* Partie gauche : icône + nom */
.vga-addon-item__left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

/* Icône ronde */
.vga-addon-item__icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #f0f0f0;
}
.vga-addon-item__icon-placeholder {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f0f0f0;
  flex-shrink: 0;
}

.vga-addon-item__name {
  font-size: 15px;
  color: #1a1a1a;
}

/* Partie droite : prix + compteur */
.vga-addon-item__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.vga-addon-item__price {
  font-size: 14px;
  font-weight: 500;
  color: #888;
  white-space: nowrap;
}

/* Bouton + initial (gris, cercle) */
.vga-addon-qty__only-add {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #ddd;
  background: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.vga-addon-qty__only-add:hover {
  border-color: #f5a623;
  color: #f5a623;
}

/* Compteur actif (orange) */
.vga-addon-item__qty-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vga-addon-qty__btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f5a623;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.vga-addon-qty__btn:hover {
  opacity: 0.85;
}

.vga-addon-qty__value {
  font-size: 16px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  color: #1a1a1a;
}

/* Loader */
.vga-popup__loader {
  display: none;
  text-align: center;
  padding: 30px;
}
.vga-popup__loader.active {
  display: block;
}
.vga-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid #f0f0f0;
  border-top-color: #eb0029;
  border-radius: 50%;
  animation: vgaSpin 0.7s linear infinite;
}
@keyframes vgaSpin {
  to { transform: rotate(360deg); }
}

/* ── Footer ─────────────────────────────────────────────── */
.vga-popup__footer {
  padding: 16px 20px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}

/* Quantité produit — centrée */
.vga-popup__qty-total {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

/* Total séparé masqué — affiché uniquement sur le bouton */
.vga-popup__total {
  display: none;
}

.vga-popup__qty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.vga-qty__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
  background: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
  transition: border-color 0.15s, background 0.15s;
  line-height: 1;
}
.vga-qty__btn:hover {
  border-color: #eb0029;
  color: #eb0029;
}
.vga-qty__value {
  font-size: 18px;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

/* ── Boutons actions ────────────────────────────────────── */
.vga-popup__actions {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.vga-popup__actions .theme-btn,
.vga-popup__actions .theme-btn-2 {
  flex: 1;
  font-size: 13px !important;
  padding: 12px 16px !important;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 0 !important;
  cursor: pointer;
  border: none;
}

button#vga-btn-add{
    text-transform: lowercase;

}


button#vga-btn-add::first-letter{
      text-transform: uppercase ;

}

.vga-popup__actions .theme-btn:disabled,
.vga-popup__actions .theme-btn-2:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Succès ─────────────────────────────────────────────── */
.vga-popup__success {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 20px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}

.vga-success__message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: #2e7d32;
}

.vga-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #2e7d32;
  color: #fff;
  border-radius: 50%;
  font-size: 15px;
  flex-shrink: 0;
}

.vga-success__actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
  justify-content: center;
}

.vga-success__actions .theme-btn,
.vga-success__actions .theme-btn-2 {
  flex: 1;
  text-align: center;
  justify-content: center;
  border-radius: 0 !important;
  padding: 10px 20px !important;
  font-size: 13px !important;
  min-height: auto !important;
  height: auto !important;
}

/* ── Variations ─────────────────────────────────────────── */
.vga-popup__variations {
  margin-bottom: 18px;
}
.vga-variations__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}
.vga-variation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid #eee;
  transition: border-color 0.15s, background 0.15s;
}
.vga-variation-item:hover {
  border-color: #eb0029;
  background: #fff5f5;
}
.vga-variation-item.selected {
  border-color: #eb0029;
  background: #fff5f5;
}
.vga-variation-item.selected .vga-checkbox {
  border-color: #eb0029;
  background: #eb0029;
}
.vga-variation-item.selected .vga-checkbox::after {
  opacity: 1;
}

/* Checkbox custom (variations + any-attributes) */
.vga-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}
.vga-checkbox::after {
  content: "";
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0;
  transition: opacity 0.15s;
}

/* ── Any-attr items (Fromage, etc.) : cliquables avec feedback checkbox ── */
.vga-any-attr-item {
  cursor: pointer !important;
}
.vga-any-attr-item:hover {
  background: #faf5f5;
}
.vga-any-attr-item.selected {
  background: #fff5f5;
}
.vga-any-attr-item.selected .vga-checkbox {
  border-color: #eb0029;
  background: #eb0029;
}
.vga-any-attr-item.selected .vga-checkbox::after {
  opacity: 1;
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .vga-variations__list { grid-template-columns: 1fr; }
  .vga-success__actions { flex-direction: column; }
}

@media (max-width: 480px) {
  .vga-popup {
    border-radius: 14px 14px 0 0;
    max-height: 95vh;
  }
  .vga-overlay {
    align-items: flex-end;
    padding: 0;
  }
}

#vga-overlay {
  z-index: 9999999 !important;
}

.page-main-content h3 {
  font-size: 18px !important;
}

/* ── Carousel ────────────────────────────────────────────── */
.vga-carousel {
  position: relative;
  margin-bottom: 14px;
  border-radius: 8px;
}

.vga-carousel__track-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  height: 180px;
  display: flex;
}

.vga-carousel__track {
  display: flex;
  transition: transform 0.3s ease;
  width: 100%;
  height: 180px;
  flex-shrink: 0;
}
.vga-carousel__slide {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.vga-carousel__slide img {
  max-height: 160px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 6px;
}

/* Flèches — masquées si une seule image */
.vga-carousel__btn {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.92);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: background 0.2s;
  z-index: 2;
  align-items: center;
  justify-content: center;
}
.vga-carousel--multi .vga-carousel__btn {
  display: flex;
}
.vga-carousel__btn:hover {
  background: #fff;
}
.vga-carousel__btn--prev { left: 8px; }
.vga-carousel__btn--next { right: 8px; }

/* Dots — masqués si une seule image */
.vga-carousel__dots {
  display: none;
  justify-content: center;
  gap: 6px;
  padding: 6px 0 4px;
}
.vga-carousel--multi .vga-carousel__dots {
  display: flex;
}

.vga-carousel__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ddd;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.vga-carousel__dot.active {
  background: #eb0029;
}