/*!
 * Location: /assets/css/recently-added.css
 * Purpose:
 * - Home section styling for: /template-parts/home/recently-added.php
 * - Same layout/spacing as Onsale Showcase (header + grid),
 *   but WITHOUT badge/timer styles (Recently Added has no timer/badge).
 *
 * Related PHP:
 * - /template-parts/home/recently-added.php
 *
 * Related CSS:
 * - Works alongside: /assets/css/product-loop.css (cards)
 *
 * Linkage/Loader:
 * - Enqueue ONLY on front page via: /inc/enqueue.php
 *   handle suggestion: 'hdaf-recently-added' => assets/css/recently-added.css
 *
 * @package HyperDAF
 */

/* =========================
   Section base + spacing
========================= */
.hdaf-recent.hdaf-ps-section {
  padding: 26px 0 10px;
}

.hdaf-recent .hdaf-recent__inner {
  overflow-x: hidden; /* hard safety against accidental horizontal scroll */
}

/* =========================
   Header (Product Showcase style)
========================= */
.hdaf-recent .hdaf-ps-head.hdaf-recent__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
}

.hdaf-recent .hdaf-ps-head-left {
  min-width: 0;
}

.hdaf-recent .hdaf-ps-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hdaf-recent .hdaf-ps-viewall {
  flex: 0 0 auto;
  margin-top: 4px;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.hdaf-recent .hdaf-ps-viewall:hover,
.hdaf-recent .hdaf-ps-viewall:focus {
  text-decoration: underline;
}

/* =========================
   Products grid wrapper
========================= */
.hdaf-recent ul.products.hdaf-recent__products {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

/* Remove any floats from legacy Woo styles inside this section */
.hdaf-recent ul.products.hdaf-recent__products::before,
.hdaf-recent ul.products.hdaf-recent__products::after {
  content: none !important;
}

/* Ensure items don’t force overflow */
.hdaf-recent ul.products.hdaf-recent__products > li.product {
  min-width: 0;
}

/* =========================
   Responsive columns
========================= */
@media (max-width: 1200px) {
  .hdaf-recent ul.products.hdaf-recent__products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hdaf-recent .hdaf-ps-head.hdaf-recent__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hdaf-recent .hdaf-ps-viewall {
    margin-top: 8px;
  }

  .hdaf-recent ul.products.hdaf-recent__products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 520px) {
  .hdaf-recent .hdaf-ps-title {
    font-size: 20px;
  }

  .hdaf-recent ul.products.hdaf-recent__products {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.hdaf-recent__subtitle {
  margin: 6px 0 0;
  max-width: 760px;
  color: rgba(15, 23, 42, .68);
  font-size: 14px;
  line-height: 1.5;
}
