/*
 * profile-storefront.css — BookerAI Pro Storefront elevation layer
 * MOTION-01 compatible. Uses only --b-* CSS custom properties.
 * Do NOT import this file in _bundle.css — it is loaded per-page from barber_profile.html.
 */

/* ── 1. CINEMATIC HERO ──────────────────────────────────────────────────── */
.bp-hero {
  height: 260px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg,
    #0c3052 0%,
    #0369a1 35%,
    #0d9488 65%,
    #0c4a6e 100%
  );
}

/* Ambient glow orbs — purely decorative, no layout impact */
.bp-hero::before,
.bp-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.bp-hero::before {
  width: 380px;
  height: 380px;
  top: -120px;
  left: -80px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.35) 0%, transparent 70%);
  animation: heroOrb1 8s ease-in-out infinite alternate;
}

.bp-hero::after {
  width: 320px;
  height: 320px;
  bottom: -100px;
  right: -60px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.4) 0%, transparent 70%);
  animation: heroOrb2 10s ease-in-out infinite alternate;
}

@keyframes heroOrb1 {
  from { transform: translate(0, 0) scale(1); opacity: 0.7; }
  to   { transform: translate(30px, 20px) scale(1.12); opacity: 1; }
}
@keyframes heroOrb2 {
  from { transform: translate(0, 0) scale(1); opacity: 0.6; }
  to   { transform: translate(-20px, -25px) scale(1.08); opacity: 0.9; }
}

/* Noise texture overlay for depth */
.bp-hero-noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
  pointer-events: none;
}

/* Soft bottom fade so the hero bleeds into the card */
.bp-hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.18));
  pointer-events: none;
}

/* Dark mode hero — already dark, just deepen slightly */
[data-theme="dark"] .bp-hero {
  background: linear-gradient(155deg,
    #071829 0%,
    #0c2d4a 35%,
    #0a3d38 65%,
    #071829 100%
  );
}

/* ── 2. AVATAR ELEVATION ────────────────────────────────────────────────── */
.bp-avatar-wrap {
  width: 136px !important;
  height: 136px !important;
  top: -68px !important;
  border: 4px solid #fff !important;
  box-shadow:
    0 0 0 2px rgba(14, 165, 233, 0.35),
    0 8px 32px rgba(0,0,0,0.28),
    0 0 60px rgba(14, 165, 233, 0.15) !important;
  transition: box-shadow 0.3s ease;
}

[data-theme="dark"] .bp-avatar-wrap {
  border-color: var(--b-surface-2) !important;
  box-shadow:
    0 0 0 2px rgba(14, 165, 233, 0.4),
    0 8px 32px rgba(0,0,0,0.5),
    0 0 60px rgba(13, 148, 136, 0.2) !important;
}

.bp-card {
  padding-top: 6.5rem !important;
}

/* ── 3. GALLERY — CINEMATIC SHOWCASE ────────────────────────────────────── */
.bp-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 1.75rem;
  border-radius: var(--b-r-xl);
  overflow: hidden;
}

/* First item spans 2 columns + 2 rows — "hero shot" */
.bp-gallery-img:first-child {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: 1;
}

/* Remaining items keep square aspect */
.bp-gallery-img {
  aspect-ratio: 1;
  border-radius: 0;
  overflow: hidden;
  border: none;
  background: var(--b-surface-3);
  cursor: zoom-in;
  position: relative;
}

/* Shimmer overlay on hover */
.bp-gallery-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 40%,
    rgba(255,255,255,0.08) 50%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.bp-gallery-img:hover::after {
  opacity: 1;
}

.bp-gallery-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bp-gallery-img:hover img {
  transform: scale(1.06);
}

/* Zoom icon on hover */
.bp-gallery-img .bp-gallery-zoom {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.bp-gallery-img:hover .bp-gallery-zoom {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Gallery lightbox */
.bp-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  animation: lbFadeIn 0.2s ease;
}

.bp-lightbox.is-open {
  display: flex;
}

@keyframes lbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.bp-lightbox-inner {
  position: relative;
  max-width: min(90vw, 640px);
  max-height: 90vh;
}

.bp-lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--b-r-lg);
  display: block;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  animation: lbImgIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lbImgIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.bp-lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  backdrop-filter: blur(4px);
}

