/* ============================================================
   Vala Fresh — Vegetables catalogue, BelOrta-style on white.
   Matched to the reference: floating cut-outs + synced ellipse
   shadow, script names, month/sort pills, in-grid accordion.
   Scoped under .veg-page so nothing leaks site-wide.
   ============================================================ */
.veg-page {
  --v-red: #D8423C;
  --v-green: #416B5F;
  --v-ink: #2D2926;
  --v-mut: #6b625c;
  --v-line: #ece7df;
  --v-bg: #ffffff;          /* Belorta uses cream; client asked for white */
  background: var(--v-bg);
  color: var(--v-ink);
  font-family: Inter, -apple-system, system-ui, sans-serif;
}
.veg-page * { box-sizing: border-box; }
.veg-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px 90px; }

/* ---- breadcrumb + hero ---- */
.veg-crumb { font-size: 13px; color: var(--v-mut); padding: 26px 0 4px; }
.veg-crumb a { color: var(--v-mut); text-decoration: none; }
.veg-crumb a:hover { color: var(--v-green); }
.veg-hero h1 {
  font-family: Chewy, "Comic Sans MS", cursive;
  font-weight: 400;
  font-size: clamp(48px, 7vw, 76px);
  line-height: 1;
  color: var(--v-ink);
  margin: 10px 0 18px;
  letter-spacing: .01em;
}
.veg-lede { max-width: 470px; font-size: 13.5px; line-height: 1.8; color: var(--v-mut); margin: 0 0 40px; }

/* ---- results + toolbar ---- */
.veg-res { font-size: 13px; color: var(--v-mut); margin: 0 0 12px; }
.veg-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 34px; position: relative; z-index: 6; }
.veg-dd { position: relative; }
.veg-dd summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; border-radius: 8px; padding: 12px 18px; user-select: none; }
.veg-dd summary::-webkit-details-marker { display: none; }
.veg-dd summary::after { content: "⌄"; font-size: 13px; line-height: 1; transform: translateY(-2px); }
.veg-dd-month summary { background: var(--v-ink); color: #fff; }
.veg-dd-sort summary { background: #F1EEE8; color: var(--v-ink); }
.veg-dd-sort summary::before { content: "☰"; font-size: 12px; }
.veg-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 190px; background: #fff;
  border: 1px solid var(--v-line); border-radius: 12px; box-shadow: 0 18px 40px -18px rgba(45, 41, 38, .3);
  padding: 8px; z-index: 9; max-height: 330px; overflow: auto; }
.veg-dd-sort .veg-menu { left: auto; right: 0; }
.veg-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit;
  font-size: 13.5px; color: var(--v-ink); padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.veg-menu button:hover { background: #F1EEE8; }
.veg-menu button.is-on { background: var(--v-ink); color: #fff; }

/* ---- grid (matched: auto-fill minmax(260px,1fr), gap 24) ---- */
.veg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }

/* ---- card = <details class="veg"> ---- */
details.veg { border: 0; padding: 18px 12px 22px; border-radius: 16px; text-align: center; background: transparent;
  opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1), background .3s; }
details.veg.is-in { opacity: 1; transform: none; }
details.veg summary { list-style: none; cursor: pointer; }
details.veg summary::-webkit-details-marker { display: none; }

/* floating product stage — exact reference values */
.prod { position: relative; width: 100%; height: 220px; display: flex; align-items: center; justify-content: center; }
.prod img { max-width: 200px; max-height: 200px; object-fit: contain;
  animation: vegfloat 3s ease-in-out infinite; will-change: transform;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .04)); }
.prod .shadow { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 18px; border-radius: 50%;
  background: radial-gradient(50% 50%, rgba(0, 0, 0, .24) 0, rgba(0, 0, 0, 0) 100%);
  animation: vegfloatshadow 3s ease-in-out infinite; }
@keyframes vegfloat { 0% { transform: translateY(0); } 50% { transform: translateY(-1.8rem); } 100% { transform: translateY(0); } }
@keyframes vegfloatshadow { 0% { width: 120px; opacity: .5; } 50% { width: 78px; opacity: .26; } 100% { width: 120px; opacity: .5; } }

details.veg h3 { font-family: Chewy, "Comic Sans MS", cursive; font-weight: 400;
  font-size: 27px; letter-spacing: .02em; color: var(--v-green); margin: 14px 0 0; transition: color .25s; }
details.veg summary:hover h3 { color: var(--v-red); }
details.veg summary:hover .prod img { transform: translateY(-6px); transition: transform .3s; animation-play-state: paused; }

/* open card expands in the grid — exact reference behaviour */
details.veg[open] { grid-column: 1 / -1; background: #FBFAF7; border: 1px solid var(--v-line); }
details.veg[open] .prod { height: 280px; }
details.veg[open] .prod img { max-width: 260px; max-height: 260px; }
details.veg[open] h3 { font-size: 34px; color: var(--v-ink); }
.veg-body { max-width: 640px; margin: 10px auto 0; text-align: center; }
.veg-body > p { font-size: 15px; line-height: 1.8; color: #4b453f; margin: 8px 0 0; }
.veg-meta { font-size: 13px; font-weight: 600; color: var(--v-green); margin: 16px 0 0 !important; }
.veg-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.veg-btn { display: inline-flex; align-items: center; font: inherit; font-size: 14px; font-weight: 700;
  border-radius: 999px; padding: 11px 22px; text-decoration: none; cursor: pointer; border: 0; transition: .2s; }
.veg-btn-g { background: var(--v-green); color: #fff; }
.veg-btn-g:hover { background: #34564C; }
.veg-btn-o { background: #fff; color: var(--v-ink); border: 1.5px solid var(--v-line); }
.veg-btn-o:hover { border-color: var(--v-ink); }

/* ---- pagination ---- */
.veg-pages { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 64px; }
.veg-pages button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #F1EEE8;
  color: var(--v-ink); font: 600 14px Inter, sans-serif; cursor: pointer; transition: .2s; }
.veg-pages button.is-on { background: var(--v-ink); color: #fff; }
.veg-pages button:hover:not(.is-on):not([disabled]) { background: #E5E0D7; }
.veg-pages button[disabled] { opacity: .35; cursor: default; }

.veg-empty, .veg-loading { padding: 60px 0; text-align: center; color: var(--v-mut); font-size: 15px; grid-column: 1/-1; }
.veg-skel { height: 265px; border-radius: 16px; background: #F5F3EE; animation: vegpulse 1.3s ease-in-out infinite; }
@keyframes vegpulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

@media (max-width: 640px) {
  .veg-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .prod { height: 160px; }
  .prod img { max-width: 140px; max-height: 140px; }
  details.veg h3 { font-size: 21px; }
  .veg-lede { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .prod img, .prod .shadow { animation: none !important; }
  details.veg { opacity: 1; transform: none; transition: none; }
}
