/* Ajuste visual imagen */
.object-fit-cover { object-fit: cover; }

/* Chip Bootstrap */
.btn-chip {
  --bs-btn-padding-y: .25rem;
  --bs-btn-padding-x: .60rem;
  --bs-btn-font-size: .80rem;
}

/* =========================
   MODAL DE IMAGEN
   ========================= */
.custom-img-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1060;
  animation: fadeIn 0.25s ease-in-out;
  cursor: zoom-out;
}

.custom-img-modal-dialog {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  animation: scaleIn 0.25s ease-out;
}

.modal-img {
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  border: 3px solid #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  object-fit: contain;
  cursor: default;
}

.close-btn {
  position: absolute;
  top: -40px;
  right: -40px;
  font-size: 2.5rem;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
  opacity: 0.8;
}

.close-btn:hover {
  transform: scale(1.15);
  opacity: 1;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0.8; }
  to   { transform: scale(1);    opacity: 1; }
}

@media (max-width: 768px) {
  .close-btn {
    top: -25px;
    right: -25px;
    font-size: 2rem;
  }
  .modal-img {
    max-width: 95vw;
    max-height: 85vh;
  }
}

/* =========================
   BOTÓN BACK-TO-TOP
   ========================= */
.back-to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 1050;
  width: clamp(40px, 2.8vw + 28px, 56px);
  height: clamp(40px, 2.8vw + 28px, 56px);
  border-radius: 999px;
  border: none;
  background: #0d6efd;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}
.back-to-top:hover { box-shadow: 0 10px 28px rgba(0,0,0,.25); }
.back-to-top:focus-visible { outline: 3px solid rgba(13,110,253,.45); outline-offset: 2px; }
.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; }
}

/* =========================
   FILTROS PANEL
   ========================= */
.filters-toggle { display: none; }

.filters-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .35s ease, opacity .25s ease;
  border-radius: .5rem;
}

.filters-toggle:checked ~ .filters-panel {
  max-height: 1000px;
  opacity: 1;
}

.filters-panel-header {
  padding: .75rem 1rem;
  background: #0d6efd;
  color: #fff;
  border-top-left-radius: .5rem;
  border-top-right-radius: .5rem;
  margin-bottom: .5rem;
}

.chips-scroll {
  max-height: 240px;
  overflow: auto;
  padding: .25rem;
  border-radius: .5rem;
  background: #fafafa;
  border: 1px dashed rgba(0,0,0,.06);
}

@media (max-width: 991.98px) {
  .filters-panel {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(0,0,0,.5);
    max-height: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    padding: 0;
  }
  .filters-toggle:checked ~ .filters-panel {
    opacity: 1;
    pointer-events: auto;
  }
  .filters-panel > .row {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    max-height: 80vh;
    overflow: auto;
    background: #fff;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 -8px 30px rgba(0,0,0,.25);
  }
  .filters-panel-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 1;
    border-radius: 0;
    margin: 0;
  }
  .filters-panel > .row {
    top: 48px;
  }
}

label[for="gemitaFiltersToggle"] { cursor: pointer; }
.chips-scroll::-webkit-scrollbar { height: 8px; width: 8px; }
.chips-scroll::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.2);
  border-radius: 8px;
}

/* =========================
   PRECIO / VARIANTES
   ========================= */
