.customer-catalog,
.customer-catalog-fixed-actions {
  --customer-catalog-accent: var(--customer-surface-accent, #7b4b49);
  --customer-catalog-accent-dark: var(--customer-surface-accent-dark, #643b43);
  --customer-catalog-accent-soft: #f8e8ec;
  --customer-catalog-surface: #fff;
  --customer-catalog-border: #efe4e0;
  --customer-catalog-text: #1f1f1f;
  --customer-catalog-muted: #6f6560;
  --customer-catalog-radius-sm: 0.75rem;
  --customer-catalog-radius: 1rem;
  --customer-catalog-shadow: 0 0.125rem 0.5rem rgba(31, 31, 31, 0.04);
  --customer-catalog-cart-clearance: 5.25rem;
}

.customer-catalog {
  max-width: 72rem;
  margin-inline: auto;
}

.customer-catalog [hidden] {
  display: none !important;
}

/* Busca e filtros */

.customer-catalog-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.customer-catalog-search {
  width: 100%;
  max-width: 34rem;
}

.customer-catalog-search__control {
  position: relative;
}

.customer-catalog-search__control > .bi {
  position: absolute;
  top: 50%;
  left: 1rem;
  color: var(--customer-catalog-muted);
  font-size: 1rem;
  pointer-events: none;
  transform: translateY(-50%);
}

.customer-catalog-search__input {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 3.25rem 0.65rem 2.75rem;
  color: var(--customer-catalog-text);
  font-size: 0.95rem;
  background: var(--customer-catalog-surface);
  border: 1px solid var(--customer-catalog-border);
  border-radius: 999px;
  box-shadow: var(--customer-catalog-shadow);
}

.customer-catalog-search__input::placeholder {
  color: #9a8f8a;
}

.customer-catalog-search__input:focus-visible {
  outline: 3px solid rgba(123, 75, 73, 0.28);
  outline-offset: 2px;
  border-color: var(--customer-catalog-accent);
}

.customer-catalog-search__input::-webkit-search-decoration,
.customer-catalog-search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.customer-catalog-search__clear {
  position: absolute;
  top: 50%;
  right: 0.125rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: var(--customer-catalog-muted);
  font-size: 0.85rem;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transform: translateY(-50%);
}

.customer-catalog-search__clear:hover {
  color: var(--customer-catalog-accent-dark);
  background: var(--customer-catalog-accent-soft);
}

.customer-catalog-search__clear:focus-visible {
  outline: 3px solid rgba(123, 75, 73, 0.32);
  outline-offset: 2px;
}

.customer-category-filters {
  display: flex;
  gap: 0.5rem;
  padding: 0.15rem 0.25rem;
  margin-inline: -0.25rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.customer-category-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.1rem;
  color: var(--customer-catalog-accent);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.1;
  background: var(--customer-catalog-surface);
  border: 1px solid var(--customer-catalog-border);
  border-radius: 999px;
  box-shadow: var(--customer-catalog-shadow);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.customer-category-chip:hover {
  background: var(--customer-catalog-accent-soft);
  border-color: #e3c9cf;
}

.customer-category-chip.is-active,
.customer-category-chip[aria-pressed="true"] {
  color: #fff;
  background: var(--customer-catalog-accent);
  border-color: var(--customer-catalog-accent);
}

.customer-category-chip:focus-visible {
  outline: 3px solid rgba(123, 75, 73, 0.32);
  outline-offset: 2px;
}

/* Slot visual compartilhado: fallback abstrato neutro ou imagem editorial */

.customer-media-slot {
  position: relative;
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 55%),
    linear-gradient(140deg, #f7e9ec 0%, #f1e2dd 55%, #ece7de 100%);
  border: 1px solid #f0e2e3;
  border-radius: var(--customer-catalog-radius-sm);
}

.customer-media-slot::after {
  position: absolute;
  right: -18%;
  bottom: -28%;
  width: 70%;
  aspect-ratio: 1;
  content: "";
  background: rgba(123, 75, 73, 0.08);
  border-radius: 50%;
}

/* A imagem editorial substitui somente o conteúdo do slot, preservando a
   geometria fixa do card e do repeat. O `z-index` cobre a decoração abstrata. */
.customer-media-slot__image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Imagem editorial na página de detalhe: responsiva, com crop controlado e
   proporção fixa para não introduzir layout shift relevante. */
.customer-detail-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 1rem;
  object-fit: cover;
  background: #f7e9ec;
  border: 1px solid #f0e2e3;
  border-radius: var(--customer-catalog-radius-sm, 0.75rem);
}

/* Agendar novamente */

.customer-repeat-booking {
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #fffaf7 0%, #fbeff0 100%);
  border: 1px solid #f0dde0;
  border-radius: var(--customer-catalog-radius);
  box-shadow: var(--customer-catalog-shadow);
}

.customer-repeat-booking__eyebrow {
  margin: 0 0 0.6rem;
  color: var(--customer-catalog-accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.customer-repeat-booking__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.customer-media-slot--compact {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
}

.customer-repeat-booking__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.customer-repeat-booking__title {
  margin: 0;
  color: var(--customer-catalog-text);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.customer-repeat-booking__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
  margin: 0;
  color: var(--customer-catalog-muted);
  font-size: 0.75rem;
}

.customer-repeat-booking__time,
.customer-repeat-booking__duration {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.customer-repeat-booking__price {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin: 0.15rem 0 0;
}

.customer-repeat-booking__price-headline {
  color: var(--customer-catalog-accent-dark);
  font-size: 0.8rem;
  font-weight: 750;
}

.customer-repeat-booking__price-support {
  color: var(--customer-catalog-muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.customer-repeat-booking__actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.customer-repeat-booking__actions form {
  margin: 0;
}

.customer-repeat-booking__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.8rem;
  color: var(--customer-catalog-accent);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  background: #fff;
  border: 1px solid #e3c9cf;
  border-radius: 999px;
  cursor: pointer;
}

.customer-repeat-booking__cta:hover {
  color: #fff;
  background: var(--customer-catalog-accent);
  border-color: var(--customer-catalog-accent);
}

.customer-repeat-booking__cta:focus-visible {
  outline: 3px solid rgba(123, 75, 73, 0.32);
  outline-offset: 2px;
}

.customer-repeat-booking__cart-state {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #46624d;
  font-size: 0.82rem;
  font-weight: 650;
}

/* Coleção de procedimentos */

.customer-procedures {
  margin-top: 1.5rem;
}

.customer-procedures__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.customer-procedures__title {
  margin: 0;
  color: var(--customer-catalog-text);
  font-size: 1.15rem;
  font-weight: 750;
}

.customer-procedures__summary {
  margin: 0;
  color: var(--customer-catalog-muted);
  font-size: 0.8rem;
}

.customer-procedure-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
}

.customer-procedure-card {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.7rem;
  background: var(--customer-catalog-surface);
  border: 1px solid var(--customer-catalog-border);
  border-radius: var(--customer-catalog-radius);
  box-shadow: var(--customer-catalog-shadow);
}

.customer-procedure-card.is-selected {
  border-color: #ddc3c8;
  box-shadow: 0 0.25rem 0.9rem rgba(123, 75, 73, 0.1);
}

.customer-procedure-card__link {
  display: flex;
  flex: 1 1 auto;
  gap: 0.75rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  border-radius: var(--customer-catalog-radius-sm);
}

.customer-procedure-card__link:focus-visible {
  outline: 3px solid rgba(123, 75, 73, 0.32);
  outline-offset: 3px;
}

.customer-procedure-card__media {
  width: 4rem;
  height: 4rem;
}

.customer-procedure-card__content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.customer-procedure-card__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem 0.5rem;
  min-width: 0;
}

.customer-procedure-card__name {
  flex: 1 1 auto;
  min-width: 6rem;
  margin: 0;
  color: var(--customer-catalog-text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.customer-procedure-card__recent {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.45rem;
  color: var(--customer-catalog-accent);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  background: #fff;
  border: 1px solid #e6cfd4;
  border-radius: 999px;
}

.customer-procedure-card__description {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--customer-catalog-muted);
  font-size: 0.82rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.customer-procedure-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  color: var(--customer-catalog-muted);
  font-size: 0.75rem;
}

.customer-procedure-card__duration {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.customer-procedure-card__selected {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.05rem 0.45rem;
  color: var(--customer-catalog-accent-dark);
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--customer-catalog-accent-soft);
  border-radius: 999px;
}

.customer-procedure-card__price {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin: 0;
}

.customer-procedure-card__price-headline {
  color: var(--customer-catalog-accent-dark);
  font-size: 0.95rem;
  font-weight: 750;
}

.customer-procedure-card__price-support {
  color: var(--customer-catalog-muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.customer-procedure-card__action {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
}

.customer-procedure-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  color: var(--customer-catalog-accent);
  font: inherit;
  font-size: 1.35rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.customer-procedure-action:hover {
  background: var(--customer-catalog-accent-soft);
}

.customer-procedure-action:focus-visible {
  outline: 3px solid rgba(123, 75, 73, 0.32);
  outline-offset: 2px;
}

.customer-procedure-action.is-selected {
  color: #fff;
  background: var(--customer-catalog-accent);
  border-color: var(--customer-catalog-accent);
}

.customer-procedure-action.is-selected:hover {
  background: var(--customer-catalog-accent-dark);
}

.customer-procedure-action:disabled,
.customer-repeat-booking__cta:disabled {
  cursor: wait;
  opacity: 0.65;
}

.customer-catalog-filter-empty {
  margin-top: 0.5rem;
}

/* Barra contextual do carrinho */

.customer-catalog--has-fixed-actions {
  padding-bottom: var(--customer-catalog-cart-clearance);
}

.customer-catalog-fixed-actions {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1035;
  padding: 0.5rem 0.75rem;
  pointer-events: none;
}

.customer-catalog-fixed-actions__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: min(100% - 0.5rem, 72rem);
  min-height: 3.5rem;
  padding: 0.4rem 0.4rem 0.4rem 0.8rem;
  margin: 0 auto;
  color: #fff;
  background: var(--customer-catalog-accent);
  border-radius: var(--customer-catalog-radius);
  box-shadow: 0 0.6rem 1.5rem rgba(70, 45, 42, 0.22);
  pointer-events: auto;
}

.customer-catalog-fixed-actions__count {
  min-width: 0;
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.3;
  font-weight: 600;
}

.customer-catalog-fixed-actions__cta {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.25rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.6rem;
  color: var(--customer-catalog-accent-dark);
  font-size: 0.78rem;
  font-weight: 750;
  white-space: nowrap;
  text-decoration: none;
  background: #fff;
  border-radius: 999px;
}

.customer-catalog-fixed-actions__cta:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.75);
  outline-offset: 2px;
}

/* Carrinho: cards editoriais, sem semântica de tabela. */

.customer-cart-item + .customer-cart-item {
  margin-top: 0.75rem;
}

.customer-cart-item__grid {
  display: grid;
  grid-template-columns: 4rem minmax(12rem, 1.45fr) minmax(7.5rem, 0.7fr) minmax(10rem, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
}

.customer-cart-item__media {
  width: 4rem;
  height: 4rem;
  border-radius: 0.7rem;
}

.customer-cart-item__service,
.customer-cart-item__price,
.customer-cart-item__status {
  min-width: 0;
}

.customer-cart-item__service {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.customer-cart-item__name {
  color: #302623;
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.customer-cart-item__duration,
.customer-cart-item__minimum {
  color: #756762;
  font-size: 0.82rem;
}

.customer-cart-item__duration .bi { margin-right: 0.25rem; }
.customer-cart-item__minimum { font-size: 0.75rem; }

.customer-cart-item__price {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  color: #302623;
}

.customer-cart-item__price-label {
  color: #756762;
  font-size: 0.78rem;
}

.customer-cart-item__price strong { font-size: 0.95rem; }
.customer-cart-item__status { justify-self: start; }
.customer-cart-item__grid.is-unavailable { background: #fffaf3; }

.customer-cart-item__action {
  display: flex;
  justify-content: flex-end;
}

.customer-cart-item__action form { margin: 0; }

.customer-cart-item__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 2.75rem;
  min-height: 44px;
  padding: 0.35rem 0.45rem;
  color: var(--customer-catalog-accent-dark);
  font-size: 0.78rem;
  background: transparent;
  border: 0;
  border-radius: 0.5rem;
}

.customer-cart-item__remove:hover,
.customer-cart-item__remove:focus-visible {
  color: #8d3f4b;
  background: #f8eeeb;
}

.customer-cart-payment-note {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.65rem 0.8rem;
  margin: 0;
  color: #665650;
  font-size: 0.8rem;
  line-height: 1.4;
  background: #fffaf3;
  border: 1px solid #eadfce;
  border-radius: 0.7rem;
}

.customer-cart-payment-note .bi { color: var(--customer-catalog-accent); }

.customer-cart-summary .card-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  padding: 1rem;
}

.customer-cart-summary .ui-detail-title {
  font-size: 1rem;
}

.customer-cart-summary .ui-section-note {
  font-size: 0.8rem;
  line-height: 1.4;
}

.customer-cart-rail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.9rem;
  position: sticky;
  top: 1rem;
}

.customer-cart-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.customer-cart-page-actions .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.customer-cart-rail .customer-cart-page-actions {
  flex-direction: column;
}

.customer-cart-rail .customer-cart-page-actions .btn {
  width: 100%;
}

.customer-cart-page-actions--empty {
  margin-top: 1rem;
}

.customer-cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(18rem, 0.8fr);
  gap: 1rem;
  align-items: start;
}

@media (min-width: 768px) {
  .customer-catalog-toolbar {
    gap: 1rem;
  }

  .customer-procedure-list {
    grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
    gap: 0.85rem;
  }

  .customer-procedure-card__media {
    width: 4.5rem;
    height: 4.5rem;
  }
}

@media (max-width: 575.98px) {
  .customer-cart-page-actions,
  .customer-cart-page-actions .btn {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .customer-cart-layout { grid-template-columns: 1fr; }
  .customer-cart-rail { position: static; }

  .customer-cart-item__grid {
    grid-template-columns: 3.5rem minmax(0, 1fr) auto;
    gap: 0.2rem 0.7rem;
    padding: 0.7rem 0.75rem;
  }

  .customer-cart-item__media {
    width: 3.5rem;
    height: 3.5rem;
    grid-row: 1 / span 3;
  }

  .customer-cart-item__service {
    align-self: center;
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .customer-cart-item__name { font-size: 0.95rem; }
  .customer-cart-item__duration { font-size: 0.78rem; }
  .customer-cart-item__status {
    grid-column: 2;
    grid-row: 3;
  }

  .customer-cart-item__price {
    grid-column: 2;
    grid-row: 4;
    margin-top: 0.1rem;
  }

  .customer-cart-item__price-label,
  .customer-cart-item__price strong { font-size: 0.78rem; }

  .customer-cart-item__action {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
  }

  .customer-cart-item__remove {
    padding-inline: 0.25rem;
    font-size: 0.74rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .customer-category-chip,
  .customer-procedure-action {
    transition: none;
  }
}
