/* Herba Rise — compact product cards (Furn Fawz style) on phones and tablets.
   Loaded once by includes/components/product-card.php. */
.product-card { display: flex; flex-direction: column; }
.product-card__body { display: flex; flex-direction: column; flex: 1 1 auto; }
.product-card__footer { margin-top: auto; }
/* Desktop keeps the hover overlay; the inline Add pill is for touch/small screens. */
.product-card__add { display: none; }

@media (max-width: 1024px), (hover: none), (pointer: coarse) {
  .product-card__actions { display: none; }
  .product-card__image-wrap { aspect-ratio: 4 / 3.4; }
  .product-card__body { padding: 0.8rem 0.85rem 0.85rem; }
  .product-card__title { font-size: 0.95rem; margin-bottom: 0.25rem; }
  .product-card__title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
  .product-card { position: relative; }
  .product-card__desc { font-size: 0.78rem; line-height: 1.4; margin-bottom: 0.4rem; }
  .product-card__meta { margin-bottom: 0.55rem; }
  .product-card__footer {
    flex-wrap: nowrap;
    padding-top: 0.6rem;
    border-top: 1px solid var(--color-border, rgba(0,0,0,0.08));
  }
  .product-card__price { font-size: 1rem; white-space: nowrap; }
  .product-card__footer .stock-badge { display: none; }
  .product-card__add {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 0.85rem;
    border: 0;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
  }
  .product-card__add:active { transform: scale(0.96); }
  .product-card__add:hover { background: var(--color-primary-light); }
  .product-card__add.is-loading { opacity: 0.8; }
  .product-badge, .product-card__image-wrap a { position: relative; z-index: 2; }
  .product-badge { position: absolute; }
}

/* Two cards per row on phones instead of one screen-tall card. */
@media (max-width: 480px) {
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .product-card__body { padding: 0.7rem 0.7rem 0.75rem; }
  .product-card__title { font-size: 0.88rem; line-height: 1.25; }
  .product-card__desc { font-size: 0.74rem; }
  .product-card__meta .stars { font-size: 0.74rem; }
  .product-card__price { font-size: 0.92rem; }
  .product-card__add { min-height: 34px; padding: 0 0.7rem; font-size: 0.78rem; }
}
@media (max-width: 350px) {
  .product-card__add span { display: none; }
  .product-card__add { width: 34px; padding: 0; }
}

/* Phones: buttons and filters side by side instead of stacked full-width. */
@media (max-width: 480px) {
  .hero__actions { flex-direction: row !important; flex-wrap: nowrap; gap: 0.6rem; width: 100%; }
  .hero__actions .btn { flex: 1 1 0; width: auto; min-width: 0; padding-left: 0.6rem; padding-right: 0.6rem; white-space: nowrap; }
  .shop-filters { display: flex !important; flex-wrap: wrap; gap: 0.5rem; }
  .shop-filters .filter-btn { flex: 1 1 auto; width: auto; min-width: 0; }
}
