/* ==========================================================================
   Lumamed — catalogue category pages (HikaShop override html/com_hikashop/category/listing.php)
   Builds on css/lumamed-product.css (.lm-product base, breadcrumb, buttons) and the tokens in css/custom.css.
   Reference: assets/mockups/produse-2.png.  Classes are prefixed lmc-.
   ========================================================================== */

.lmc { --lmc-radius: 12px; }
.lmc a { text-decoration: none; }
.lmc .lmc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- hero ---- */
/* v3 GL3: the banner fills the first screen = viewport minus the header (top bar + header = --lmc-hdr, 108px; js/lumamed-product.js measures the real
   offset). 100vh first, 100svh where supported (mobile browser chrome), never shorter than 380px so the text always fits (375x667 -> ~559px).
   v3 GL1: no side gaps - the hero is a direct, un-padded child of the page wrapper (see #sp-main-body:has(.lm-product) in lumamed-product.css). */
.lmc { --lmc-hdr: 109px; }
@media (max-width: 575.98px) { .lmc { --lmc-hdr: 153px; } } /* phones: the top bar stacks on 3 lines (fallback only, JS measures the real value) */
.lmc-hero { position: relative; isolation: isolate; display: flex; align-items: center; width: 100%; margin: 0; min-height: 380px; min-height: max(380px, calc(100vh - var(--lmc-hdr))); min-height: max(380px, calc(100svh - var(--lmc-hdr))); color: #fff; background: var(--lmc-hero) 70% center / cover no-repeat, var(--lm-green-900); }
.lmc-hero__cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid rgba(255, 255, 255, .85); border-radius: 50%; background: rgba(6, 77, 39, .35); color: #fff; transition: background-color .15s, transform .15s; }
.lmc-hero__cue:hover { background: rgba(6, 77, 39, .7); transform: translateX(-50%) translateY(2px); }
.lmc-hero__cue:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.lmc-hero__cue svg { animation: lmc-bob 2.2s ease-in-out infinite; }
@keyframes lmc-bob { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(3px); } }
.lm-breadcrumb { scroll-margin-top: 72px; }
.lmc-hero::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(6, 77, 39, .95) 0%, rgba(6, 77, 39, .86) 32%, rgba(6, 77, 39, .45) 58%, rgba(6, 77, 39, 0) 82%); }
.lmc-hero__inner { width: 100%; max-width: var(--lm-container); margin: 0 auto; padding: 56px var(--lm-gutter); }
.lmc .lmc-hero__eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; color: #fff; opacity: .92; }
.lmc .lmc-hero__title { margin: 0; max-width: 640px; font-size: clamp(34px, 4vw, 54px); line-height: 1.1; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.lmc .lmc-hero__title::after { content: ""; display: block; width: 56px; height: 3px; margin: 20px 0 18px; background: var(--lm-green-500); }
.lmc .lmc-hero__line { margin: 0; max-width: 520px; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.5; color: #fff; }

/* ---- content wrapper ---- */
.lmc-wrap { max-width: var(--lm-container); margin: 0 auto; padding: 32px var(--lm-gutter) 56px; }

/* ---- category pills ---- */
.lmc-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.lmc-pill { display: inline-flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 18px 0 8px; border: 1.5px solid var(--lm-border); border-radius: 999px; background: var(--lm-white); color: var(--lm-ink); font-size: 15px; font-weight: 600; line-height: 1.2; transition: border-color .15s, background-color .15s, color .15s; }
.lmc-pill--all { padding-left: 18px; color: var(--lm-green-700); }
.lmc-pill__num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--lm-green-100); color: var(--lm-green-800); font-size: 12px; font-weight: 700; }
.lmc-pill:hover { border-color: var(--lm-green-600); background: var(--lm-green-50); color: var(--lm-green-900); }
.lmc-pill.is-active { border-color: var(--lm-green-800); background: var(--lm-green-800); color: #fff; }
.lmc-pill.is-active .lmc-pill__num { background: rgba(255, 255, 255, .18); color: #fff; }
.lmc-pill:focus-visible, .lmc-card__link:focus-visible, .lmc-group__head:focus-visible, .lmc-group__title a:focus-visible, .lmc-sub__title a:focus-visible, .lmc-cta__btn:focus-visible { outline: 3px solid var(--lm-green-500); outline-offset: 2px; }

.lmc .lmc-lead { margin: 0 0 18px; font-size: 16px; color: var(--lm-muted); }
.lmc-count { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--lm-green-700); }

/* ---- panel (products without sub-groups) ---- */
.lmc-panel { padding: 24px; background: var(--lm-green-50); border: 1px solid var(--lm-border); border-radius: var(--lmc-radius); }

/* ---- collapsible group (sub-category) ---- */
.lmc-group { margin: 0 0 24px; background: var(--lm-green-50); border: 1px solid var(--lm-border); border-radius: var(--lmc-radius); overflow: hidden; }
.lmc-group__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; min-height: 104px; padding: 20px 28px; list-style: none; cursor: pointer;
  background: linear-gradient(90deg, var(--lm-green-50) 0%, var(--lm-green-50) 38%, rgba(243, 249, 244, .55) 62%, rgba(243, 249, 244, 0) 100%), var(--lmc-strip) right center / cover no-repeat, var(--lm-green-50); }
