/* =========================================================
   product.css  —  product cards, price, filters, variation rows, wishlist heart
   Needs: lb-base.css (tokens)
   Markup:  <div class="grid"> <div class="pcard"> .pcard__img / .pcard__body / .pcard__foot
   ========================================================= */

/* ---------- Product grid + card ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); padding-bottom: 20px; }
.pcard {
  background: var(--card); border-radius: var(--r-md); overflow: hidden; text-align: left;
  display: flex; flex-direction: column; box-shadow: var(--shadow-1); width: 100%;
  transition: transform .2s, box-shadow .2s;
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.pcard__img { position: relative; width: 100%; height: 190px; min-height: 190px; max-height: 190px; background: var(--leaf-100); overflow: hidden; }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s; }
.pcard:hover .pcard__img img { transform: scale(1.06); }
.pcard__status { position: absolute; right: 10px; top: 10px; border-radius: 999px; padding: 4px 8px; font-size: 10px; font-weight: 800; background: rgba(255,255,255,.95); z-index: 1; }
.pcard__status--open { color: #16834a; }
.pcard__status--closed { color: var(--chili); }
.pcard__off { position: absolute; left: 0; top: 12px; background: var(--chili); color: #fff; font-weight: 700; font-size: 12px; padding: 4px 10px 4px 8px; border-radius: 0 999px 999px 0; }
.veg { position: absolute; right: 10px; top: 10px; width: 20px; height: 20px; border-radius: 4px; background: #fff; border: 2px solid #1b9a4b; display: grid; place-items: center; }
.veg::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #1b9a4b; }
.veg--non { border-color: var(--chili); }
.veg--non::after { background: var(--chili); }
.pcard__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard__restaurant { display: block; width: 100%; max-width: 100%; min-height: 18px; margin-bottom: 4px; font-size: 12px; font-weight: 800; color: var(--leaf); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard__cat { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.pcard__title { font-size: 15px; font-weight: 700; font-family: var(--font-head); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.3em; }
.pcard__foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pcard__cta { background: var(--leaf-100); color: var(--leaf-700); font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 999px; transition: background .15s, color .15s; }
.pcard:hover .pcard__cta { background: var(--leaf-700); color: #fff; }
.skel--card { height: 290px; }

/* ---------- Price ---------- */
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; }
.price__from { font-size: 11px; color: var(--ink-3); font-weight: 600; width: 100%; }
.price__now { font-size: 18px; font-weight: 800; font-family: var(--font-head); }
.price__was { font-size: 13px; color: var(--ink-3); text-decoration: line-through; }

/* ---------- Wishlist heart (on .pcard__img) ---------- */
.lb-wishlist-btn {
  position: absolute; right: 10px; top: 10px; z-index: 3;
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: #fff; color: #d64545; box-shadow: 0 2px 10px rgba(0, 0, 0, .14);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; transition: transform .15s, background .15s;
}
.lb-wishlist-btn:hover { transform: scale(1.06); }
.lb-wishlist-btn[aria-pressed="true"] { background: #fff0f0; color: #d71920; }
.lb-wishlist-btn:disabled { opacity: .65; cursor: wait; }

/* ---------- Variation rows (product modal) ---------- */
.vrow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  transition: border-color .15s, background .15s;
}
.vrow:hover { border-color: var(--leaf-600); background: #fafdfb; }
.vrow__name { font-weight: 700; }
.vrow__type { font-size: 12px; color: var(--ink-3); }
.vrow__right { display: flex; align-items: center; gap: 12px; }
.vrow .price__now { font-size: 17px; }
.vrow .btn { height: 36px; padding: 0 18px; font-size: 14px; }
.vrow .btn.is-done { background: var(--leaf-700); color: #fff; }

/* ---------- Price filter chips ---------- */
.price-filter-rail {
  display: flex; align-items: center; gap: 10px; overflow-x: auto;
  padding: 3px 2px 12px; margin: 0 0 8px; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.price-filter-rail::-webkit-scrollbar { display: none; }
.price-filter {
  flex: 0 0 auto; min-height: 40px; padding: 0 17px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2);
  font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow-1);
  transition: background .18s, color .18s, border-color .18s, transform .15s;
}
.price-filter:hover { border-color: var(--leaf-600); color: var(--leaf-700); }
.price-filter:active { transform: scale(.97); }
.price-filter.is-active { background: var(--leaf-700); border-color: var(--leaf-700); color: #fff; }

@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pcard__img { height: 145px; min-height: 145px; max-height: 145px; }
  .pcard__body { padding: 10px 11px 12px; }
  .pcard__title { font-size: 14px; }
  .pcard__restaurant { font-size: 11px; }
  .pcard__cta { display: none; }
  .price__now { font-size: 16px; }
  .price-filter-rail { gap: 8px; margin-bottom: 5px; }
  .price-filter { min-height: 38px; padding: 0 14px; font-size: 12px; }
}
