:root {
  --gold: #cda349;
  --gold-dark: #a8822f;
  --gold-light: #e3c780;
  --black: #0d0d0d;
  --black-2: #161616;
  --white: #f5f5f5;
  --cream: #ece4d2;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--black);
  color: var(--white);
}

.gold-text { color: var(--gold) !important; }
.eyebrow { font-size: .8rem; letter-spacing: .15em; text-transform: uppercase; font-weight: 600; }
.section-title { font-family: 'Bebas Neue', sans-serif; font-size: 2.4rem; letter-spacing: .03em; }
.section-dark { background: var(--black); }
.section-light { background: var(--black-2); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1a1a1a;
  font-weight: 600;
  border: none;
}
.btn-gold:hover { background: var(--gold); color: #000; }

/* BRAND MARK (crown + wordmark, mirrors the shop logo) */
.brand-mark { display: flex; align-items: center; gap: .55rem; }
.brand-mark .brand-crown {
  color: var(--gold);
  filter: drop-shadow(0 0 6px rgba(205,163,73,0.35));
  transform: translateY(-1px);
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-word {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--cream);
  text-transform: uppercase;
}
.brand-sub-wrap { display: flex; align-items: center; gap: .35rem; margin-top: .2rem; }
.brand-sub {
  font-size: .55rem;
  letter-spacing: .3em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}
.brand-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); min-width: 10px; }
.brand-sub-wrap .brand-line:last-child { background: linear-gradient(90deg, var(--gold), transparent); }

.brand-mark-sm .brand-crown { font-size: 1.05rem; }
.brand-mark-sm .brand-word { font-size: 1.05rem; }
.brand-mark-sm .brand-sub-wrap { display: none; }

.brand-mark-md .brand-crown { font-size: 1.4rem; }
.brand-mark-md .brand-word { font-size: 1.4rem; }
.brand-mark-md .brand-sub { font-size: .6rem; }
.brand-mark-md .brand-line { min-width: 16px; }