.lmc-group__head::-webkit-details-marker { display: none; }
.lmc-group__head::marker { content: ""; }
.lmc-group__num { font-size: clamp(36px, 4vw, 52px); line-height: 1; font-weight: 700; color: var(--lm-green-700); opacity: .85; letter-spacing: -.02em; min-width: 1.6em; }
.lmc-group__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lmc .lmc-group__title { font-size: clamp(18px, 2vw, 24px); line-height: 1.2; font-weight: 700; color: var(--lm-green-800); text-transform: uppercase; letter-spacing: .01em; }
.lmc .lmc-group__title a { color: inherit; }
.lmc .lmc-group__title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lmc-group__line { font-size: 15px; line-height: 1.45; color: var(--lm-ink); max-width: 560px; }
.lmc-group__toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 1.5px solid var(--lm-green-700); border-radius: 6px; background: var(--lm-white); color: var(--lm-green-800); font-size: 15px; font-weight: 600; white-space: nowrap; transition: background-color .15s; }
.lmc-group__head:hover .lmc-group__toggle { background: var(--lm-green-100); }
.lmc-chev { transition: transform .2s ease; }
.lmc-group:not([open]) .lmc-chev { transform: rotate(180deg); }
.lmc-group[open] .lmc-t-closed, .lmc-group:not([open]) .lmc-t-open { display: none; }
.lmc-group__body { padding: 8px 28px 28px; }

/* ---- sub-sections inside a group ---- */
.lmc-sub { margin-top: 28px; }
.lmc-group__body > .lmc-sub:first-child { margin-top: 12px; }
.lmc-grid + .lmc-sub { margin-top: 34px; }
.lmc .lmc-sub__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 4px; padding-left: 14px; border-left: 4px solid var(--lm-green-500); font-size: 20px; line-height: 1.25; font-weight: 700; color: var(--lm-ink); }
.lmc .lmc-sub__title a { color: var(--lm-ink); }
.lmc .lmc-sub__title a:hover { color: var(--lm-green-800); text-decoration: underline; text-underline-offset: 3px; }
.lmc .lmc-sub__line { margin: 0 0 14px 18px; font-size: 15px; color: var(--lm-muted); }
.lmc .lmc-sub .lmc-sub { margin-left: 18px; }
.lmc .lmc-sub__title + .lmc-grid, .lmc .lmc-sub__title + .lmc-sub__line + .lmc-grid { margin-top: 14px; }

