/* ==========================================================================
   EET Product Cards — global (category, home carousels, related)
   Matches home-industry-card / eficient theme tokens
   ========================================================================== */

#productListing,
.related-products {
  --eet-green: #4ba248;
  --eet-green-dark: #3d8a3a;
  --eet-green-50: #ecf7eb;
  --eet-yellow: #fdce2b;
  --eet-yellow-dark: #e6b81b;
  --ink-900: #0f1a14;
  --ink-700: #34423a;
  --ink-500: #5c6b62;
  --line: #e3e8e4;
  --bg-soft: #f6f8f5;
  --shadow-sm: 0 1px 3px rgba(15, 26, 20, 0.08);
  --shadow-md: 0 12px 28px rgba(15, 26, 20, 0.12);
  --radius-lg: 10px;
  --radius-md: 8px;
}

/* Product grid — replaces mixed Foundation small-up on #productListing */
.eet-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  margin: 0;
  padding: 16px 8px 24px;
  clear: both;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .eet-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding: 20px 12px 32px;
  }
}

@media (min-width: 1200px) {
  .eet-product-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.eet-product-grid__item {
  display: flex;
  min-width: 0;
  height: 100%;
}

/* --------------------------------------------------------------------------
   Card shell
   -------------------------------------------------------------------------- */
a.eet-product-card,
.eet-product-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 420px;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-decoration: none !important;
  color: var(--ink-900);
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
}

a.eet-product-card:hover,
a.eet-product-card:focus,
.eet-product-card:hover {
  text-decoration: none !important;
  color: var(--ink-900);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(75, 162, 72, 0.4);
  outline: none;
}

a.eet-product-card::before,
.eet-product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--eet-green), var(--eet-yellow));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
  z-index: 4;
}

a.eet-product-card:hover::before,
.eet-product-card:hover::before {
  transform: scaleX(1);
}

.eet-product-card--featured {
  border-color: rgba(75, 162, 72, 0.5);
}

/* Reset global link / heading styles inside card */
a.eet-product-card h3,
a.eet-product-card:hover h3,
a.eet-product-card p,
a.eet-product-card:hover p,
a.eet-product-card span,
a.eet-product-card:hover span {
  text-decoration: none !important;
}

/* Badge — layout only; colors from inline DB + legacy label classes */
.eet-product-card__badge.product_label,
.eet-product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.2;
  box-shadow: var(--shadow-sm);
  color: #fff;
}

/* Legacy promo label colors (same as app.css) — inline DB styles take priority */
.eet-product-card__badge.product_label.nou,
.eet-product-card__badge.nou {
  background: #fdce2b;
}

.eet-product-card__badge.product_label.recomandat,
.eet-product-card__badge.recomandat {
  background: #4ba248;
}

/* Image — top half of card, de-zoomed (full product visible) */
.eet-product-card__media {
  position: relative;
  flex: 0 0 50%;
  height: 50%;
  min-height: 0;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.eet-product-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  object-fit: contain;
  object-position: center center;
  display: block;
  transform: scale(0.92);
  transform-origin: center center;
  transition: transform 0.45s ease;
}

a.eet-product-card:hover .eet-product-card__media img {
  transform: scale(0.96);
}

/* Body — bottom half of card */
.eet-product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 16px 18px;
  text-align: left;
  overflow: visible;
  box-sizing: border-box;
}

.eet-product-card__brand {
  display: block;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--eet-green-dark);
  margin: 0 0 8px;
}

.eet-product-card__title {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink-900);
  margin: 0 0 8px;
  padding: 0;
  flex-shrink: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.eet-product-card__desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-700);
  margin: 0 0 10px;
  flex: 0 1 auto;
  min-height: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.eet-product-card__desc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.eet-product-card__desc ul li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 5px;
  font-size: 13px;
  color: var(--ink-700);
}

.eet-product-card__desc ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--eet-green);
}

.eet-product-card__desc p {
  margin: 0 0 6px;
}