.brand-mark-lg { flex-direction: column; align-items: center; gap: .35rem; }
.brand-mark-lg .brand-crown { font-size: 2.6rem; }
.brand-mark-lg .brand-word { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.brand-mark-lg .brand-sub { font-size: .85rem; }
.brand-mark-lg .brand-line { min-width: 28px; }
.brand-mark-lg .brand-text { align-items: center; text-align: center; }
.brand-logo-img { height: 38px; width: 38px; object-fit: cover; border-radius: 50%; border: 1px solid rgba(205,163,73,0.4); }
.hero-logo-img { max-height: 190px; }
.sidebar-logo-img { height: 32px; width: 32px; object-fit: cover; border-radius: 50%; border: 1px solid rgba(205,163,73,0.4); }

/* NAVBAR */
.site-navbar {
  background: rgba(13,13,13,0.85);
  backdrop-filter: blur(8px);
  transition: background .3s;
  border-bottom: 1px solid rgba(212,175,55,0.15);
}
.site-navbar .navbar-brand { font-weight: 700; letter-spacing: .04em; color: var(--white); display:flex; align-items:center; }
.site-navbar .nav-link { color: #ddd !important; font-weight: 500; }
.site-navbar .nav-link:hover { color: var(--gold) !important; }

/* HERO */
.hero {
  min-height: 92vh;
  background: var(--black);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
/* No shop photos uploaded yet: flat black backdrop. */
.hero.hero-has-art {
  background: var(--black);
}
/* One or more gallery photos: crossfading slideshow layers behind the overlay. */
.hero-slide {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.4s ease;
}
.hero-slide.active { opacity: 1; }

.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: repeating-linear-gradient(135deg, rgba(212,175,55,0.03) 0 2px, transparent 2px 40px);
}
.hero .container { position: relative; z-index: 2; }
/* When a real shop photo is set as backdrop, darken it so text stays readable. */
.hero.hero-has-photo .hero-overlay {
  background:
    linear-gradient(rgba(10,10,10,0.88), rgba(10,10,10,0.88)),
    repeating-linear-gradient(135deg, rgba(212,175,55,0.05) 0 2px, transparent 2px 40px);
}
@media (min-width: 992px) {
  .hero.hero-has-photo .hero-overlay {
    background:
      linear-gradient(90deg, rgba(10,10,10,0.94) 0%, rgba(10,10,10,0.82) 45%, rgba(10,10,10,0.45) 100%),
      repeating-linear-gradient(135deg, rgba(212,175,55,0.05) 0 2px, transparent 2px 40px);
  }
}
.hero-title { font-family: 'Bebas Neue', sans-serif; font-size: clamp(2.8rem, 6vw, 5rem); line-height: 1; }
.hero-subtitle { color: #ccc; font-size: 1.1rem; max-width: 560px; }

.about-image-wrap { display:flex; justify-content:center; }
.about-image {
  width: 260px; height: 260px; border-radius: 50%;
  background: linear-gradient(135deg, #1c1c1c, #0d0d0d);
  border: 2px solid var(--gold);
  display:flex; align-items:center; justify-content:center;
  font-size: 5rem; color: var(--gold);
  overflow: hidden;
}
.about-image-photo img { width: 100%; height: 100%; object-fit: cover; }

.service-card, .review-card {
  background: var(--black);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 14px;
  padding: 1.5rem;
  transition: transform .2s, border-color .2s;
}
.service-card:hover, .review-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.badge-gold {
  background: rgba(212,175,55,0.15); color: var(--gold);
  font-size: .7rem; padding: .25rem .6rem; border-radius: 20px; font-weight: 600;
}
.price-tag { color: var(--gold); font-weight: 700; font-size: 1.1rem; }

.barber-card { padding: 1rem; }
.barber-photo {
  width: 140px; height: 140px; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--gold); display:flex; align-items:center; justify-content:center;
  font-size: 3rem; color: var(--gold); background: #1c1c1c;
}
.barber-photo img { width:100%; height:100%; object-fit: cover; }

.gallery-item {
  aspect-ratio: 1/1; border-radius: 12px;
  background: linear-gradient(135deg, #1c1c1c, #0d0d0d);
  border: 1px solid rgba(212,175,55,0.15);
  display:flex; align-items:center; justify-content:center;
  color: var(--gold); font-size: 2rem;
  overflow: hidden;
}
.gallery-item-photo { padding: 0; }
.gallery-item-photo img, .gallery-item-photo video { width: 100%; height: 100%; object-fit: cover; }

.social-icon {
  width: 38px; height: 38px; border-radius: 50%;
  display:flex; align-items:center; justify-content:center;
  background: rgba(212,175,55,0.1); color: var(--gold);
  border: 1px solid rgba(212,175,55,0.3);
}
.social-icon:hover { background: var(--gold); color: #000; }
.footer-link { color: #ccc; text-decoration: none; }
.footer-link:hover { color: var(--gold); }

.site-footer { background: #0a0a0a; border-top: 1px solid rgba(212,175,55,0.15); }

.map-frame { border-radius: 14px; overflow: hidden; border: 1px solid rgba(212,175,55,0.2); }

.whatsapp-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; font-size: 1.7rem;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* BOOKING */
.booking-section { padding-top: 120px; padding-bottom: 60px; min-height: 100vh; }
.booking-card {
  background: var(--black-2); border: 1px solid rgba(212,175,55,0.2);
  border-radius: 18px; padding: 2rem;
}
.booking-steps { display:flex; justify-content:space-between; flex-wrap: wrap; gap: .5rem; }
.booking-steps .step {
  flex: 1; min-width: 90px; text-align:center; font-size: .75rem; color: #777; font-weight: 600;
}
.booking-steps .step span {
  display:block; width: 32px; height: 32px; line-height: 32px; border-radius: 50%;
  background: #1c1c1c; margin: 0 auto .35rem; color: #999; border: 1px solid #333;
}
.booking-steps .step.active { color: var(--gold); }
.booking-steps .step.active span { background: var(--gold); color: #000; border-color: var(--gold); }
.booking-steps .step.done span { background: rgba(212,175,55,0.3); color: var(--gold); border-color: var(--gold); }

.choice-card {
  background: #1c1c1c; border: 1px solid #333; border-radius: 12px; padding: 1rem;
  cursor: pointer; transition: all .15s;
}
.choice-card:hover { border-color: var(--gold); }
.choice-card.selected { border-color: var(--gold); background: rgba(212,175,55,0.1); }

/* INLINE CALENDAR (booking step: pick a date) */
.inline-calendar { background: #1c1c1c; border: 1px solid #333; border-radius: 12px; padding: 1rem; }
.cal-header { display:flex; align-items:center; justify-content:space-between; margin-bottom: .75rem; }
.cal-header strong { text-transform: capitalize; }
.cal-nav-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid #333; background: #161616;
  color: #ddd; display:flex; align-items:center; justify-content:center;
}
.cal-nav-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.cal-nav-btn:disabled { opacity: .3; cursor: not-allowed; }
.cal-weekdays { display:grid; grid-template-columns: repeat(7,1fr); text-align:center; font-size:.75rem; color:#777; margin-bottom:.35rem; }
.cal-grid { display:grid; grid-template-columns: repeat(7,1fr); gap: .35rem; }
.cal-day {
  aspect-ratio: 1/1; border-radius: 8px; border: 1px solid #333; background:#161616; color:#ddd;
  display:flex; align-items:center; justify-content:center; font-size:.85rem; cursor:pointer;
}
.cal-day:hover:not(.disabled):not(.empty) { border-color: var(--gold); }
.cal-day.empty { visibility: hidden; cursor: default; }
.cal-day.disabled { opacity: .25; cursor: not-allowed; text-decoration: line-through; }
.cal-day.today { border-color: rgba(212,175,55,0.5); }
.cal-day.selected { background: var(--gold); color:#000; border-color: var(--gold); font-weight:600; }

.time-slots { display:grid; grid-template-columns: repeat(auto-fill, minmax(90px,1fr)); gap: .6rem; }
.time-slot-btn {
  border: 1px solid #333; background: #1c1c1c; color: #ddd; border-radius: 8px; padding: .5rem; font-size: .9rem;
}
.time-slot-btn.unavailable { opacity: .3; text-decoration: line-through; cursor: not-allowed; }
.time-slot-btn.selected { background: var(--gold); color: #000; border-color: var(--gold); font-weight: 600; }

.summary-box { background: #1c1c1c; border: 1px solid rgba(212,175,55,0.2); border-radius: 10px; }

/* MEUS AGENDAMENTOS */
.status-badge { padding: .3rem .7rem; border-radius: 20px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.status-pending { background: rgba(234,179,8,0.15); color: #eab308; }
.status-confirmed { background: rgba(59,130,246,0.15); color: #3b82f6; }
.status-completed { background: rgba(34,197,94,0.15); color: #22c55e; }
.status-cancelled { background: rgba(239,68,68,0.15); color: #ef4444; }
.status-no_show { background: rgba(148,163,184,0.15); color: #94a3b8; }
.status-rescheduled { background: rgba(6,182,212,0.15); color: #06b6d4; }

.my-appt-card {
  background: #1c1c1c; border: 1px solid #333; border-radius: 12px;
  padding: 1rem; margin-bottom: .8rem;
}
.my-appt-card-past { opacity: .7; }
.my-appt-top { display:flex; align-items:center; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; font-weight: 600; }
.my-appt-top .status-badge { margin-left: auto; }
.my-appt-meta { display:flex; gap: 1.2rem; flex-wrap: wrap; font-size: .9rem; color: #ccc; }

.success-icon {
  width: 90px; height: 90px; border-radius: 50%; background: rgba(212,175,55,0.15);
  color: var(--gold); font-size: 2.5rem; display:flex; align-items:center; justify-content:center; margin: 0 auto;
  border: 2px solid var(--gold);
}

/* TOASTS */
.toast-msg {
  position: fixed; top: 90px; right: 20px; z-index: 2000;
  min-width: 260px; padding: .8rem 1.2rem; border-radius: 10px; color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35); animation: slideIn .3s ease, fadeOut .4s ease 4s forwards;
}
.toast-success { background: #1f7a3f; }
.toast-error { background: #a33636; }
@keyframes slideIn { from { transform: translateX(120%); opacity:0; } to { transform: translateX(0); opacity:1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(30px); } }

/* LOGIN */
.login-body { background: radial-gradient(circle at 50% 20%, #1c1c1c, #0a0a0a 70%); min-height: 100vh; display:flex; align-items:center; justify-content:center; }
.login-wrap { width: 100%; max-width: 400px; padding: 1rem; }
.login-card { background: var(--black-2); border: 1px solid rgba(212,175,55,0.2); border-radius: 16px; padding: 2.2rem; }

@media (max-width: 991px) {
  .booking-steps .step { font-size: .65rem; }
}

@media print {
  .site-navbar, .site-footer, .whatsapp-float, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  #printArea { border-color: #000; }
}