.bp-lightbox-close:hover {
  background: rgba(255,255,255,0.28);
}

/* Gallery section header with count */
.bp-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.bp-gallery-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--b-text-4);
}

/* ── 4. SERVICE CARDS ────────────────────────────────────────────────────── */
.bp-services {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1.75rem;
  border: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
}

.bp-service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--b-border) !important;
  border-radius: var(--b-r-lg) !important;
  border-bottom: 1px solid var(--b-border) !important;
  background: var(--b-surface) !important;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
  text-decoration: none;
  cursor: default;
}

.bp-service-row:hover {
  background: var(--b-surface-2) !important;
  border-color: rgba(14, 165, 233, 0.3) !important;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.08);
  transform: translateY(-1px);
}

/* When wrapped in an anchor (per-service book link) */
a.bp-service-row {
  cursor: pointer;
}

a.bp-service-row .bp-service-name {
  color: var(--b-text-2);
  transition: color 0.18s ease;
}

a.bp-service-row:hover .bp-service-name {
  color: var(--b-primary);
}

/* Service left column: name + optional tag */
.bp-service-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.bp-service-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--b-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bp-service-book-hint {
  font-size: 0.7rem;
  color: var(--b-primary);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.15s ease;
  letter-spacing: 0.02em;
}

a.bp-service-row:hover .bp-service-book-hint {
  opacity: 1;
}

/* Duration chip */
.bp-service-duration {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--b-text-3);
  background: var(--b-surface-2);
  border: 1px solid var(--b-border);
  border-radius: var(--b-r-full);
  padding: 0.2rem 0.55rem;
}

[data-theme="dark"] .bp-service-duration {
  background: var(--b-surface-3);
}

/* Price badge — elevated */
.bp-service-price {
  font-size: 0.9375rem !important;
  font-weight: 800 !important;
  color: var(--b-primary) !important;
  background: var(--b-primary-dim) !important;
  border-radius: var(--b-r-full) !important;
  padding: 0.25rem 0.75rem !important;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .bp-service-price {
  background: rgba(14, 165, 233, 0.18) !important;
  color: #38bdf8 !important;
}

/* ── 5. RATING SUMMARY — RICH TREATMENT ─────────────────────────────────── */
.bp-rating-block {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem 1.25rem;
  background: var(--b-surface-2);
  border: 1px solid var(--b-border);
  border-radius: var(--b-r-xl);
  margin-bottom: 1.5rem;
}

.bp-rating-score-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.bp-rating-big {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
  color: var(--b-text);
}

.bp-rating-stars-row {
  color: #f59e0b;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  line-height: 1;
}

.bp-rating-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--b-text-4);
  text-align: center;
  white-space: nowrap;
}

/* Distribution bars */
.bp-rating-bars-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.bp-rating-bar-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.bp-rating-bar-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--b-text-4);
  width: 14px;
  text-align: right;
  flex-shrink: 0;
}

.bp-rating-bar-track {
  flex: 1;
  height: 6px;
  background: var(--b-border);
  border-radius: var(--b-r-full);
  overflow: hidden;
}

.bp-rating-bar-fill {
  height: 100%;
  border-radius: var(--b-r-full);
  background: linear-gradient(90deg, var(--b-primary), var(--b-teal));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.bp-rating-bar-fill.is-animated {
  transform: scaleX(1);
}

/* ── 6. REVIEW ITEMS — QUOTE TREATMENT ──────────────────────────────────── */
.bp-review-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--b-border);
  position: relative;
}

.bp-review-item:last-child {
  border-bottom: none;
}

/* Quote mark accent */
.bp-review-item::before {
  content: '\201C';
  position: absolute;
  top: 0.5rem;
  left: -0.125rem;
  font-family: Georgia, serif;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--b-primary);
  opacity: 0.18;
  pointer-events: none;
  user-select: none;
}

.bp-review-text {
  font-size: 0.9rem;
  color: var(--b-text-2);
  line-height: 1.65;
  font-style: italic;
  margin: 0;
  padding-left: 0.125rem;
}