.eet-product-card__price {
  margin: 0 0 10px;
  flex-shrink: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-700);
}

.eet-product-card__price-value {
  font-weight: 700;
  color: var(--ink-900);
}

.eet-product-card__price-vat {
  font-size: 12px;
  color: var(--ink-500);
}

/* CTA — yellow, centered, inside card */
.eet-product-card__actions {
  margin-top: auto;
  padding-top: 12px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.eet-product-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--eet-yellow);
  box-shadow: 0 4px 14px rgba(253, 206, 43, 0.45);
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.eet-product-card__cta::after {
  content: '';
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
}

a.eet-product-card:hover .eet-product-card__cta {
  background: var(--eet-yellow-dark);
  color: var(--ink-900);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(253, 206, 43, 0.55);
}

/* Compact — related products (same 50/50 split, shorter card) */
.eet-product-card--compact {
  min-height: 340px;
}

.eet-product-card--compact .eet-product-card__body {
  padding: 14px 16px 16px;
}

.eet-product-card--compact .eet-product-card__title {
  font-size: 15px;
  min-height: 40px;
  -webkit-line-clamp: 3;
}

.eet-product-card--compact .eet-product-card__desc {
  display: none;
}

/* Related products grid */
.related-products.eet-product-grid,
.related-products .eet-product-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .related-products.eet-product-grid,
  .related-products .eet-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Legacy list — grid wins when eet-product-grid is present */
.product-listing.js-productListing.eet-product-grid {
  display: grid !important;
  flex-wrap: unset;
  list-style: none;
  margin: 0;
  padding: 16px 8px 24px;
}

.product-listing.js-productListing.eet-product-grid > li {
  flex: none;
  max-width: none;
  width: auto;
  list-style: none;
}

.product-listing.js-productListing:not(.eet-product-grid) {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-listing.js-productListing:not(.eet-product-grid) > li {
  flex: 1 1 240px;
  max-width: 300px;
  list-style: none;
}

/* Hide old card markup if any remains */
.eet-product-grid__item > .product_label,
.eet-product-grid__item .block.product,
.eet-product-col > .product_label,
.eet-product-col .block.product {
  display: none !important;
}

/* Category listing: don't float product cells */
#productListing .eet-product-grid {
  float: none;
  width: 100%;
}

#productListing .category-heading-wrapper {
  width: 100%;
  flex: 0 0 100%;
  max-width: 100%;
}

@media (max-width: 640px) {
  .eet-product-grid {
    gap: 12px;
    padding: 12px 8px 24px;
  }

  a.eet-product-card,
  .eet-product-card {
    min-height: 0;
    height: auto;
  }

  a.eet-product-card:hover,
  .eet-product-card:hover {
    transform: none;
  }

  /* Shorter image block → more room for text + button */
  .eet-product-card__media {
    flex: 0 0 128px;
    height: 128px;
    max-height: 128px;
  }

  .eet-product-card__body {
    flex: 1 1 auto;
    padding: 12px 10px 14px;
    min-height: 0;
  }

  .eet-product-card__brand {
    font-size: 10px;
    margin-bottom: 6px;
  }

  .eet-product-card__title {
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 6px;
    -webkit-line-clamp: 2;
  }

  .eet-product-card__desc {
    font-size: 12px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    margin-bottom: 8px;
  }

  .eet-product-card__price {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .eet-product-card__actions {
    padding-top: 8px;
    padding-bottom: 4px;
    margin-top: auto;
  }

  .eet-product-card__cta {
    padding: 10px 14px;
    font-size: 12px;
    gap: 6px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .eet-product-card__cta::after {
    width: 12px;
    height: 12px;
  }

  .eet-product-card--compact .eet-product-card__media {
    flex: 0 0 110px;
    height: 110px;
    max-height: 110px;
  }

}

@media (max-width: 380px) {
  .eet-product-card__cta {
    white-space: normal;
    text-align: center;
    line-height: 1.25;
    padding: 9px 12px;
  }
}
