/* =============================================
   CARAWAY MEGA MENU v2 — menu only, no header wrapper
   ============================================= */

:root {
  --cmm-bg-panel:    #1f1f1f;
  --cmm-bg-sidebar:  #161616;
  --cmm-border:      rgba(255,255,255,0.08);
  --cmm-accent:      #b8860b;
  --cmm-text:        #e8e2d9;
  --cmm-text-muted:  #8a8580;
  --cmm-hover-bg:    rgba(255,255,255,0.05);
  --cmm-active-bg:   rgba(255,255,255,0.1);
  --cmm-product-bg:  #242424;
  --cmm-radius:      4px;
  --cmm-shadow:      0 8px 40px rgba(0,0,0,0.6);
  --cmm-item-height: 60px;   /* match your header height */
  --cmm-z:           9999;
}

/* ── Reset ─────────────────────────────────── */
.cmm-menu,
.cmm-menu * { box-sizing: border-box; }
.cmm-menu ul { list-style: none; margin: 0; padding: 0; }
.cmm-menu a  { text-decoration: none; color: #FDFBF8; }
.cmm-menu button { background: none; border: none; cursor: pointer; padding: 0; font: inherit; color: inherit; }

/* ── Menu list (horizontal bar) ────────────── */
.cmm-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;          /* fills whatever container Elementor gives it */
}

/* ── Top-level item ─────────────────────────── */
.cmm-item {
  position: static;      /* mega panel uses viewport-width, not parent */
  height: 100%;
  display: flex;
  align-items: stretch;
}

/* ── Top-level link ─────────────────────────── */
.cmm-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cmm-text);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
	font-family:"Montserrat";
}
.cmm-link:hover,
.cmm-item.cmm-active > .cmm-link {
  color: #fff;
}

.cmm-chevron {
  opacity: 0.55;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.cmm-item.cmm-active > .cmm-link .cmm-chevron {
  transform: rotate(180deg);
}

/* ── Mega Panel ─────────────────────────────── */
/*  Position relative to viewport using fixed positioning so it
    always aligns full-width regardless of where the shortcode sits. */
.cmm-mega-panel {
  position: fixed;
  left: 0;
  right: 0;
  /* top is set dynamically by JS to sit just below the header */
  top: var(--cmm-panel-top, 118px);
  border-top: 1px solid var(--cmm-border);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: var(--cmm-z);
  max-height: calc(100vh - var(--cmm-panel-top, 60px));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--cmm-border) transparent;
	
}

.cmm-mega-panel.cmm-panel-open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.cmm-mega-inner {
  position: relative;   /* FIX: this is now the positioning context for
                            .cmm-product-grid below, so its left/right offsets
                            measure against the real panel width (up to
                            1200px, centered) instead of a single sidebar
                            list item. */
  display: flex;
  min-height: 280px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Left Sidebar ───────────────────────────── */
.cmm-sidebar {
  width: 300px;
  flex-shrink: 0;
  background: #393939;
  padding: 25px 40px 50px 40px;
  border-right: 1px solid var(--cmm-border);
  border-radius: 0 0 0 20px;
}

.cmm-sidebar-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #BCBCBC;
  padding: 0 20px 20px 0;
  margin: 0;
  font-family: "Montserrat";
}

.cmm-sidebar-list { width: 100%;padding: 0;list-style: none; }

/* FIX: removed `position: relative` here. It was unintentionally turning
   each <li> into the positioning context for the absolutely-positioned
   .cmm-product-grid nested inside it (see PHP markup), which is only
   ~210px wide and ~44px tall. That made `left:210px; right:0;` resolve
   to a 0-width box — the grid existed in the DOM with content, but had
   no visible area to render in. Positioning now correctly bubbles up to
   .cmm-mega-inner above. */
.cmm-sidebar-item { position: static; }

.cmm-sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  font-size: 20px;
  color: #BCBCBC;
  border-left: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  cursor: pointer;
  font-family: "Montserrat";
  font-weight: 300;
  letter-spacing: 10%;
  border-bottom:1px solid #545454;
}
.cmm-sidebar-link:hover,
.cmm-sidebar-item.cmm-sidebar-active .cmm-sidebar-link {
  color: #A5D89B;
}
.cmm-sidebar-link svg { opacity: 0.45; flex-shrink: 0; }

/* ── Product Grid ───────────────────────────── */
/* Hidden by default; JS adds .cmm-grid-visible to the active one.
   Positioned absolute relative to .cmm-mega-inner (see fix above), so
   left:300px lines up exactly with the right edge of the sidebar,
   and right/top/bottom:0 fill the rest of the panel. */
.cmm-product-grid {
  display: none;
  position: absolute;
  left: 300px;
  top: 0;
  right: 0;
  bottom: 0;
  padding: 36px 50px;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 0;
  align-content: start;
  background: #2F2F2F;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--cmm-border) transparent;
  border-radius: 0 0 20px 0;
  row-gap: 25px;
}
.cmm-product-grid.cmm-grid-visible { display: grid; }

