/* 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); }

  /* FIX-2 (image cropping): this box used to be a fixed height: 220px.
     The uploaded product photos are portrait (~3:4 — e.g. 385×512px),
     so a fixed-height box forced object-fit:cover to slice a large
     chunk off the top AND bottom of every bottle/jar to fill that box.
     Switching to aspect-ratio: 3 / 4 makes the box's own shape match
     the photos being uploaded, so object-fit:cover has nothing left to
     crop — the whole product is visible edge-to-edge, no chopped tops.
     RECOMMENDED UPLOAD RATIO: 3:4 portrait (e.g. 1200×1600px or
     900×1200px). Any photo shot in that ratio will show 100% of the
     product with zero cropping. A different ratio still won't break
     the layout (object-fit:cover + object-position:center gracefully
     crops from the edges only), it just won't be a perfect zero-crop
     fit like a native 3:4 shot is. */
  .product-media {
    position: relative;
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  .product-media .icon-figure { width: 108px; height: 122px; }
  .product-media .icon-figure .icon { width: 100%; height: 100%; }

  /* Uploaded product photo — fills the media area edge-to-edge. Because
     .product-media is now locked to the same 3:4 ratio recommended for
     uploads, a correctly-ratioed photo needs no cropping at all; cover +
     center keeps any off-ratio photo centered and gracefully trimmed
     rather than squashed. Falls back to the SVG icon via onerror in the
     template. */
  .product-media .product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    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 h3 a {
    color: inherit;
    text-decoration: none;
  }
  .product-body h3 a:hover,
  .product-body h3 a:focus-visible {
    text-decoration: underline;
  }
  .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;
  }

  /* NOTE: .page-banner / .page-banner-crumb moved to style.css (global
     stylesheet, loaded on every page) — see FIX-1 there. It used to live
     here in catalog.css, which is only loaded on products.html, so every
     other page using this banner (contact, blog, blog posts, and all 5
     policy pages) rendered it completely unstyled. Kept this note so
     nobody re-adds a duplicate copy here by accident. */

  /* 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);
  }

