/* Trang sản phẩm — Kim Phụng Spa */
body.products-page {
  overflow-y: auto;
  height: auto;
}

.products-page .navbar {
  position: sticky;
  top: 0;
  z-index: 100;
}

.products-main {
  padding: calc(var(--navbar-height) + 2rem) 1.5rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.products-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.products-hero .section-tag {
  display: inline-block;
  margin-bottom: 0.75rem;
}

.products-hero .section-title {
  margin-bottom: 0.75rem;
}

.products-hero-lead {
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto 1.5rem;
}

.products-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.products-filters button {
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--color-bg-tertiary);
  background: var(--color-white);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.products-filters button:hover,
.products-filters button.is-active {
  border-color: var(--color-clay);
  color: var(--color-clay);
  background: var(--color-bg-secondary);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px var(--color-shadow);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.product-card:hover,
.product-card--highlight {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--color-shadow-hover);
}

.product-card--highlight {
  outline: 2px solid var(--color-clay);
  outline-offset: 2px;
}

.product-card__img-wrap {
  position: relative;
  aspect-ratio: 1;
  background: #ffffff;
  overflow: hidden;
}

.product-card__img-wrap::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  width: 52px;
  height: 52px;
  background: url("/images/logo.svg") center / contain no-repeat;
  opacity: 0.92;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.95))
    drop-shadow(0 1px 3px rgba(0, 0, 0, 0.12));
}

.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
  background: #ffffff;
}

.product-card__body {
  padding: 1.15rem 1.25rem 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card__brand {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-gold);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.product-card__tier {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--color-bg-tertiary);
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
  width: fit-content;
}

.product-card__tier--premium {
  background: linear-gradient(135deg, #f5e6c8, #e8d4a8);
  color: var(--color-gold-dark);
}

.product-card__name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  color: var(--color-text-dark);
}

.product-card__summary {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.product-card__price {
  font-weight: 600;
  color: var(--color-clay);
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
}

.product-card__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.product-card__actions .btn {
  flex: 1;
  min-width: 100px;
  font-size: 0.82rem;
  padding: 0.55rem 0.75rem;
}

.product-card__img-link {
  display: block;
  width: 100%;
  height: 100%;
}

.product-card__name a {
  color: inherit;
  text-decoration: none;
}

.product-card__name a:hover {
  color: var(--color-clay);
}

/* —— Trang chi tiết —— */
.product-detail-main {
  max-width: 1100px;
}

.product-breadcrumb {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
}

.product-breadcrumb a {
  color: var(--color-clay);
  text-decoration: none;
}

.product-breadcrumb a:hover {
  text-decoration: underline;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

.product-detail__gallery-main {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 24px var(--color-shadow);
}

.product-detail__gallery-main:not(.product-detail__gallery-main--empty)::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  width: 64px;
  height: 64px;
  background: url("/images/logo.svg") center / contain no-repeat;
  opacity: 0.92;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.95))
    drop-shadow(0 1px 3px rgba(0, 0, 0, 0.12));
}

.product-detail__gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 1.25rem;
}

.product-detail__gallery-main--empty {
  color: var(--color-text-muted);
}

.product-detail__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.product-detail__thumb {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}

.product-detail__thumb.is-active {
  border-color: var(--color-clay);
}

.product-detail__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-detail__category {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0 0 0.5rem;
}

.product-detail__title {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.25;
  margin: 0 0 0.5rem;
  color: var(--color-text-dark);
}

.product-detail__name-en {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0 0 0.75rem;
}

.product-detail__price {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-clay);
  margin: 0 0 1rem;
}

.product-detail__summary {
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.65;
}

.product-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.product-detail__note {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  padding: 0.85rem 1rem;
  background: var(--color-bg-secondary);
  border-radius: 8px;
  line-height: 1.5;
}

.product-detail__body {
  background: var(--color-white);
  border-radius: 12px;
  padding: 1.75rem 2rem;
  box-shadow: 0 4px 24px var(--color-shadow);
  margin-bottom: 2rem;
}

.product-detail__body-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-bg-tertiary);
}

.product-detail__html {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.product-detail__html h2,
.product-detail__html h3 {
  font-family: var(--font-heading);
  color: var(--color-text-dark);
  margin: 1.25rem 0 0.65rem;
  font-size: 1.1rem;
}

.product-detail__html img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0.75rem 0;
}

.product-detail__html ul {
  margin: 0.5rem 0 1rem 1.25rem;
}

.product-detail__text p {
  margin-bottom: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.product-detail__not-found {
  text-align: center;
  padding: 4rem 1rem;
}

.product-detail__not-found h1 {
  font-family: var(--font-heading);
  margin-bottom: 1rem;
}

.products-empty,
.products-loading {
  text-align: center;
  padding: 3rem;
  color: var(--color-text-muted);
  grid-column: 1 / -1;
}

.products-page .spa-footer {
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .products-main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .product-card__img-wrap::after {
    width: 44px;
    height: 44px;
    left: 8px;
    top: 8px;
  }

  .product-detail__gallery-main:not(.product-detail__gallery-main--empty)::after {
    width: 52px;
    height: 52px;
    left: 10px;
    top: 10px;
  }

  .product-detail__body {
    padding: 1.25rem 1rem;
  }
}
