/* ===== Section 04: Products (WooCommerce, slider like landing_projects) ===== */
.landing-products {
  --slide-w: 280px;
  --slide-gap: 20px;
  position: relative;
  direction: rtl;
  color: var(--landing-text);
  padding-block: clamp(32px, 4.5vw, 60px);
  overflow-x: clip;
}
.landing-products--gray  { background-color: #f1f1f1; }
.landing-products--white { background-color: var(--landing-white); }
.landing-products *,
.landing-products *::before,
.landing-products *::after { box-sizing: border-box; }

.landing-products__inner {
  max-width: var(--landing-wrap);
  margin-inline: auto;
  padding-inline: var(--landing-gutter);
}

/* --- head row: title + intro on the right, "shop" button on the left --- */
.landing-products__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: clamp(20px, 2.6vw, 32px);
}
.landing-products__heading { min-width: 0; }

.landing-products h2.landing-products__title {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.125rem);
  font-weight: 800;
  line-height: 1.5;
  color: var(--landing-navy);
}
.landing-products h2.landing-products__title::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  margin-top: 10px;
  border-radius: 2px;
  background: var(--landing-yellow);
}
.landing-products p.landing-products__lead {
  margin: 0;
  font-size: .95rem;
  line-height: 1.9;
  color: var(--landing-text-soft);
}

.landing-products a.landing-products__all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  border: 2px solid var(--landing-yellow);
  border-radius: 8px;
  background: var(--landing-yellow);
  color: var(--landing-navy);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.landing-products a.landing-products__all svg { width: 20px; height: 20px; flex: none; }
.landing-products a.landing-products__all:hover,
.landing-products a.landing-products__all:focus-visible { background: var(--landing-navy); border-color: var(--landing-navy); color: var(--landing-white); }
.landing-products a.landing-products__all:focus-visible { outline: 3px solid var(--landing-navy); outline-offset: 3px; }

/* --- slider (same mechanics as landing_projects) --- */
.landing-products__viewport { position: relative; }
.landing-products__track {
  display: flex;
  gap: var(--slide-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-block: 4px 8px;
}
.landing-products__track::-webkit-scrollbar { display: none; }
.landing-products__track:focus-visible { outline: 3px solid var(--landing-navy); outline-offset: 4px; }
.landing-products__slide {
  display: flex;
  flex: 0 0 var(--slide-w);
  min-width: 0;
  scroll-snap-align: start;
}

.landing-products__arrow {
  position: absolute;
  top: calc(50% - 22px);
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--landing-navy);
  border-radius: 50%;
  background: var(--landing-white);
  color: var(--landing-navy);
  box-shadow: 0 10px 24px -12px rgba(12, 31, 56, .55);
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, opacity .2s ease;
}
.landing-products__arrow svg { width: 22px; height: 22px; }
.landing-products__arrow--prev { inset-inline-start: -22px; }
.landing-products__arrow--next { inset-inline-end: -22px; }
.landing-products__arrow:hover,
.landing-products__arrow:focus-visible { background: var(--landing-yellow); border-color: var(--landing-yellow); }
.landing-products__arrow:focus-visible { outline: 3px solid var(--landing-navy); outline-offset: 3px; }
.landing-products__arrow:disabled { opacity: .35; cursor: default; pointer-events: none; }
.landing-products:not(.is-scrollable) .landing-products__arrow { display: none; }

/* ===== Product card (fields taken from shop-card.php: image, title, SKU, unit)
   No price, no add-to-cart button — this landing page doesn't show prices. ===== */
.landing-products .woo-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--landing-white);
  border: 1px solid #e5e7eb;
  border-top: 3px solid var(--landing-yellow);
  border-radius: 8px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.landing-products .woo-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .12);
}

.landing-products .woo-product-link {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  text-decoration: none;
  color: inherit;
}

.landing-products .woo-product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 4px 10px;
  font-size: .75rem;
  font-weight: 700;
  border-radius: 4px;
  background: #ef4444;
  color: #fff;
}

.landing-products .woo-product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--landing-gray);
}
.landing-products .woo-product-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.landing-products .woo-product-card:hover .woo-product-image img { transform: scale(1.05); }

.landing-products .woo-product-info {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 6px;
  padding: 16px;
}

.landing-products .woo-product-cat {
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--landing-gray);
  color: var(--landing-text-soft);
  font-size: .75rem;
  line-height: 1.9;
}

.landing-products .woo-product-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.6;
  color: var(--landing-navy);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.landing-products .woo-product-sku,
.landing-products .woo-product-unit {
  font-size: .85rem;
  color: var(--landing-text-soft);
}

.landing-products .woo-product-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--landing-navy);
}
.landing-products .woo-product-more svg { width: 16px; height: 16px; flex: none; transition: transform .2s ease; }
.landing-products .woo-product-card:hover .woo-product-more svg { transform: translateX(-4px); }

/* last slide: go to shop */
.landing-products a.landing-products__end {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 24px;
  background: var(--landing-navy);
  color: var(--landing-white);
  text-align: center;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.landing-products a.landing-products__end:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(0, 0, 0, .12); }
.landing-products a.landing-products__end:focus-visible { outline: 3px solid var(--landing-yellow); outline-offset: 3px; }
.landing-products__end-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--landing-yellow);
  color: var(--landing-navy);
}
.landing-products__end-icon svg { width: 24px; height: 24px; }
.landing-products span.landing-products__end-title { font-size: 1.0625rem; font-weight: 800; line-height: 1.6; }
.landing-products span.landing-products__end-text { font-size: .875rem; line-height: 1.8; color: rgba(255, 255, 255, .72); }

@media (max-width: 1200px) {
  .landing-products { --slide-w: 240px; }
  .landing-products__arrow--prev { inset-inline-start: -14px; }
  .landing-products__arrow--next { inset-inline-end: -14px; }
}
@media (max-width: 600px) {
  .landing-products { --slide-w: 68%; --slide-gap: 14px; }
  .landing-products a.landing-products__all { width: 100%; justify-content: center; }
  .landing-products__arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .landing-products__arrow,
  .landing-products a.landing-products__all,
  .landing-products a.landing-products__end,
  .landing-products .woo-product-card,
  .landing-products .woo-product-image img,
  .landing-products .woo-product-more svg { transition: none; }
  .landing-products a.landing-products__end:hover,
  .landing-products .woo-product-card:hover { transform: none; }
}
