/* Jocker Cuir — Boutique (B2C) mega menu. Global frontend component,
   loaded once, unconditionally, from the shared layout
   (resources/views/monsite/layouts/app.blade.php) so it styles the
   header identically on every page — same pattern as
   header-b2b-menu.css. Relies on the design tokens (--paper, --line,
   --serif, --cream, --olive, --ink) declared in :root by whichever
   page-specific stylesheet is also loaded — it does not redeclare them
   itself, same as header-b2b-menu.css.

   THIS FILE DELIBERATELY MIRRORS header-b2b-menu.css'S PROVEN SHELL,
   because that menu already renders correctly (full width, correct
   positioning, no overlap, responsive) and B2C kept breaking under a
   series of separately-invented layouts. B2C never shares B2B's actual
   classes or CSS rules (B2B is never modified, per the hard requirement
   that its markup/CSS stay untouched) — every .b2c-* selector below is
   its own independent copy of the same proven VALUES (position/
   transition mechanics, .container-based inner width, fixed-height
   overlay-title card treatment), scoped under .b2c-* the same way B2B's
   is scoped under .b2b-*. The two menus can now never affect each
   other, by construction, not by specificity tricks.

   WHY EARLIER B2C ATTEMPTS BROKE (root cause, now eliminated): every
   earlier revision kept the shared .mega/.has-menu classes (still used
   by nothing else on the site today, but originally meant for generic
   simple text-link dropdowns) for the panel's open/close mechanic. Every
   page stylesheet still defines, for that now-unused generic pattern:
     .mega a{display:block;padding:9px 8px;font-size:.84rem}
     .mega a:hover{background:var(--cream)}
   Those selectors (class+type, and class+type+:hover) carry higher
   specificity than a bare one-class card selector, so cards/CTA kept
   silently inheriting unwanted padding no matter how the card markup
   itself was redesigned — every fix had to fight that leak again. B2B
   never had this problem because it was never built on .mega/.has-menu
   in the first place (its own .b2b-nav-item:hover .b2b-mega-menu rule,
   see header-b2b-menu.css). This revision gives B2C that same
   independence: it no longer uses .mega/.has-menu anywhere, so it can
   never inherit anything from that legacy selector again — the .mega a
   leak class of bug is now structurally impossible for B2C, not just
   patched. */

.b2c-nav-item{display:flex;align-items:center}
.b2c-mega-menu{
  position:absolute;left:0;right:0;top:100%;
  background:var(--paper);border-top:1px solid var(--line);border-bottom:1px solid var(--line);
  opacity:0;visibility:hidden;transform:translateY(8px);
  transition:.2s ease;
}
/* :hover mirrors B2B's own :hover trigger exactly. :focus-within is
   B2C's addition on top (B2C has no separate click-to-toggle button
   like B2B's chevron — "Boutique" is a single link — so keyboard users
   opening it via Tab need the panel to stay visible for as long as
   focus is anywhere inside; see header-b2c-menu.js for the small amount
   of bookkeeping CSS alone can't do: Escape-to-close, aria-expanded). */
.b2c-nav-item:hover .b2c-mega-menu,
.b2c-nav-item:focus-within .b2c-mega-menu{opacity:1;visibility:visible;transform:none}

/* Explicit close button support: clicking/activating it should hide the
   panel immediately even though the mouse is still physically over it
   (still :hover) or focus just landed on the button itself (still
   :focus-within) — neither pure state alone would close under the rule
   above. header-b2c-menu.js toggles .is-force-closed on click/Enter/
   Space and clears it again the next time the mouse/focus genuinely
   leaves .b2c-nav-item, so hovering the trigger later still reopens it
   normally. Same specificity as the :hover/:focus-within rule above
   (3 classes each) — placed AFTER it in source order to win the tie,
   the standard CSS cascade mechanism, not a hack. */
.b2c-nav-item.is-force-closed .b2c-mega-menu{opacity:0;visibility:hidden;transform:translateY(8px)}

/* .container (shared token/utility class declared by whichever
   page-specific stylesheet is also loaded) supplies the centered
   max-width — the exact same mechanism B2B's own
   ".b2b-mega-menu__inner.container" already relies on. position:relative
   gives the close button below a positioning context aligned with the
   VISIBLE centered content's right edge, not the full-bleed panel's own
   (.b2c-mega-menu is already position:absolute, so it's already a valid
   containing block too — but anchoring to it would place the button at
   the far edge of the viewport on wide screens, past the actual grid). */
.b2c-mega-menu__inner{position:relative;padding:68px 0 28px}

