/* ============================================
   DECOREGUE - Cotizador (formulario + carrito "Cotizar")
   Se carga DESPUÉS de main.css
   ============================================ */

/* ── Placeholder de imágenes en carruseles ── */
.slide-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(160deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  color: var(--color-text-subtle);
  font-family: var(--font-condensed);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.slide-placeholder i {
  font-size: 2.2rem;
  color: var(--color-accent-dark);
}

.card-carousel-slide img {
  position: relative;
  z-index: 1;
}

/* ── Carrusel dentro del modal del producto ── */
.modal-image .modal-carousel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: pan-y; /* permite swipe horizontal sin bloquear el scroll vertical */
}

.modal-image .modal-carousel .card-carousel-slide img {
  object-fit: contain;
  object-position: center;
  background: var(--bg-secondary);
}

.modal-image .modal-carousel .carousel-nav {
  width: 40px;
  height: 40px;
  font-size: 0.9rem;
}

.modal-image .modal-carousel .carousel-nav.prev { left: 14px; }
.modal-image .modal-carousel .carousel-nav.next { right: 14px; }

.modal-image .modal-carousel .carousel-dots {
  right: 50%;
  transform: translateX(50%);
  bottom: 14px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 80%;
}

.modal-image .modal-carousel .carousel-counter {
  top: 14px;
  left: 14px;
}

/* ── Botones del modal ── */
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-actions .btn-metal,
.modal-actions .btn-whatsapp {
  width: 100%;
  justify-content: center;
}

/* ── Formulario de cotización (dentro del modal) ── */
.quote-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 20px;
  cursor: pointer;
  font-family: var(--font-condensed);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: var(--transition-base);
}

.quote-back:hover { color: var(--color-accent); }

.quote-title {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: 0.03em;
  margin-bottom: 24px;
}

.quote-hint {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.quote-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.quote-row[hidden] { display: none; }

.quote-mini-label {
  display: block;
  font-family: var(--font-condensed);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
  margin-bottom: 6px;
}

.quote-row .form-control-metal {
  padding: 12px 10px;
  font-size: 0.85rem;
}

.quote-row select.form-control-metal {
  padding-right: 26px;
  background-position: right 9px center;
}

/* Checkbox personalizado */
.quote-check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  cursor: pointer;
  font-family: var(--font-condensed);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  user-select: none;
}

.quote-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.quote-check-mark {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border: 1px solid var(--color-accent-dark);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
}

.quote-check-mark::after {
  content: '';
  width: 5px;
  height: 10px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  margin-top: -2px;
  transition: transform 0.2s ease;
}

.quote-check input:checked + .quote-check-mark {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.quote-check input:checked + .quote-check-mark::after {
  transform: rotate(45deg) scale(1);
}

.quote-check input:focus-visible + .quote-check-mark {
  outline: 2px solid var(--color-accent-light);
  outline-offset: 2px;
}

.quote-measures {
  border: 1px solid var(--color-border);
  background: rgba(255,255,255,0.015);
  padding: 18px 16px 4px;
  margin-bottom: 20px;
}

.quote-measures .quote-check { margin-bottom: 16px; }

.quote-add-note {
  font-family: var(--font-condensed);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--color-text-subtle);
  text-align: center;
  margin-top: 12px;
}

/* ── Botón flotante "Cotizar" ── */
.quote-fab {
  position: fixed;
  right: 32px;
  bottom: 92px;
  z-index: 850;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  background: var(--color-accent);
  color: #000;
  border: none;
  cursor: pointer;
  font-family: var(--font-condensed);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: var(--transition-base);
}

.quote-fab.visible {
  display: inline-flex;
  animation: fadeSlideUp 0.4s both;
}

.quote-fab:hover {
  background: var(--color-accent-light);
  transform: translateY(-3px);
}

.quote-fab-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: #000;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  letter-spacing: 0;
}

/* ── Panel lateral (carrito) ── */
.quote-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9400;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.quote-overlay.open {
  opacity: 1;
  visibility: visible;
}

.quote-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100%);
  background: var(--bg-card);
  border-left: 1px solid var(--color-border);
  z-index: 9500;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
}

.quote-drawer.open {
  transform: translateX(0);
  visibility: visible;
}

.quote-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--color-border);
  border-top: 3px solid var(--color-accent);
}

.quote-drawer-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.05em;
  line-height: 1;
}

.quote-drawer-title span { color: var(--color-accent); }

.quote-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
}

.quote-close:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.quote-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quote-empty {
  margin: auto;
  text-align: center;
  color: var(--color-text-muted);
}

.quote-empty i {
  font-size: 2.4rem;
  color: var(--color-accent-dark);
  margin-bottom: 16px;
}

.quote-empty p {
  font-family: var(--font-condensed);
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 6px;
}

.quote-empty span { font-size: 0.85rem; }

.quote-item {
  background: var(--bg-secondary);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  padding: 16px 18px;
}

.quote-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.quote-item-title {
  font-family: var(--font-condensed);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
  line-height: 1.25;
}

.quote-item-remove {
  background: none;
  border: none;
  color: var(--color-text-subtle);
  cursor: pointer;
  padding: 4px;
  font-size: 0.9rem;
  transition: var(--transition-base);
}

.quote-item-remove:hover { color: #e05a4f; }

.quote-item-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quote-item-lines li {
  font-size: 0.85rem;
  color: var(--color-text);
  line-height: 1.5;
}

.quote-item-lines li span {
  font-family: var(--font-condensed);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-right: 6px;
}

.quote-drawer-foot {
  padding: 20px 28px 24px;
  border-top: 1px solid var(--color-border);
  background: var(--bg-card);
}

.quote-drawer-foot .form-group { margin-bottom: 14px; }

.quote-drawer-foot .btn-whatsapp {
  width: 100%;
  justify-content: center;
  font-size: 0.95rem;
  padding: 16px;
}

.quote-drawer-foot .btn-whatsapp:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  background: #25D366;
}

.quote-error {
  font-family: var(--font-condensed);
  font-size: 0.75rem;
  color: #e05a4f;
  margin-top: 6px;
}

.quote-error[hidden] { display: none; }

.form-control-metal.is-invalid { border-color: #e05a4f; }

.quote-clear {
  display: block;
  margin: 14px auto 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-condensed);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
  transition: var(--transition-base);
}

.quote-clear:hover { color: var(--color-accent); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .quote-title { font-size: 1.6rem; }
  .quote-fab { right: 16px; bottom: 84px; padding: 12px 16px; }
  .quote-drawer-head,
  .quote-drawer-body,
  .quote-drawer-foot { padding-left: 20px; padding-right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .quote-drawer,
  .quote-overlay,
  .quote-fab.visible { transition: none; animation: none; }
}