.price-pill-base {
  background: rgba(0, 0, 0, 0.06);
  color: #212529;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.price-pill-variante {
  background: linear-gradient(135deg, #8a2be2, #ff4fa3);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.price-pill {
  font-size: 0.95rem;
  min-width: 80px;
  text-align: right;
}

.variant-chip {
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #ffffff;
  padding: 4px 10px;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  white-space: nowrap;
}
.variant-chip:hover {
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}
.variant-chip-active {
  background: linear-gradient(135deg, #8a2be2, #ff4fa3);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(148, 27, 128, 0.4);
}
.variant-chip-title { font-weight: 600; }
.variant-chip-price { font-weight: 500; opacity: 0.9; }

/* =========================
   WHATSAPP BUTTON
   ========================= */
.btn-whatsapp {
  background-color: #25D366;
  border-color: #25D366;
  color: #fff;
}
.btn-whatsapp:hover,
.btn-whatsapp:focus {
  background-color: #1ebe5d;
  border-color: #1ebe5d;
  color: #fff;
}

/* =========================
   TAGS / EMOJI POPOVER
   ========================= */

/* ===== POPUP DE ETIQUETAS (EMOJIS) ===== */

/* ============================================================================
   POPUP DE ETIQUETAS — ESTILO MODERNO (BLANCO + SOMBRA + FLECHA)
   ============================================================================ */

.gemita-catalogo-root button.emoji-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: default;
  padding: 0;
}

.gemita-catalogo-root button.emoji-tag .emoji {
  font-size: 1.2rem;
}

/* Tooltip */
.gemita-catalogo-root button.emoji-tag > .emoji-popover {
  position: absolute !important;
  left: 50% !important;
  bottom: 120% !important;
  transform: translateX(-50%);
  background: #ffffff;
  color: #111827 !important;
  min-width: 180px;
  max-width: 230px;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  border: 1px solid #f3f4f6;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 99999;
}

/* Flecha del tooltip */
.gemita-catalogo-root button.emoji-tag > .emoji-popover::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: #ffffff;
  border-left: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
}

/* Mostrar tooltip */
.gemita-catalogo-root button.emoji-tag:hover > .emoji-popover {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

/* Título */
.gemita-catalogo-root .emoji-popover .popover-title {
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 1rem;
  color: #111827 !important;
}

/* Texto */
.gemita-catalogo-root .emoji-popover .popover-body {
  color: #374151 !important;
  font-size: 0.85rem;
}




/* =========================
   ERRORES
   ========================= */
.gemita-error {
  padding: .8rem 1rem;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 8px;
  border: 1px solid #fecaca;
  font-size: 0.9rem;
}

/* Grid (por si no hay Bootstrap) */
.gemita-catalogo-root .row { margin-left: -0.5rem; margin-right: -0.5rem; }
.gemita-catalogo-root .col { padding-left: 0.5rem; padding-right: 0.5rem; }


/* Chips de flores */
.gemita-catalogo-root .gemita-flor-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  color: #333;
  font-size: 0.78rem;
  line-height: 1.1;
  white-space: nowrap;
}

.gemita-catalogo-root .gemita-flor-chip .ms-1 {
  font-weight: 600;
}


.gemita-season-label {
  text-transform: uppercase;
  letter-spacing: .03em;
}


/* ===== Modal de selección de fecha Gemita ===== */
.gemita-fecha-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1050;
}

.gemita-fecha-modal-backdrop.is-open {
  display: flex;
}

.gemita-fecha-modal {
  max-width: 520px;
  width: 90%;
  background: #ffffff;
  border-radius: 18px;
  padding: 2.5rem 2.25rem 2rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}

.gemita-fecha-modal-icon {
  font-size: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.gemita-fecha-modal-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 .5rem;
}

.gemita-fecha-modal-subtitle {
  margin: 0;
  color: #555;
  font-size: 0.95rem;
}

.gemita-fecha-modal-input {
  width: 100%;
  border-radius: 999px;
  border: 2px solid #d0e4ff;
  padding: .6rem 1rem;
  font-size: 1rem;
  outline: none;
}

.gemita-fecha-modal-input:focus {
  border-color: #3483fa;
  box-shadow: 0 0 0 2px rgba(52, 131, 250, 0.25);
}

.gemita-fecha-modal-btn {
  margin-top: 1.5rem;
  width: 100%;
  border-radius: 999px;
  padding: .6rem 1rem;
  font-weight: 600;
}

/* bloquear scroll cuando el modal está abierto */
body.gemita-modal-open {
  overflow: hidden;
}


/* Chips de etiquetas (mismo estilo que las flores) */
.gemita-catalogo-root .gemita-etiqueta-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  color: #333;
  font-size: 0.78rem;
  line-height: 1.1;
  white-space: nowrap;
  font-weight: 600; /* un poquito más marcadas que las flores */
}

