/* =========================================================
   product_sheet.css  —  styles for /js/product_sheet.js
   Self-contained (own tokens), works on any page.
   ========================================================= */
.lb-ps {
  --ps-leaf-900: #0b3d2c; --ps-leaf-700: #0f5c3f; --ps-leaf-600: #138556; --ps-leaf-100: #e3f3ea;
  --ps-mango: #ffb81c; --ps-ink: #17211c; --ps-ink-2: #4a5a52; --ps-ink-3: #7c8b83; --ps-line: #e3e9e5;
  font-family: var(--font-body, "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);

  position: fixed; inset: 0;
  z-index: 100005;                      /* above header + cart; below the related-products sheet (100010) */
  display: none; align-items: center; justify-content: center; padding: 16px;
  background: rgba(8, 24, 18, .55); backdrop-filter: blur(3px);
}
.lb-ps *, .lb-ps *::before, .lb-ps *::after { box-sizing: border-box; }
.lb-ps.is-open { display: flex; animation: lbPsFade .2s ease; }
html.lb-ps-open { overflow: hidden; }

.lb-ps__sheet {
  width: min(100%, 560px); max-height: min(88vh, 760px);
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; color: var(--ps-ink); border-radius: 24px;
  box-shadow: 0 18px 50px rgba(8, 24, 18, .3);
  animation: lbPsPop .28s cubic-bezier(.2, .9, .3, 1.2);
}
.lb-ps__hero { position: relative; flex: none; height: clamp(200px, 38vw, 320px); background: var(--ps-leaf-100); }
.lb-ps__hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-ps__close {
  position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; background: #fff; color: var(--ps-ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15); font-size: 15px;
}
.lb-ps__head { padding: 16px 20px 6px; }
.lb-ps__head h3 {
  margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -.01em; font-weight: 800;
  font-family: var(--font-head, "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif);
}
.lb-ps__head p {
  margin: 6px 0 0; color: var(--ps-ink-2); font-size: 14px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.lb-ps__head p:empty { display: none; }
.lb-ps__label { padding: 10px 20px 4px; font-size: 14px; font-weight: 700; color: var(--ps-ink-2); }
.lb-ps__list { overflow-y: auto; overscroll-behavior: contain; padding: 6px 20px 20px; display: flex; flex-direction: column; gap: 10px; }

.lb-ps__row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1.5px solid var(--ps-line); border-radius: 16px;
  transition: border-color .15s, background .15s;
}
.lb-ps__row:hover { border-color: var(--ps-leaf-600); background: #fafdfb; }
.lb-ps__vname { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.lb-ps__vright { display: flex; align-items: center; gap: 12px; flex: none; }
.lb-ps__price { display: flex; align-items: baseline; gap: 8px; }
.lb-ps__price b { font-size: 17px; font-weight: 800; font-family: var(--font-head, "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif); }
.lb-ps__price s { font-size: 13px; color: var(--ps-ink-3); }
.lb-ps__add {
  height: 36px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700;
  background: var(--ps-mango); color: var(--ps-leaf-900);
  transition: filter .15s, transform .15s;
}
.lb-ps__add:hover { filter: brightness(1.05); }
.lb-ps__add:active { transform: scale(.97); }
.lb-ps__add:disabled { opacity: .6; cursor: wait; }
.lb-ps__add.is-done { background: var(--ps-leaf-700); color: #fff; }

.lb-ps__skel {
  height: 62px; border-radius: 16px;
  background: linear-gradient(100deg, #e8eeea 30%, #f4f7f5 50%, #e8eeea 70%); background-size: 200% 100%;
  animation: lbPsShimmer 1.3s infinite linear;
}
.lb-ps__msg { padding: 22px; text-align: center; color: var(--ps-ink-2); border: 1px dashed var(--ps-line); border-radius: 16px; }
.lb-ps :focus-visible { outline: 3px solid var(--ps-leaf-600); outline-offset: 2px; }

@keyframes lbPsFade { from { opacity: 0; } }
@keyframes lbPsPop { from { transform: translateY(24px) scale(.97); opacity: 0; } }
@keyframes lbPsUp { from { transform: translateY(100%); } }
@keyframes lbPsShimmer { to { background-position: -200% 0; } }

@media (max-width: 560px) {
  .lb-ps { align-items: flex-end; padding: 0; }
  .lb-ps__sheet { width: 100%; max-height: 90vh; border-radius: 24px 24px 0 0; animation: lbPsUp .3s ease; }
}
@media (prefers-reduced-motion: reduce) {
  .lb-ps.is-open, .lb-ps__sheet, .lb-ps__skel { animation: none; }
}