/* ── 7. STICKY CTA — PREMIUM FEEL ───────────────────────────────────────── */
.bp-sticky-cta {
  background: var(--b-surface);
  border-top: 1px solid var(--b-border);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.06), 0 -1px 0 var(--b-border);
  transition: box-shadow 0.3s ease;
}

.bp-sticky-cta.has-scrolled {
  box-shadow: 0 -12px 40px rgba(0,0,0,0.12);
}

[data-theme="dark"] .bp-sticky-cta {
  box-shadow: 0 -8px 32px rgba(0,0,0,0.3), 0 -1px 0 var(--b-border);
}

.bp-sticky-cta-btn {
  position: relative;
  overflow: hidden;
}

.bp-sticky-cta-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.08), transparent);
  transform: skewX(-20deg) translateX(-150%);
  animation: bpStickyShine 4s 2s infinite;
}

@keyframes bpStickyShine {
  0%   { transform: skewX(-20deg) translateX(-150%); }
  20%  { transform: skewX(-20deg) translateX(150%); }
  100% { transform: skewX(-20deg) translateX(150%); }
}

/* ── 8. SECTION LABELS — REFINED TYPOGRAPHY ─────────────────────────────── */
.bp-section-hd {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.bp-section-hd-line {
  flex: 1;
  height: 1px;
  background: var(--b-border);
}

.bp-section-hd-text {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--b-text-4);
  white-space: nowrap;
}

/* ── 9. "BOOK THIS SERVICE" PER-ROW ARROW ───────────────────────────────── */
.bp-service-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--b-primary-dim);
  color: var(--b-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  transform: translateX(-4px);
}

a.bp-service-row:hover .bp-service-arrow {
  opacity: 1;
  transform: translateX(0);
}

[data-theme="dark"] .bp-service-arrow {
  background: rgba(14, 165, 233, 0.18);
  color: #38bdf8;
}

/* ── 10. HOURS TABLE — SUBTLE ELEVATION ─────────────────────────────────── */
.bp-hours-table {
  border-radius: var(--b-r-xl) !important;
  box-shadow: var(--b-shadow-sm);
}

.bp-hours-table tr.is-today {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.07), rgba(13, 148, 136, 0.05)) !important;
}

[data-theme="dark"] .bp-hours-table tr.is-today {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.12), rgba(13, 148, 136, 0.08)) !important;
}

/* ── 11. "ABOUT" BIO — TYPOGRAPHY LIFT ──────────────────────────────────── */
.bp-bio {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--b-text-2);
}

/* ── 12. POWERED-BY — SUBTLE BRAND FOOTER ───────────────────────────────── */
.bp-powered {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--b-text-4);
  letter-spacing: 0.01em;
}

.bp-powered-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--b-primary);
  opacity: 0.5;
}

/* ── 13. RESPONSIVE ADJUSTMENTS ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .bp-hero { height: 200px; }
  .bp-avatar-wrap {
    width: 116px !important;
    height: 116px !important;
    top: -58px !important;
  }
  .bp-card { padding-top: 5.5rem !important; }
  .bp-rating-big { font-size: 2.25rem; }

  /* On very narrow, stack the rating block vertically */
  .bp-rating-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
  }

  .bp-rating-score-col {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }

  .bp-gallery-img:first-child {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* ── 14. DARK MODE OVERRIDES ─────────────────────────────────────────────── */
[data-theme="dark"] .bp-rating-block {
  background: var(--b-surface-2);
  border-color: var(--b-border);
}

[data-theme="dark"] .bp-review-item::before {
  color: #38bdf8;
  opacity: 0.2;
}

[data-theme="dark"] .bp-service-row {
  background: var(--b-surface-2) !important;
}

[data-theme="dark"] .bp-service-row:hover {
  background: var(--b-surface-3) !important;
  border-color: rgba(56, 189, 248, 0.25) !important;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.12);
}

/* Reduced motion — disable animations, keep everything visible */
@media (prefers-reduced-motion: reduce) {
  .bp-hero::before,
  .bp-hero::after,
  .bp-sticky-cta-btn::after {
    animation: none !important;
  }
  .bp-gallery-img:hover img {
    transform: none;
  }
  .bp-rating-bar-fill {
    transition: none;
    transform: scaleX(1);
  }
  .bp-service-row:hover {
    transform: none;
  }
}