/* ---- product cards ---- */
.lmc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.lmc-card { background: var(--lm-white); border: 1px solid var(--lm-border); border-radius: 10px; transition: box-shadow .15s, border-color .15s, transform .15s; }
.lmc-card:hover { border-color: var(--lm-green-600); box-shadow: 0 10px 26px rgba(6, 77, 39, .12); transform: translateY(-2px); }
.lmc .lmc-card__link { position: relative; display: flex; flex-direction: column; height: 100%; padding: 14px 14px 18px; color: var(--lm-ink); }
/* v2.1 rule D: same uniform 1:1 white box as the product gallery; image centered, contain, never upscaled past its natural size */
.lmc-card__img { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; margin-bottom: 14px; background: #fff; border: 1px solid var(--lm-border); border-radius: 8px; overflow: hidden; }
.lmc-card__img img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.lmc-card__img.is-empty { background: #fff; }
.lmc-card__img.is-empty img { width: 52%; height: auto; opacity: .5; object-fit: contain; }
.lmc-card__body { display: flex; flex-direction: column; gap: 4px; padding-right: 52px; min-height: 76px; }
.lmc-card__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lm-green-700); }
.lmc-card__name { font-size: 17px; line-height: 1.3; font-weight: 700; color: var(--lm-ink); overflow-wrap: break-word; }
.lmc-card__line { font-size: 14px; line-height: 1.45; color: var(--lm-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lmc-card__go { position: absolute; right: 14px; bottom: 16px; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1.5px solid var(--lm-green-700); border-radius: 50%; background: var(--lm-white); color: var(--lm-green-700); transition: background-color .15s, color .15s; }
.lmc-card:hover .lmc-card__go { background: var(--lm-green-700); color: #fff; }

/* ---- empty state ---- */
.lmc-empty { padding: 40px 24px; text-align: center; background: var(--lm-green-50); border: 1px solid var(--lm-border); border-radius: var(--lmc-radius); }
.lmc .lmc-empty p { margin: 0 0 18px; font-size: 18px; color: var(--lm-ink); }

/* ---- contact band ---- */
/* v3 GL4: emerald-wave background (images/lumamed/v3/emerald-wave.webp via --lmc-wave set in lumamed/infoband.php), full-bleed.
   The wave has bright highlights, so a dark-green scrim keeps the white text AA: >= 6:1 for 99% of the pixels behind the text, <0.01% under 3:1
   (measured on the image at 375 / 820 / 1440 / 1920 px wide; the heading is large text, 3:1 is its AA limit). Fallback colour = the former flat green. */
.lmc-cta { position: relative; isolation: isolate; width: 100%; background: var(--lmc-wave, none) center / cover no-repeat, var(--lm-green-900); color: #fff; }
.lmc-cta::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(6, 77, 39, .52) 0%, rgba(6, 77, 39, .4) 55%, rgba(6, 77, 39, .12) 100%); }
.lmc-cta__inner { display: flex; align-items: center; gap: 28px; max-width: var(--lm-container); margin: 0 auto; padding: 34px var(--lm-gutter); }
.lmc-cta__icon { flex: 0 0 74px; width: 74px; height: 74px; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid rgba(255, 255, 255, .7); border-radius: 50%; color: #fff; }
.lmc-cta__text { flex: 1 1 auto; min-width: 0; }
.lmc .lmc-cta__text h2 { margin: 0 0 4px; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.lmc .lmc-cta__text p { margin: 0; font-size: 16px; line-height: 1.5; color: #fff; max-width: 560px; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.lmc .lmc-cta__btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 30px; border-radius: 8px; background: var(--lm-green-700); color: #fff; font-size: 17px; font-weight: 600; transition: background-color .15s; }
.lmc .lmc-cta__btn:hover { background: var(--lm-green-800); color: #fff; }

/* ---- responsive ---- */
@media (max-width: 991.98px) {
  .lmc-hero__inner { padding: 44px var(--pad); }
  .lmc-wrap { padding: 24px var(--pad) 44px; }
  .lmc-group__head { padding: 18px 20px; gap: 16px; }
  .lmc-group__body { padding: 4px 20px 22px; }
  .lmc-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 767.98px) {
  .lmc-hero { background-position: 76% center; }
  .lmc-hero::before { background: linear-gradient(180deg, rgba(6, 77, 39, .92) 0%, rgba(6, 77, 39, .84) 48%, rgba(6, 77, 39, .55) 100%); } /* readable text on top, photo shows through at the bottom */
  .lmc-hero__inner { padding: 36px var(--pad) 96px; }  /* bottom room for the scroll cue */
  .lmc-cta::before { background: rgba(6, 77, 39, .56); }
  .lmc .lmc-hero__title::after { margin: 16px 0 14px; }
  .lmc-pills { flex-wrap: nowrap; overflow-x: auto; margin-left: calc(var(--pad) * -1); margin-right: calc(var(--pad) * -1); padding: 2px var(--pad) 8px; scrollbar-width: none; }
  .lmc-pills::-webkit-scrollbar { display: none; }
  .lmc-pill { flex: 0 0 auto; }
  .lmc-group__head { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "text toggle"; }
  .lmc-group__num { display: none; }
  .lmc-group__head { background: linear-gradient(90deg, var(--lm-green-50) 0%, var(--lm-green-50) 70%, rgba(243, 249, 244, .75) 100%), var(--lmc-strip) right center / cover no-repeat, var(--lm-green-50); min-height: 0; }
  .lmc-group__toggle { min-height: 40px; padding: 0 12px; }
  .lmc-group__toggle > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lmc-group__line { font-size: 14px; }
  .lmc-panel { padding: 16px; }
  .lmc .lmc-sub .lmc-sub { margin-left: 0; }
  .lmc-cta__inner { flex-direction: column; align-items: flex-start; gap: 18px; padding: 30px var(--pad) 34px; }
  .lmc-cta__icon { flex-basis: 60px; width: 60px; height: 60px; }
  .lmc .lmc-cta__btn { width: 100%; justify-content: center; }
}
@media (max-width: 575.98px) {
  .lmc-grid { grid-template-columns: 1fr; gap: 12px; }
  .lmc .lmc-card__link { flex-direction: row; align-items: center; gap: 14px; padding: 10px 12px 10px 10px; }
  .lmc-card__img { flex: 0 0 88px; width: 88px; aspect-ratio: 1; margin: 0; }
  .lmc-card__body { flex: 1 1 auto; min-width: 0; min-height: 0; padding-right: 44px; }
  .lmc-card__name { font-size: 16px; }
  .lmc-card__go { right: 10px; bottom: 50%; transform: translateY(50%); width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) { .lmc * { transition: none !important; animation: none !important; } .lmc-card:hover { transform: none; } }