/* Top-right close control — small, refined, high-contrast, no heavy
   fill/circle. padding-top above was raised from 28px to 68px
   specifically to reserve this control's breathing room so it never
   overlaps the first row of cards (38px button + 16px top offset + 14px
   clearance ≈ the extra 40px added). B2C only — B2B's own mega menu has
   no close button and this class never appears in its markup/CSS. */
.b2c-mega-menu__close{
  position:absolute;top:16px;right:0;
  display:inline-flex;align-items:center;justify-content:center;
  width:38px;height:38px;
  background:transparent;border:1px solid var(--line);
  color:var(--ink);cursor:pointer;
  transition:background .2s ease;
}
.b2c-mega-menu__close i{font-size:.85rem}
.b2c-mega-menu__close:hover{background:var(--cream)}
.b2c-mega-menu__close:focus-visible{outline:2px solid var(--olive);outline-offset:3px}

/* 3 columns × up to 2 rows — same fixed-height card mechanics as B2B's
   2-column grid (see .b2c-mega-card below), just one more column. Never
   more than 6 cards in the DOM: header.blade.php only iterates
   $b2cFlatMenu['items'], already capped server-side, so there is no 7th+
   card to hide/reveal here. */
.b2c-mega-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}

/* Fixed height (not aspect-ratio) — same reasoning as B2B's own
   .b2b-mega-card: keeps cards visually consistent across 1280/1440/
   1920px viewports, where an aspect-ratio would otherwise grow taller
   as the grid column widens. Same 160px value as B2B ("same card
   dimensions"). */
.b2c-mega-card{
  position:relative;display:block;height:160px;min-width:0;overflow:hidden;
  background:var(--paper);border:1px solid var(--line);
}
.b2c-mega-card img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .5s ease}
.b2c-mega-card:hover img{transform:scale(1.04)}
.b2c-mega-card__overlay{
  position:absolute;inset:0;background:linear-gradient(0deg,rgba(23,27,20,.66),rgba(23,27,20,0) 58%);
  transition:background .35s ease;
}
.b2c-mega-card:hover .b2c-mega-card__overlay{background:linear-gradient(0deg,rgba(23,27,20,.78),rgba(23,27,20,0) 62%)}
.b2c-mega-card__title{
  position:absolute;left:16px;right:16px;bottom:12px;color:#fff;
  display:flex;align-items:center;gap:8px;
  font-family:var(--sans);font-size:1.05rem;font-weight:600;letter-spacing:-.01em;line-height:1.15;
}
.b2c-mega-card__arrow{
  font-size:.72rem;opacity:0;transform:translateX(-4px);
  transition:opacity .25s ease,transform .25s ease;
}
.b2c-mega-card:hover .b2c-mega-card__arrow,
.b2c-mega-card:focus-visible .b2c-mega-card__arrow{opacity:1;transform:none}

/* No image configured — a plain bordered card with dark centered text,
   never a broken <img> and never a placeholder URL, never the dark
   gradient overlay (nothing there for it to sit on top of). */
.b2c-mega-card__title--fallback{
  position:static;display:flex;align-items:center;justify-content:center;
  width:100%;height:100%;color:var(--ink);text-align:center;padding:12px;
  font-size:1.05rem;font-weight:600;letter-spacing:-.01em;
}

.b2c-mega-menu__more{
  display:flex;width:fit-content;align-items:center;justify-content:center;gap:6px;
  margin:22px auto 0;
  font-size:.82rem;font-weight:600;color:var(--ink);
}
.b2c-mega-menu__more i{font-size:.68rem;transition:transform .2s ease}
.b2c-mega-menu__more:hover i{transform:translateX(3px)}

.b2c-mega-card:focus-visible,
.b2c-mega-menu__more:focus-visible{outline:2px solid var(--olive);outline-offset:3px}

/* Deliberately BELOW the 1100px point where .desktop-nav{display:none}
   (index.css et al.) removes the whole desktop nav — including this
   trigger — in favor of the separate nav-drawer accordion (untouched by
   this file), not above it. An earlier revision used 1360px here,
   reasoning it gave the grid "breathing room" — but 1280px and 1366px
   are ordinary laptop screen widths, and 100% browser zoom on one of
   them reports an effective CSS viewport at or below 1360px (while 90%
   zoom inflates the same physical screen's effective CSS width comfortably
   past it) — a normal desktop user could see 3 columns at 90% zoom and 2
   at 100% zoom on the exact same monitor, which is the bug this fixes.
   Real desktop/laptop widths (1920 down to 1280, and their zoomed
   variants) must all stay 3-column; only true narrow ranges the desktop
   nav is about to disappear in anyway get 2. */
@media(max-width:1024px){
  .b2c-mega-grid{grid-template-columns:repeat(2,1fr)}
}
