/* CSS Variables */
:root {
  --bg-dark: #0a0a0a;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --bg-alt: #0f0f0f;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --accent: #d4a853;
  --accent-hover: #e6bc6a;
  --accent-dark: #b8923f;
  --border: #2a2a2a;
  --success: #22c55e;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --transition: 0.2s ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-decoration: none;
}

.navbar-brand .brand-separator {
  color: var(--accent);
  margin: 0 4px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color var(--transition);
}

.nav-link:hover {
  color: var(--accent);
}

.nav-cta {
  margin-left: 8px;
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.navbar-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 20px 24px;
  gap: 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.mobile-menu.active {
  display: flex;
}

/* Hero Section */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #151515 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  padding-top: 70px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212, 168, 83, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero-title .title-amp {
  color: var(--accent);
  font-weight: 400;
  margin: 0 8px;
}

.hero-tagline {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-weight: 400;
}

/* Hero Shop Status Cards */
.hero-shops {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-shop {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  cursor: pointer;
  transition: all var(--transition);
  min-width: 200px;
}

.hero-shop:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.hero-shop-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.hero-shop-status {
  font-size: 0.8125rem;
  font-weight: 500;
}

.hero-shop-status.open {
  color: var(--success);
}

.hero-shop-status.closed {
  color: var(--text-muted);
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-dark);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 168, 83, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-small {
  padding: 10px 20px;
  font-size: 0.875rem;
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 48px;
  font-size: 1rem;
}

/* Shop Cards - New Design */
.shop-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.shop-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.shop-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.shop-header {
  display: flex;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.shop-logo-container {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.shop-logo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-header-info {
  flex: 1;
  min-width: 0;
}

.shop-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.shop-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.shop-status-badge.open {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.shop-status-badge.closed {
  background: rgba(102, 102, 102, 0.15);
  color: var(--text-muted);
}

.shop-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.shop-rating .stars {
  color: var(--accent);
  font-size: 0.875rem;
}

.shop-rating .count {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.shop-address {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

.shop-content {
  padding: 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.shop-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.shop-contact a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.shop-contact a:hover {
  text-decoration: underline;
}

.shop-hours {
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}

.shop-hours-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.shop-hours-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.hour-day {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.hour-time {
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.hour-day.closed, .hour-time.closed {
  color: var(--text-muted);
  opacity: 0.5;
}

.shop-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.shop-actions .btn {
  flex: 1;
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab {
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 500;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.tab:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.tab.active {
  background: var(--accent);
  color: var(--bg-dark);
  border-color: var(--accent);
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  transition: all var(--transition);
}

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

.service-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.service-description {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.service-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

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

.service-duration {
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 4px 10px;
  border-radius: 20px;
}

/* Barber Search & Filters */
.barbers-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.barber-search {
  position: relative;
  flex: 1;
  max-width: 400px;
  min-width: 200px;
}

.barber-search input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: all var(--transition);
}

.barber-search input::placeholder {
  color: var(--text-muted);
}

.barber-search input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.barber-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.125rem;
  pointer-events: none;
}

.barber-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-dark);
}

/* Barbers Grid */
.barbers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.barber-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.barber-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--accent);
}

.barber-card-portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
  overflow: hidden;
}

.barber-card-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.barber-card:hover .barber-card-portrait img {
  transform: scale(1.08);
}

.barber-card-portrait .initials {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.3;
}

.barber-card-info {
  padding: 20px;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-alt) 100%);
}

.barber-card-name {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.barber-card-shop {
  font-size: 0.8125rem;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 500;
}

.barber-card-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.barber-card-rating .stars {
  color: var(--accent);
  font-size: 0.875rem;
}

.barber-card-rating .count {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
}

.barber-card-availability {
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 500;
  padding: 6px 12px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 20px;
  display: inline-block;
}

.barber-card-availability.not-available {
  color: var(--text-muted);
  background: rgba(102, 102, 102, 0.1);
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.no-results h4 {
  font-size: 1.125rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* Legacy barber styles for compatibility */
.barber-avatar {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  background: linear-gradient(135deg, #252525 0%, #1a1a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 2rem;
  color: var(--accent);
  border: 2px solid var(--border);
  overflow: hidden;
}

.barber-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Barber Profile Modal */
.barber-modal-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.barber-profile {
  padding: 0;
  overflow-y: auto;
  max-height: 90vh;
}

.barber-profile-header {
  position: relative;
  padding: 40px 24px 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(212, 168, 83, 0.1) 0%, transparent 100%);
}

.barber-profile-avatar {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  border: 3px solid var(--accent);
  overflow: hidden;
  margin: 0 auto 16px;
  background: var(--bg-alt);
}

.barber-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.barber-profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.barber-profile-shop {
  color: var(--accent);
  font-size: 0.9375rem;
  margin-bottom: 12px;
}

.barber-profile-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9375rem;
  margin-bottom: 8px;
}

.barber-profile-rating .stars {
  color: var(--accent);
}

.barber-profile-availability {
  font-size: 0.875rem;
  color: var(--success);
  font-weight: 500;
}

.barber-profile-body {
  padding: 24px;
}

.barber-profile-section {
  margin-bottom: 24px;
}

.barber-profile-section:last-child {
  margin-bottom: 0;
}

.barber-profile-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.barber-profile-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.barber-profile-socials a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-alt);
  border-radius: 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all var(--transition);
}

.barber-profile-socials a:hover {
  background: var(--accent);
  color: var(--bg-dark);
}

.barber-profile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.barber-profile-actions .btn {
  width: 100%;
}

/* Footer */
.footer {
  background: var(--bg-alt);
  padding: 60px 0 30px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.footer-brand p {
  color: var(--text-secondary);
}

.footer-tagline {
  margin-top: 8px;
  font-size: 0.875rem;
}

.footer-socials {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.social-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.875rem;
}

.social-link:hover {
  text-decoration: underline;
}

.footer-locations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.footer-location h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.footer-location p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.footer-location a {
  color: var(--accent);
  text-decoration: none;
}

.footer-location a:hover {
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-demo a {
  color: var(--accent);
  text-decoration: none;
}

.footer-demo a:hover {
  text-decoration: underline;
}

/* Loading State */
.loading {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
  font-size: 1rem;
  grid-column: 1 / -1;
}

/* Error State */
.error {
  text-align: center;
  color: #ef4444;
  padding: 40px;
  font-size: 1rem;
  grid-column: 1 / -1;
}

/* Booking Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 90vh;
  max-height: 800px;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  background: var(--bg-dark);
  border: none;
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--accent);
  color: var(--bg-dark);
}

#bookingIframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar-links {
    display: none;
  }

  .navbar-toggle {
    display: flex;
  }

  .hero {
    min-height: 60vh;
  }

  .hero-title {
    letter-spacing: 0.1em;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }

  .shop-cards {
    grid-template-columns: 1fr;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .shop-actions {
    flex-direction: column;
  }

  .barbers-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .barber-modal-container {
    max-width: 100%;
    max-height: 95vh;
    border-radius: var(--radius-sm);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-ctas {
    flex-direction: column;
    width: 100%;
    padding: 0 24px;
  }

  .btn {
    width: 100%;
  }

  .tabs {
    flex-direction: column;
    align-items: center;
  }

  .tab {
    width: 100%;
    max-width: 300px;
  }

  .barber-avatar {
    width: 80px;
    height: 80px;
  }

  .shop-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .shop-hours-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
