/* ============================================================
   CARBASE — Service Page Styles
   ============================================================ */


/* --- Page Header --- */
.service-page-header {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

.service-page-header h1 {
  margin-bottom: 0.5rem;
}

.service-page-header .page-sub {
  font-size: 1.0625rem;
  color: var(--text-2);
  max-width: 40rem;
  margin: 0;
}


/* --- International Callout --- */
.international-callout {
  margin-top: 2rem;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.international-callout-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  fill: var(--blue-text);
  margin-top: 1px;
}

.international-callout p {
  color: var(--blue-text);
  font-size: 0.9375rem;
  margin: 0;
}


/* --- Category Filter --- */
.category-filter-section {
  padding: 2rem 0 0;
}

.category-filter {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.cat-btn {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4375rem 0.875rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  color: var(--text-2);
  background: var(--surface);
  transition: color var(--t), background var(--t), border-color var(--t);
  white-space: nowrap;
}

.cat-btn:hover {
  color: var(--text-1);
  border-color: #ccc;
}

.cat-btn.active {
  background: var(--text-1);
  color: #FFFFFF;
  border-color: var(--text-1);
}


/* --- Services Grid --- */
.services-section {
  padding: 2.5rem 0 5rem;
}

.category-group {
  margin-bottom: 4rem;
}

.category-group:last-child {
  margin-bottom: 0;
}

.category-heading {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.service-full-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t);
}

.service-full-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

.service-full-card .card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--border);
}

.service-card-img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #F0F0EE 0%, #E8E8E6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card-img-placeholder svg {
  width: 32px;
  height: 32px;
  fill: var(--text-3);
  opacity: 0.5;
}

.service-full-card-body {
  padding: 1.375rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.service-full-card-badges {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.service-full-card-name {
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-1);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.service-full-card-desc {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 1.125rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.service-full-card-meta {
  display: flex;
  gap: 0.625rem;
  margin-bottom: 0;
}

.service-meta-pill {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.625rem 0.875rem;
  min-width: 0;
}

.service-meta-pill-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.service-meta-pill-icon svg {
  width: 14px;
  height: 14px;
  fill: var(--text-3);
}

.service-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.service-meta-label {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  line-height: 1;
  white-space: nowrap;
}

.service-meta-value {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Card footer: price + book CTA */
.service-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.125rem;
  border-top: 1px solid var(--border);
  margin-top: 1.125rem;
}

.service-full-card-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.02em;
  flex-shrink: 1;
  min-width: 0;
}

/* Loading / empty state for the services list */
.services-loading,
.services-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-3);
  font-size: 0.9375rem;
}


/* --- Form states --- */
.form-submitting .btn-submit {
  opacity: 0.65;
  pointer-events: none;
}

.booking-success {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
  background: var(--green-bg);
  border: 1px solid rgba(52, 101, 56, 0.15);
  border-radius: var(--r-md);
  text-align: center;
}

.booking-success.visible { display: flex; }

.booking-success svg {
  width: 36px;
  height: 36px;
  fill: var(--green-text);
  margin: 0 auto;
}

.booking-success p {
  color: var(--green-text);
  font-size: 0.9375rem;
  margin: 0;
}

.booking-error {
  display: none;
  font-size: 0.875rem;
  color: var(--red-text);
  background: var(--red-bg);
  border: 1px solid rgba(159, 47, 45, 0.15);
  border-radius: var(--r-sm);
  padding: 0.75rem 1rem;
  margin-top: 1rem;
}

.booking-error.visible { display: block; }

/* Not-found CTA */
.not-found-cta-section {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.not-found-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.not-found-cta p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-secondary);
}


/* ============================================================
   BOOKING MODAL
   ============================================================ */
body.modal-open {
  overflow: hidden;
  padding-right: var(--scrollbar-w, 0px);
}

.booking-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 260ms var(--ease-out), visibility 260ms var(--ease-out);
}

@media (min-width: 40rem) {
  .booking-modal-overlay {
    align-items: center;
    padding: 1.5rem;
  }
}

.booking-modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.booking-modal {
  background: var(--surface);
  width: 100%;
  max-width: 32rem;
  max-height: 92dvh;
  overflow-y: auto;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 2rem 1.5rem 3rem;
  position: relative;
  transform: translateY(32px);
  transition: transform 260ms var(--ease-out);
}

@media (min-width: 40rem) {
  .booking-modal {
    border-radius: var(--r-lg);
    padding: 2rem;
    transform: translateY(16px);
  }
}

