/**
 * Galería de Servicios - Estilos para el cotizador mejorado
 * Diseño: Carrusel horizontal con detalle expandible
 */

/* ============================================
   TOTAL INLINE EN BARRA DE ACCIONES
   ============================================ */
.cotz-total-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  flex-shrink: 0;
}

.cotz-total-inline__label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}

.cotz-total-inline__amount {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.cotz-total-inline__note {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  font-style: italic;
}

@media (max-width: 400px) {
  .cotz-total-inline {
    padding: 4px 8px;
  }
  .cotz-total-inline__label {
    display: none; /* Solo mostrar monto en pantallas muy pequeñas */
  }
  .cotz-total-inline__amount {
    font-size: 0.9rem;
  }
  .cotz-total-inline__note {
    display: none;
  }
}

/* ============================================
   BARRA FLOTANTE DE TOTAL (LEGACY - oculta)
   ============================================ */
.quote-total-bar {
  display: none !important; /* Ya no usamos esta barra, el total va inline */
}

/* ============================================
   FILTROS POR CATEGORÍA (CHIPS)
   ============================================ */
.svc-category-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 4px 0;
}

.svc-category-chip {
  padding: 8px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.svc-category-chip:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.25);
}

.svc-category-chip.is-active {
  background: var(--bugambilia, #e85c9e);
  border-color: var(--bugambilia, #e85c9e);
  color: #fff;
  font-weight: 600;
}

.svc-category-chip .chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  font-size: 0.7rem;
  margin-left: 6px;
  padding: 0 6px;
}

/* ============================================
   NAVEGADOR DE CATEGORÍAS (POR PASOS)
   ============================================ */
.svc-category-nav {
  margin-bottom: 12px;
  padding: 12px 16px;
  background: transparent;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.svc-category-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.svc-category-nav__btn {
  padding: 8px 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: rgba(255,255,255,0.9);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  width: 130px;
  flex-shrink: 0;
  text-align: center;
}

.svc-category-nav__btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
}

.svc-category-nav__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.svc-category-nav__btn.is-finish {
  background: var(--bugambilia, #e85c9e);
  border-color: var(--bugambilia, #e85c9e);
  color: #fff;
  animation: pulse-finish 2s infinite;
}

@keyframes pulse-finish {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 92, 158, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(232, 92, 158, 0); }
}

.svc-category-nav__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  min-width: 0;
}

.svc-category-nav__step {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.svc-category-nav__title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.svc-category-nav__count {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
}

.svc-category-nav__progress {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.svc-category-nav__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: all .3s;
  cursor: pointer;
}

.svc-category-nav__dot.is-visited {
  background: rgba(255,255,255,0.5);
}

.svc-category-nav__dot.is-active {
  background: var(--bugambilia, #e85c9e);
  transform: scale(1.3);
  box-shadow: 0 0 0 2px rgba(232, 92, 158, 0.3);
}

/* Botón skip - ahora fuera del nav, después de galería */
.svc-category-nav__skip {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.25);
  border-radius: 10px;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}

.svc-category-nav__skip:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--bugambilia, #e85c9e);
  color: rgba(255,255,255,0.9);
}

/* Responsive */
@media (max-width: 480px) {
  .svc-category-nav {
    padding: 10px 12px;
  }
  
  .svc-category-nav__header {
    gap: 6px;
  }
  
  .svc-category-nav__btn {
    width: 90px;
    padding: 6px 8px;
    font-size: 0.7rem;
  }
  
  .svc-category-nav__title {
    font-size: 0.9rem;
  }
  
  .svc-category-nav__skip {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
}

/* ============================================
   GALERÍA DE SERVICIOS (COVER FLOW POR CATEGORÍA)
   ============================================ */

/* Contenedor de categoría */
.svc-category-section {
  margin-bottom: 24px;
}

.svc-category-section__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  margin-bottom: 12px;
  padding-left: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.svc-category-section__count {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  font-weight: 400;
}

/* Wrapper del coverflow */
.svc-coverflow-wrapper {
  position: relative;
  height: 300px;
  perspective: 1200px;
  overflow: hidden;
}

@media (min-width: 500px) {
  .svc-coverflow-wrapper {
    height: 360px;
  }
}

@media (min-width: 768px) {
  .svc-coverflow-wrapper {
    height: 420px;
  }
}

/* Track del coverflow */
.svc-coverflow {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  gap: 16px;
  padding: 0 calc(50% - 110px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.svc-coverflow::-webkit-scrollbar {
  display: none;
}

/* Tarjeta del coverflow */
.svc-coverflow-item {
  position: relative;
  flex: 0 0 220px;
  height: 280px;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(135deg, #0d5a31 0%, #084422 100%);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  scroll-snap-align: center;
  transform-style: preserve-3d;
  transform: scale(0.7) rotateY(30deg);
  opacity: 0.5;
  filter: brightness(0.6);
}

@media (min-width: 500px) {
  .svc-coverflow-item {
    flex: 0 0 260px;
    height: 340px;
  }
}

@media (min-width: 768px) {
  .svc-coverflow-item {
    flex: 0 0 300px;
    height: 380px;
  }
}

/* Item oculto por filtro */
.svc-coverflow-item.is-hidden {
  display: none !important;
}

/* Item activo (centrado) */
.svc-coverflow-item.is-active {
  transform: scale(1) rotateY(0deg) translateZ(80px);
  opacity: 1;
  filter: brightness(1);
  z-index: 10;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 0 3px rgba(255,255,255,0.15);
}

/* Items a la izquierda del activo */
.svc-coverflow-item.is-prev {
  transform: scale(0.75) rotateY(35deg) translateX(30px) translateZ(-20px);
  opacity: 0.8;
  filter: brightness(0.75);
  z-index: 5;
}

.svc-coverflow-item.is-prev-2 {
  transform: scale(0.6) rotateY(45deg) translateX(50px) translateZ(-40px);
  opacity: 0.5;
  filter: brightness(0.55);
  z-index: 2;
}

/* Items a la derecha del activo */
.svc-coverflow-item.is-next {
  transform: scale(0.75) rotateY(-35deg) translateX(-30px) translateZ(-20px);
  opacity: 0.8;
  filter: brightness(0.75);
  z-index: 5;
}

.svc-coverflow-item.is-next-2 {
  transform: scale(0.6) rotateY(-45deg) translateX(-50px) translateZ(-40px);
  opacity: 0.5;
  filter: brightness(0.55);
  z-index: 2;
}

/* Item seleccionado */
.svc-coverflow-item.is-selected {
  box-shadow: 0 0 0 4px var(--bugambilia, #e85c9e), 0 16px 48px rgba(232,92,158,0.4);
}

/* Imagen */
.svc-coverflow-item__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder */
.svc-coverflow-item__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255,255,255,0.25);
}

/* Gradiente y título */
.svc-coverflow-item__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 50px 14px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 40%, transparent 100%);
}

.svc-coverflow-item__title {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  word-wrap: break-word;
  hyphens: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.svc-coverflow-item__price {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.svc-coverflow-item__price-note {
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(255,255,255,0.65);
}

/* Input oculto */
.svc-coverflow-item input[type="checkbox"] {
  display: none;
}

/* Botón de selección visible */
.svc-select-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  border: 2px solid rgba(255,255,255,0.9);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.svc-select-btn:hover {
  background: rgba(0,0,0,0.6);
  transform: scale(1.1);
}

.svc-select-btn:active {
  transform: scale(0.9);
}

.svc-select-btn.is-added {
  background: var(--bugambilia, #e85c9e);
  border-color: #fff;
  box-shadow: 0 2px 8px rgba(232,92,158,0.5);
}

.svc-select-btn.is-added:hover {
  background: #d14d8a;
}

.svc-select-btn__icon {
  line-height: 1;
}

/* Navegación (flechas) */
.svc-coverflow-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: all .2s;
  backdrop-filter: blur(4px);
}

.svc-coverflow-nav:hover {
  background: rgba(0,0,0,0.8);
  transform: translateY(-50%) scale(1.1);
}

.svc-coverflow-nav--prev { left: 8px; }
.svc-coverflow-nav--next { right: 8px; }

@media (max-width: 500px) {
  .svc-coverflow-nav {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
}

/* ============================================
   OVERLAY DE DETALLE (EXPANSIÓN)
   ============================================ */
.svc-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 500000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
  backdrop-filter: blur(8px);
}

.svc-detail-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.svc-detail-modal {
  position: relative;
  width: 90%;
  max-width: 420px;
  max-height: 90vh;
  background: linear-gradient(180deg, #145d33 0%, #0d4a28 100%);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: scale(0.9) translateY(20px);
  transition: transform .4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.svc-detail-overlay.is-active .svc-detail-modal {
  transform: scale(1) translateY(0);
}

/* Imagen principal */
.svc-detail__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.svc-detail__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Navegación del carrusel */
.svc-detail__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  backdrop-filter: blur(4px);
}

.svc-detail__nav:hover {
  background: rgba(0,0,0,0.7);
  transform: translateY(-50%) scale(1.1);
}

.svc-detail__nav--prev { left: 12px; }
.svc-detail__nav--next { right: 12px; }

/* Indicadores de imagen */
.svc-detail__dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0,0,0,0.4);
  border-radius: 16px;
  backdrop-filter: blur(4px);
}

.svc-detail__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all .2s;
}

.svc-detail__dot.is-active {
  background: #fff;
  transform: scale(1.2);
}

/* Botón de cerrar */
.svc-detail__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all .2s;
  backdrop-filter: blur(4px);
}

.svc-detail__close:hover {
  background: rgba(0,0,0,0.7);
  transform: scale(1.1);
}

/* Contenido del detalle */
.svc-detail__content {
  padding: 20px;
  color: #fff;
  overflow-y: auto;
  flex: 1;
  max-height: calc(90vh - 280px); /* Restar altura de imagen */
}

.svc-detail__category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 6px;
}