/* Full-width grid (top-level item, no sidebar) */
.cmm-product-grid--full {
  position: static;
  flex: 1;
}

/* ── Product Card ───────────────────────────── */
/* No card background anymore — images sit directly on the grid's
   background, separated by a thin vertical rule (like the target design)
   instead of being boxed individually. */
.cmm-product-card {
  background: transparent;
  border-radius: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 22px 20px;
  border-right: 1px solid var(--cmm-border);
}
/* Drop the divider after the last column in each row, and after the
   very last card overall (in case the final row has fewer than 4 items). */
.cmm-product-card:nth-child(4n),
.cmm-product-card:last-child {
  border-right: none;
}
.cmm-product-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  color: var(--cmm-text);
}

/* Fixed-height box, full (un-cropped) image scaled to fit inside it.
   No aspect-ratio square anymore — that, combined with hard-cropped
   'medium' WP thumbnails, is what was clipping the tops/bottoms of the
   bottles. The image keeps its real proportions now. */
.cmm-product-img {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.cmm-product-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s;
}
.cmm-product-card:hover .cmm-product-img img { transform: scale(1.04); }
.cmm-product-img--placeholder { background: transparent; }

.cmm-product-name {
  margin: 20px 0 0;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  color: #FDF6F0;
  line-height: 1.4;
  transition: color 0.15s;
  font-family: "Montserrat";
  font-size:13px
}
.cmm-product-card:hover .cmm-product-name { color: #fff; }

/* View All link */
.cmm-view-all {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  padding: 4px 0;
  position: absolute;
  bottom: 10%;
  right: 0;
}
.cmm-view-all a {
  font-size: 18px;
  color: #D4BDAF;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
  font-family: "Montserrat";
  font-weight: 500;
}
.cmm-view-all a:hover { color: var(--cmm-text); }

/* ── Hamburger (mobile trigger) ─────────────── */
.cmm-hamburger {
  display: none;    /* shown only on mobile via media query */
  flex-direction: column;
  gap: 5px;
  padding: 0;
  cursor: pointer;
  background: none;
  border: none;
}
.cmm-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cmm-text, #e8e2d9);
  border-radius: 2px;
  transition: transform 0.28s, opacity 0.28s;
}
.cmm-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.cmm-hamburger.is-open span:nth-child(2) { opacity: 0; }
.cmm-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Drawer ──────────────────────────── */
.cmm-mobile-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(320px, 85vw);
  background: var(--cmm-bg-panel, #1f1f1f);
  z-index: calc(var(--cmm-z) + 2);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--cmm-border) transparent;
}
.cmm-mobile-drawer.is-open {
  transform: translateX(0);
}

.cmm-mobile-inner { padding: 16px 0 48px; }

.cmm-mobile-close {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--cmm-text-muted);
  width: 44px; height: 44px;
  margin: 0 12px 8px auto;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}
.cmm-mobile-close:hover { background: var(--cmm-hover-bg); color: var(--cmm-text); }

.cmm-mobile-item { border-bottom: 1px solid var(--cmm-border); }
.cmm-mobile-row  { display: flex; align-items: center; }

.cmm-mobile-link {
  flex: 1;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cmm-text);
  font-family: "Montserrat";
}
.cmm-mobile-link:hover,.cmm-mobile-link:focus,.cmm-mobile-link:active{
  color: #FFF !important
}
.cmm-mobile-toggle {
  padding: 14px 16px;
  color: var(--cmm-text-muted);
  transition: transform 0.22s;
  background-color: transparent !important;
  border:unset !important;
}
ul.cmm-mobile-menu{
  padding: 0 !important;
}
.cmm-mobile-close{
  border:unset !important;
}
.cmm-hamburger{
  background-color: transparent !important;
}
.cmm-mobile-item,
ul.cmm-mobile-menu li{
  list-style-type: none !important;
  font-family: "Montserrat";
}
.cmm-mobile-toggle[aria-expanded="true"] { transform: rotate(180deg); }

.cmm-mobile-sub { padding: 4px 0 10px; }
.cmm-mobile-sublink {
  display: block;
  padding: 10px 28px;
  font-size: 16px;
  color: #BCBCBC;
  transition: color 0.15s;
  font-family: "Montserrat";
  font-weight: 400;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cmm-mobile-sublink:hover { color: var(--cmm-text); }

.cmm-mobile-products { padding: 4px 0 8px 16px; }
.cmm-mobile-products a {
  display: block;
  padding: 6px 28px;
  font-size: 12px;
  color: var(--cmm-text);
  transition: color 0.15s;
  font-family: "Montserrat";
}
.cmm-mobile-products a:hover { color: var(--cmm-text-muted); }

/* Backdrop */
.cmm-mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: calc(var(--cmm-z) + 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.cmm-mobile-backdrop.is-visible { opacity: 1; pointer-events: all; }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
  .cmm-menu          { display: none; }
  .cmm-hamburger     { display: flex; }
}