/* ======================================================================
   Pit o Cuixa — Product Card Component (Full Background & High Contrast)
   
   BEM block: .product-card
   DS-002: Consistent BEM naming
   Part of: product-group__grid (responsive grid)
   ====================================================================== */

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 160px;
  background-color: var(--color-on-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

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

/* ── Image & Overlay ─────────────────────────────────────────── */
.product-card__image-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  background-color: #1a1c1e;
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.product-card:hover .product-card__image {
  transform: scale(1.06);
}

.product-card__image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2d3748, #1a202c);
}

.product-card__placeholder-icon {
  font-size: 2.5rem;
  opacity: 0.6;
}

/* Soft, subtle gradient overlay for text legibility without darkening images */
.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.2) 35%,
    transparent 65%
  );
  pointer-events: none;
  transition: background var(--transition-normal);
}

.product-card:hover::before {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.25) 35%,
    transparent 65%
  );
}

/* ── Body (Positioned on top of image) ────────────────────────── */
.product-card__body {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md);
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.product-card__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: #ffffff;
  margin: 0;
  line-height: var(--line-height-tight);
}

.product-card__desc {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.88);
  line-height: var(--line-height-normal);
  margin: 0;
  /* Clamp to 2 lines on mobile, 3 on desktop */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Footer (price) ───────────────────────────────────────────── */
.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
  padding-top: var(--space-xs);
}

.product-card__price {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  white-space: nowrap;
  flex-shrink: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* ── Stretched link (entire card is clickable) ─────────────────── */
.product-card__link {
  position: absolute;
  inset: 0;
  z-index: 4;
  cursor: pointer;
}

.product-card__link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* ── Product Groups & Menu Section Layout ──────────────────────── */
.menu-products,
[data-channel-view] {
  padding-top: var(--space-md);
}

.product-group {
  margin-bottom: var(--space-2xl);
  scroll-margin-top: 120px;
}

.product-group:first-child {
  margin-top: 0;
}

.product-group__title,
.section__title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-on-surface);
  margin-top: var(--space-sm);
  margin-bottom: var(--space-md);
  line-height: var(--line-height-tight);
}

.product-group:first-child .product-group__title {
  margin-top: 0;
}

@media (min-width: 640px) {
  .menu-products,
  [data-channel-view] {
    padding-top: var(--space-md);
  }

  .product-group {
    margin-bottom: var(--space-3xl);
  }

  .product-group__title,
  .section__title {
    font-size: var(--font-size-3xl);
    margin-top: var(--space-md);
    margin-bottom: var(--space-md);
  }

  .product-group:first-child .product-group__title {
    margin-top: 0;
  }
}

/* ── Grid container & Responsive Breakpoints ────────────────── */
.featured__grid,
.product-group__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

/* Mobile height tuning */
@media (max-width: 639px) {
  .product-card {
    min-height: 170px;
  }
}

/* DS-003: Tablet — 2 columns */
@media (min-width: 640px) {
  .product-card {
    min-height: 240px;
  }

  .product-card__desc {
    -webkit-line-clamp: 3;
  }

  .featured__grid,
  .product-group__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }
}

/* DS-003: Desktop — 3 columns (3 columns max for delivery grid with generous gap) */
@media (min-width: 1024px) {
  .product-card {
    min-height: 280px;
  }

  .featured__grid,
  .product-group__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
  }
}

/* Wide desktop — keep 3 columns instead of 4 for delivery grid */
@media (min-width: 1280px) {
  .product-group__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
  }
}


