/* =========================================================
   Hair Before & After Gallery – Frontend Styles
   Theme: Beige / Red / Black
   ========================================================= */

:root {
  --hbag-beige:       #f5ede3;
  --hbag-beige-dark:  #e8d5c4;
  --hbag-beige-mid:   #d4b896;
  --hbag-red:         #c0392b;
  --hbag-red-dark:    #a93226;
  --hbag-red-light:   #e74c3c;
  --hbag-black:       #1a1a1a;
  --hbag-charcoal:    #2d2d2d;
  --hbag-grey:        #6b6b6b;
  --hbag-white:       #ffffff;
  --hbag-radius:      14px;
  --hbag-shadow:      0 6px 30px rgba(0,0,0,.12);
  --hbag-shadow-lg:   0 12px 50px rgba(0,0,0,.18);
  --hbag-transition:  0.3s cubic-bezier(0.4,0,0.2,1);
  --hbag-font-serif:  'Georgia', 'Times New Roman', serif;
  --hbag-font-sans:   -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ── Section ────────────────────────────────────────────── */
.hbag-section {
  background: transparent;
  padding: 20px 0px;
  font-family: var(--hbag-font-sans);
  position: relative;
  overflow: hidden;
}

.hbag-section::before {
  content: none;
}

/* ── Section Header ─────────────────────────────────────── */
.hbag-header {
  text-align: center;
  margin-bottom: 56px;
}

.hbag-title {
  font-family: var(--hbag-font-serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  color: var(--hbag-black);
  margin: 0 0 16px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.hbag-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--hbag-grey);
  margin: 0 auto 28px;
  max-width: 600px;
  line-height: 1.6;
}

.hbag-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--hbag-red);
}

.hbag-divider span {
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hbag-red));
}

.hbag-divider span:last-child {
  background: linear-gradient(90deg, var(--hbag-red), transparent);
}

/* ── Card ───────────────────────────────────────────────── */
.hbag-card {
  background: var(--hbag-beige);
  border-radius: var(--hbag-radius);
  box-shadow: var(--hbag-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform var(--hbag-transition), box-shadow var(--hbag-transition);
  border: 1px solid var(--hbag-beige-dark);
}

.hbag-slide {
  display: flex;
  align-items: stretch;
}

.hbag-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--hbag-shadow-lg);
}

/* Condition Strip */
.hbag-condition {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--hbag-beige-dark);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 12px;
  color: var(--hbag-charcoal);
  margin-top: auto;
  border: 1px solid var(--hbag-beige-mid);
}

.hbag-condition svg {
  flex-shrink: 0;
  color: var(--hbag-red);
}

.hbag-condition strong {
  color: var(--hbag-red);
  font-weight: 700;
}

/* Images area */
.hbag-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  position: relative;
  background: var(--hbag-beige-dark);
  max-height: 150px;
  height: 150px;
  flex-shrink: 0;
}

.hbag-images::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--hbag-beige);
  transform: translateX(-50%);
  z-index: 5;
}

.hbag-img-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.hbag-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--hbag-transition);
}

.hbag-card:hover .hbag-img-wrap img {
  transform: scale(1.04);
}

/* Before / After Labels */
.hbag-img-label {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  z-index: 6;
  white-space: nowrap;
}

.hbag-img-label--before {
  background: rgba(26,26,26,0.75);
  color: var(--hbag-white);
}

.hbag-img-label--after {
  background: var(--hbag-red);
  color: var(--hbag-white);
}

.hbag-img-placeholder {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--hbag-beige);
}

.hbag-img-placeholder svg {
  width: 80px;
  height: 80px;
  opacity: .5;
}

/* Card Body */
.hbag-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  background: var(--hbag-beige);
  overflow: hidden;
}

/* Stars */
.hbag-stars {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.hbag-star {
  width: 16px;
  height: 16px;
}

.hbag-star--filled {
  color: #e0a020;
}

.hbag-star--empty {
  color: #ddd;
}

/* Message */
.hbag-message {
  margin: 0;
  padding: 0 0 0 12px;
  border-left: 3px solid var(--hbag-red);
}

.hbag-message p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--hbag-charcoal);
  font-style: italic;
}

/* Customer Row */
.hbag-customer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--hbag-beige-mid);
}



.hbag-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--hbag-beige-mid);
}

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

.hbag-avatar--initials {
  background: var(--hbag-red);
  color: var(--hbag-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0;
}

.hbag-customer-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.hbag-customer-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--hbag-black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hbag-location,
.hbag-duration {
  font-size: 12px;
  color: var(--hbag-grey);
  display: flex;
  align-items: center;
  gap: 4px;
}

.hbag-duration strong {
  color: var(--hbag-red);
  font-weight: 600;
}

/* ── Grid ───────────────────────────────────────────────── */
.hbag-grid {
  display: grid;
  gap: 28px;
  max-width: 1280px;
  margin: 0 auto;
  align-items: stretch;
}

.hbag-grid--cols-1 { grid-template-columns: 1fr; }
.hbag-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.hbag-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.hbag-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Carousel ───────────────────────────────────────────── */
.hbag-carousel-wrap {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 56px;
  overflow: hidden;
}

.hbag-carousel {
  display: flex;
  flex-wrap: nowrap;
  will-change: transform;
}

.hbag-slide {
  flex: 0 0 auto;
  padding: 0 12px;
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
}

/* Nav Buttons */
.hbag-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--hbag-red);
  background: var(--hbag-white);
  color: var(--hbag-red);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--hbag-transition);
  z-index: 10;
  box-shadow: 0 2px 12px rgba(192,57,43,.15);
}

.hbag-nav:hover {
  background: var(--hbag-red);
  color: var(--hbag-white);
  transform: translateY(-50%) scale(1.08);
}

.hbag-nav--prev { left: 4px; }
.hbag-nav--next { right: 4px; }

/* Dots */
.hbag-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.hbag-dot {
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: var(--hbag-beige-mid);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.hbag-dot--active {
  background: var(--hbag-red);
  width: 28px;
}

/* ── CTA ────────────────────────────────────────────────── */
.hbag-cta-wrap {
  text-align: center;
  margin-top: 56px;
}

.hbag-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--hbag-red);
  color: var(--hbag-white);
  text-decoration: none;
  padding: 16px 40px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: all var(--hbag-transition);
  box-shadow: 0 4px 20px rgba(192,57,43,.35);
}

.hbag-cta-btn:hover {
  background: var(--hbag-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(192,57,43,.45);
  color: var(--hbag-white);
}

/* ── No-reviews message ─────────────────────────────────── */
.hbag-no-reviews {
  text-align: center;
  color: var(--hbag-grey);
  font-style: italic;
  padding: 40px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hbag-grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
  .hbag-grid--cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hbag-section { padding: 56px 20px; }
  .hbag-carousel-wrap { padding: 0 42px; }
  .hbag-grid--cols-2,
  .hbag-grid--cols-3,
  .hbag-grid--cols-4 { grid-template-columns: 1fr; }
  .hbag-carousel-wrap { padding: 0 44px; }
  .hbag-nav { width: 38px; height: 38px; }
  .hbag-card { width: 100%; }
}

@media (max-width: 480px) {
  .hbag-carousel-wrap { padding: 0 38px; }
  .hbag-card { width: 100%; }
}
