/* Product grid/card + catalog filter styles. Loaded by index.njk (featured products) and products.njk (full catalog). */

  /* ============================================================
     8. PRODUCTS
  ============================================================ */
  .products { background: var(--c-paper); }

  .product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
  }
  @media (min-width: 720px)  { .product-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (min-width: 1040px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }

  .product-card {
    background: var(--c-cream);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  }
  .product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-soft); }

  .product-media {
    position: relative;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .product-media .icon-figure { width: 108px; height: 122px; }
  .product-media .icon-figure .icon { width: 100%; height: 100%; }

  /* Uploaded product photo — shown in full inside the media area, never
     cropped. object-fit: contain scales the whole image down to fit the
     box (letterboxed on whichever axis doesn't match the box's aspect
     ratio); the card's own background (cream, or the honey/coconut/mustard
     gradient) shows through any letterboxing so it still looks intentional
     rather than like empty space. A little padding keeps the photo off
     the card edges. Falls back to the SVG icon via onerror in the
     template. */
  .product-media .product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 14px;
    box-sizing: border-box;
    border-radius: 8px;
    display: block;
  }

  .product-media--honey   { background: linear-gradient(165deg, var(--c-honey-soft), var(--c-sand) 140%); }
  .product-media--honey .icon-figure { color: var(--c-forest); }
  .product-media--coconut { background: linear-gradient(165deg, var(--c-moss-light), var(--c-sage) 140%); }
  .product-media--coconut .icon-figure { color: var(--c-olive); }
  .product-media--mustard { background: linear-gradient(165deg, var(--c-forest), var(--c-olive) 140%); }
  .product-media--mustard .icon-figure { color: var(--c-honey-light); }
  .product-badge.is-mustard { background: var(--c-cream-ink); color: var(--c-olive-dark); }

  .product-badge {
    position: absolute;
    top: 16px; left: 16px;
    background: #5F8040;
    color: #FFFFFF;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
  }
  .product-badge.is-honey { background: var(--c-honey); color: var(--c-olive-dark); }

  .product-body {
    padding: 26px 26px 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
  }
  .product-body h3 { 
    font-size: 1.28rem; 
    line-height: 1.3;
    min-height: 3.4rem; /* Exactly matches 2 lines of text height */
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
  }
  .product-body p { 
    font-size: 0.92rem; 
    line-height: 1.5; 
    min-height: 4.5rem; /* Exactly matches 3 lines of text height */
    margin-bottom: 12px;
  }

  .size-pills { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    min-height: 38px; 
    margin-top: auto; 
    margin-bottom: 16px;
  }
  .size-pill {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--c-line);
    color: var(--c-ink-soft);
    transition: all .2s var(--ease);
  }
  .size-pill:hover { border-color: var(--c-moss); }
  .size-pill[aria-pressed="true"] {
    background: var(--c-forest);
    border-color: var(--c-forest);
    color: var(--c-cream);
  }

  .product-footer {
    padding-top: 16px;
    border-top: 1px solid var(--c-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .product-price { display: flex; flex-direction: column; }
  .product-price .label { font-size: 0.7rem; color: var(--c-ink-soft); text-transform: uppercase; letter-spacing: 0.08em; }
  .product-price .amount { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-display); font-size: 1.32rem; font-weight: 600; color: var(--c-olive); }

  /* Groups "Buy Now" + the icon-only "Add to Cart" button together
     on the right of the footer, so .product-footer keeps its two-end
     space-between layout regardless of how many action buttons it has. */
  .product-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

  /* Icon-only "Add to Cart" button — a secondary action next to the
     primary "Buy Now" CTA. Adds the item to the shared cart (cart.js)
     without navigating away from the page. */
  .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--c-line);
    color: var(--c-olive);
    background: transparent;
    transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
  }
  .btn-icon:hover { border-color: var(--c-forest); background: rgba(84,105,63,0.06); }
  .btn-icon .icon { width: 18px; height: 18px; }
  .btn-icon .icon-cart-added { display: none; }
  /* Brief "added!" confirmation state, toggled for ~0.9s by script.js
     after a successful add-to-cart click. */
  .add-to-cart-btn.is-added {
    border-color: var(--c-forest);
    background: var(--c-forest);
    color: var(--c-cream);
  }
  .add-to-cart-btn.is-added .icon-cart-default { display: none; }
  .add-to-cart-btn.is-added .icon-cart-added { display: inline-flex; }

  /* On-sale pricing: original price shown struck through next to the
     active sale price. Toggled per size by script.js (reads
     data-original / data-price on the pressed .size-pill). Hidden by
     default — only appears when a pill carries data-original. */
  .price-original {
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--c-ink-soft);
    text-decoration: line-through;
  }
  .price-original[hidden] { display: none; }
  .price-value.is-sale { color: var(--c-sale); }

  /* "Sale" product badge — same shape as .product-badge, sale palette. */
  .product-badge.is-sale { background: var(--c-sale); color: var(--c-cream); }

  /* "See All Products" link under the homepage's featured/sale grid —
     keeps the full catalog one click away without crowding the section. */
  .products-more {
    margin-top: 44px;
    text-align: center;
  }

  /* ============================================================
     8B. PAGE BANNER (sub-pages, e.g. products.html)
     Compact hero used at the top of pages that aren't the homepage.
     Light cream theme — matches the homepage hero so branding stays
     consistent across the whole site (no dark "forked theme" look).
  ============================================================ */
  .page-banner {
    position: relative;
    background: var(--c-cream);
    overflow: hidden;
    padding: 64px 0 56px;
    text-align: center;
  }
  .page-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, var(--c-stone) 1.3px, transparent 1.3px);
    background-size: 28px 28px;
    opacity: 0.35;
    -webkit-mask-image: linear-gradient(to bottom, black, transparent 75%);
    mask-image: linear-gradient(to bottom, black, transparent 75%);
    pointer-events: none;
  }
  .page-banner .container { position: relative; }
  .page-banner .eyebrow { justify-content: center; color: var(--c-honey); }
  .page-banner h1 {
    color: var(--c-ink);
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 10px;
  }
  .page-banner p {
    color: var(--c-ink-soft);
    max-width: 56ch;
    margin: 0 auto;
  }
  .page-banner-crumb {
    margin-top: 18px;
    font-size: 0.85rem;
  }
  .page-banner-crumb a { color: var(--c-forest); font-weight: 600; }
  .page-banner-crumb a:hover { text-decoration: underline; }
  .page-banner-crumb span { color: var(--c-ink-soft); opacity: 0.6; padding: 0 6px; }

  /* Simple category filter pills at the top of the full catalog page. */
  .catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 44px;
  }
  .catalog-filter {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--c-line);
    color: var(--c-ink-soft);
    background: var(--c-cream);
    transition: all .2s var(--ease);
  }
  .catalog-filter:hover { border-color: var(--c-moss); }
  .catalog-filter.is-active {
    background: var(--c-forest);
    border-color: var(--c-forest);
    color: var(--c-cream);
  }