.svc-detail__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}

.svc-detail__provider {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 12px;
}

.svc-detail__desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
  margin-bottom: 16px;
}

.svc-detail__price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.svc-detail__price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.svc-detail__price-note {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

.svc-detail__add-btn {
  background: var(--bugambilia, #e85c9e);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.svc-detail__add-btn:hover {
  background: #d94d8d;
  transform: scale(1.03);
}

.svc-detail__add-btn.is-added {
  background: #1f8a4c;
}

/* Opciones adicionales (tiempos banquete, horas, etc) */
.svc-detail__options {
  margin-top: 16px;
  padding: 16px;
  background: rgba(0,0,0,0.2);
  border-radius: 12px;
  max-height: 200px;
  overflow-y: auto;
}

.svc-detail__options-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 10px;
}

/* Opciones de servicio */
.svc-option {
  margin-bottom: 14px;
}

.svc-option:last-child {
  margin-bottom: 0;
}

.svc-option__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.svc-option__control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.svc-option__select {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all .2s;
}

.svc-option__select:focus {
  outline: none;
  border-color: var(--bugambilia, #e85c9e);
  background: rgba(255,255,255,0.15);
}

.svc-option__select option {
  background: #145d33;
  color: #fff;
}

.svc-option__input {
  width: 80px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
}

.svc-option__input:focus {
  outline: none;
  border-color: var(--bugambilia, #e85c9e);
  background: rgba(255,255,255,0.15);
}

.svc-option__unit {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

.svc-option--menu .svc-option__select {
  font-size: 0.85rem;
}

/* Tiempos de banquete (checkboxes) */
.svc-tiempos-nota {
  font-size: 0.8rem;
  color: #f59e0b;
  font-style: italic;
  margin: 0 0 12px 0;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 8px;
  border-left: 3px solid #f59e0b;
}
.svc-tiempos-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.svc-tiempo-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
}

.svc-tiempo-check:hover {
  background: rgba(255,255,255,0.12);
}

.svc-tiempo-check input[type="checkbox"] {
  display: none;
}

.svc-tiempo-check__box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.4);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}

.svc-tiempo-check__box::after {
  content: '✓';
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  transform: scale(0);
  transition: all .2s;
}

.svc-tiempo-check input:checked + .svc-tiempo-check__box {
  background: var(--bugambilia, #e85c9e);
  border-color: var(--bugambilia, #e85c9e);
}

.svc-tiempo-check input:checked + .svc-tiempo-check__box::after {
  opacity: 1;
  transform: scale(1);
}

.svc-tiempo-check__label {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
}

.svc-tiempo-check__price {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}

.svc-tiempo-check input:checked ~ .svc-tiempo-check__price {
  color: var(--bugambilia, #e85c9e);
}

/* Swipe hint */
.svc-detail__swipe-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.svc-gallery-item {
  animation: fadeInUp .4s ease backwards;
}

.svc-gallery-item:nth-child(1) { animation-delay: 0.05s; }
.svc-gallery-item:nth-child(2) { animation-delay: 0.1s; }
.svc-gallery-item:nth-child(3) { animation-delay: 0.15s; }
.svc-gallery-item:nth-child(4) { animation-delay: 0.2s; }
.svc-gallery-item:nth-child(5) { animation-delay: 0.25s; }
.svc-gallery-item:nth-child(6) { animation-delay: 0.3s; }
