:root {
  --bg-deep: #090a0f;
  --bg-surface: #12151e;
  --bg-card: #181c28;
  --bg-card-hover: #222738;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(229, 179, 101, 0.5);
  
  --accent-gold: #e5b365;
  --accent-gold-soft: rgba(229, 179, 101, 0.15);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-full: 9999px;
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding-bottom: 110px;
}

.layout-wrapper {
  width: 100%;
  max-width: 520px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.main-column {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.desktop-sidebar {
  display: none;
}

@media (min-width: 860px) {
  body {
    padding-bottom: 40px;
  }
  .layout-wrapper {
    max-width: 1040px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    padding: 32px 20px;
    align-items: start;
  }
  .desktop-sidebar {
    display: block;
    position: sticky;
    top: 24px;
  }
  .mobile-booking-dock {
    display: none !important;
  }
}

/* Header */
.barber-header {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.barber-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-wrapper {
  position: relative;
  width: 56px;
  height: 56px;
}

.barber-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
  border: 2px solid var(--accent-gold);
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  background: #23293a;
  border: 2px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent-gold);
}

.status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 13px;
  height: 13px;
  background-color: var(--success);
  border: 2px solid var(--bg-surface);
  border-radius: 50%;
}

.brand-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
}

.barber-meta h1 {
  font-size: 1.3rem;
  font-weight: 700;
}

.barber-role {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: #34d399;
  width: fit-content;
}

.pulse-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* Flow Cards */
.booking-flow {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.flow-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.step-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
  background: var(--accent-gold-soft);
  padding: 3px 7px;
  border-radius: 6px;
}

.step-label h2 {
  font-size: 1.05rem;
  font-weight: 600;
}

.step-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

/* Botón Calendario Completo */
.btn-picker-label {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--accent-gold);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
}

.hidden-date-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

/* Pestañas de Categorías en Cuadrícula 2x2 (Visible 100% en Móvil) */
.category-tabs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--accent-gold);
  color: var(--bg-deep);
  border-color: var(--accent-gold);
  font-weight: 700;
}

/* Servicios */
.services-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-card:hover {
  background: var(--bg-card-hover);
}

.service-card.selected {
  border-color: var(--accent-gold);
  background: rgba(229, 179, 101, 0.08);
}

.service-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.service-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.service-price {
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 1rem;
}

.service-duration {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.variants-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
}

.variant-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.variant-chip.active {
  background: var(--accent-gold);
  color: var(--bg-deep);
  font-weight: 700;
  border-color: var(--accent-gold);
}

/* Días */
.date-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 6px;
}

.date-scroll::-webkit-scrollbar {
  display: none;
}

.date-pill {
  flex: 0 0 70px;
  height: 76px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.date-pill.selected {
  border-color: var(--accent-gold);
  background: var(--accent-gold);
}

.date-pill.selected span {
  color: var(--bg-deep) !important;
  font-weight: 700;
}

.pill-day-name {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.pill-day-number {
  font-size: 1.25rem;
  font-weight: 700;
}

.pill-month {
  font-size: 0.68rem;
  color: var(--text-dim);
}

/* Horarios */
.slots-section {
  margin-top: 14px;
}

.slots-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: block;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.slot-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 9px 0;
  text-align: center;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.slot-btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.2);
}

.slot-btn.selected {
  border-color: var(--accent-gold);
  background: var(--accent-gold);
  color: var(--bg-deep);
}

.slot-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* =======================================================
   GALERÍA 3D COVERFLOW (PROPORCIÓN 4:5 RETRATO 1080x1350)
   ======================================================= */
.gallery-section {
  overflow: hidden;
  padding-bottom: 14px;
}

.gallery-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 10px;
}

.stage-3d {
  position: relative;
  width: 100%;
  height: 310px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y pinch-zoom;
  user-select: none;
  cursor: grab;
}

.stage-3d:active {
  cursor: grabbing;
}

.coverflow-3d {
  position: relative;
  width: 100%;
  height: 275px;
  perspective: 1000px;
  perspective-origin: 50% 50%;
}

.card-3d {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 275px;
  margin: -137.5px 0 0 -110px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: #141722;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.75);
  border: 1px solid var(--border-subtle);
  will-change: transform, opacity;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-3d.is-center {
  border-color: var(--accent-gold);
  box-shadow: 
    0 18px 40px rgba(0, 0, 0, 0.85),
    0 0 22px var(--accent-gold-soft);
}

.card-3d img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.gallery-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 6px;
  gap: 2px;
}

#captionCutName {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.caption-hint {
  font-size: 0.72rem;
  color: var(--accent-gold);
}

/* Modal Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 16px;
  backdrop-filter: blur(8px);
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  object-fit: contain;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
}

.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-desc {
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

@media (max-width: 640px) {
  .stage-3d { height: 260px; }
  .coverflow-3d { height: 225px; }
  .card-3d {
    width: 180px;
    height: 225px;
    margin: -112.5px 0 0 -90px;
  }
}

/* Inputs */
.inputs-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.field input {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
}

.field input:focus {
  border-color: var(--border-focus);
}

.phone-input {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.phone-input .prefix {
  padding-left: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.phone-input input {
  border: none;
  background: transparent;
  flex: 1;
}

/* Reviews con Flechas y Scroll Suave */
.reviews-card {
  overflow: hidden;
}

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.reviews-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.rating-badge {
  font-size: 0.74rem;
  color: var(--accent-gold);
  font-weight: 700;
  display: block;
}

.reviews-arrows {
  display: flex;
  gap: 6px;
}

.arrow-btn {
  width: 32px;
  height: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}

.arrow-btn:hover {
  background: var(--accent-gold);
  color: var(--bg-deep);
  border-color: var(--accent-gold);
}

.reviews-slider {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 6px;
}

.reviews-slider::-webkit-scrollbar {
  display: none;
}

.review-pill {
  flex: 0 0 260px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.source-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.source-tag.wa { background: rgba(37, 211, 102, 0.15); color: #25d366; }
.source-tag.fb { background: rgba(24, 119, 242, 0.15); color: #1877f2; }
.source-tag.gg { background: rgba(234, 67, 53, 0.15); color: #ea4335; }

.review-stars {
  font-size: 0.72rem;
  color: var(--accent-gold);
}

.review-pill p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.review-author {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: auto;
}

/* Sidebar Desktop */
.sidebar-sticky-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-sticky-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.sidebar-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.side-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}

.side-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
}

.side-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.side-total-row span:first-child {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.side-total-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.desktop-btn {
  width: 100%;
  padding: 14px;
  font-size: 0.95rem;
  justify-content: center;
}

/* Dock Móvil */
.mobile-booking-dock {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 520px;
  background: rgba(18, 21, 30, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.dock-summary {
  display: flex;
  flex-direction: column;
}

.dock-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.dock-service-name {
  font-size: 0.88rem;
  font-weight: 600;
}

.dock-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.btn-confirm {
  background: var(--accent-gold);
  color: var(--bg-deep);
  border: none;
  border-radius: var(--radius-md);
  padding: 11px 18px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s;
}

.btn-confirm:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Modal Confirmación */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 200;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.modal-badge-success {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}

.modal-box h3 {
  font-size: 1.2rem;
}

.modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.ticket {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  font-size: 0.82rem;
  margin-bottom: 18px;
}

.ticket-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.ticket-row strong {
  color: var(--text-main);
}

.ticket-row.total {
  border-top: 1px dashed var(--border-subtle);
  padding-top: 8px;
}

.ticket-row.total strong {
  color: var(--accent-gold);
  font-size: 0.95rem;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-whatsapp, .btn-secondary {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
}