.booking-modal-overlay.open .booking-modal {
  transform: translateY(0);
}

/* Drag handle (mobile) */
.booking-modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 9999px;
  margin: 0 auto 1.5rem;
}

@media (min-width: 40rem) {
  .booking-modal-handle { display: none; }
}

.booking-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  color: var(--text-3);
  transition: background var(--t), color var(--t);
}

.booking-modal-close:hover {
  background: var(--canvas);
  color: var(--text-1);
}

.booking-modal-close svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.booking-modal-heading {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin-bottom: 0.375rem;
  padding-right: 2rem;
  line-height: 1.2;
}

.booking-modal-sub {
  font-size: 0.875rem;
  color: var(--text-2);
  margin-bottom: 1.75rem;
  line-height: 1.5;
}


/* ============================================================
   SERVICE DETAIL MODAL
   Reuses the same modal shell patterns as the parts modal.
   Service modal = subset: single photo, no thumbnail strip/arrows.
   ============================================================ */

/* Shared modal shell — mirrors parts.css .modal-overlay */
#service-modal.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.48);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem 1rem 2rem;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 240ms ease, visibility 240ms ease;
  -webkit-overflow-scrolling: touch;
}

#service-modal.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#service-modal .modal-dialog {
  background: var(--surface);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 860px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: 92vh;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  transform: translateY(12px);
  transition: transform 240ms var(--ease-out);
  margin: auto;
}

#service-modal.modal-overlay.open .modal-dialog {
  transform: translateY(0);
}

@media (min-width: 56rem) {
  #service-modal .modal-dialog {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0, 1fr);
    max-height: 63vh;
  }
}

#service-modal .modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t);
}

#service-modal .modal-close:hover { background: rgba(0, 0, 0, 0.75); }

#service-modal .modal-close svg {
  width: 18px;
  height: 18px;
  fill: #ffffff;
}

/* Left panel — single photo (no thumbnails, no arrows) */
#service-modal .modal-gallery {
  background: #FFFFFF;
  position: relative;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 56rem) {
  #service-modal .modal-gallery {
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
}

#service-modal .modal-main-img-wrap {
  position: relative;
  aspect-ratio: 1;
  max-height: 42vh;
  overflow: hidden;
  flex-shrink: 0;
}

@media (min-width: 56rem) {
  #service-modal .modal-main-img-wrap {
    flex: 1;
    aspect-ratio: unset;
    max-height: none;
    min-height: 300px;
  }
}

#service-modal .modal-main-img {
  width: 100%;
  height: 100%;
  /* Preserve the original aspect ratio — letterbox on the dark gallery
     background instead of cropping/distorting the image. */
  object-fit: contain;
  display: block;
}

#service-modal .modal-img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 240px;
  background: #F2F2F0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#service-modal .modal-img-placeholder svg {
  width: 48px;
  height: 48px;
  fill: rgba(0, 0, 0, 0.12);
}

/* Right panel — scrollable content + a pinned footer (meta + CTA) */
#service-modal .modal-detail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#service-modal .modal-detail-inner {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2rem 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Always visible: Time/Models pills + booking CTA + phone */
#service-modal .modal-detail-footer {
  flex-shrink: 0;
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

#service-modal .modal-part-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-1);
  margin-bottom: 0.75rem;
}

#service-modal .modal-part-badges {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

#service-modal .modal-part-price {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin-bottom: 1.25rem;
}

#service-modal .modal-part-desc {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  white-space: pre-line;
}

/* Meta pills inside service modal (pinned footer) */
.modal-svc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

/* CTA row (pinned footer) */
.modal-svc-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Space the pills above the CTA only when both are present */
.modal-svc-meta:not(:empty) + .modal-svc-cta-row {
  margin-top: 1rem;
}

/* Upsells section inside modal */
.modal-upsells {
  margin-bottom: 1.25rem;
}

.modal-upsells-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 0.75rem;
}

.modal-upsells-row {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}

.modal-upsell-card {
  flex-shrink: 0;
  width: 130px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-decoration: none;
  overflow: hidden;
  transition: box-shadow var(--t), transform var(--t);
}

.modal-upsell-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.modal-upsell-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.modal-upsell-card-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-upsell-card-placeholder svg {
  width: 24px;
  height: 24px;
  fill: var(--text-3);
  opacity: 0.4;
}

.modal-upsell-card-body {
  padding: 0.5rem 0.625rem;
}

.modal-upsell-card-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.2rem;
}

.modal-upsell-card-price {
  font-size: 0.6875rem;
  color: var(--text-3);
}
