/* Deal Store Mega Menu – newsletter layout, admin bar-safe, hover-first UX */
:root {
  --dsmm-z: 1040;
}

/* Root wrapper */
.dsmm { position: relative; display: inline-block; }

/* Toggle button (inherits Bootscore/Bootstrap look) */
.dsmm-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  cursor: pointer;
}

/* Overlay */
.dsmm-overlay[hidden] { display: none !important; }
.dsmm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .35);
  z-index: calc(var(--dsmm-z) - 1);
}

/* Panel container */
.dsmm-panel[hidden] { display: none !important; }
.dsmm-panel {
  position: fixed;
  left: 0;
  right: 0;
  /* JS sets top dynamically based on button position (+ admin bar), so no static top here */
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.1);
  z-index: var(--dsmm-z);
  max-height: 100dvh;           /* JS already places it below header, so use full remaining height */
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateY(-10px);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}
.dsmm-panel.is-open { transform: translateY(0); opacity: 1; }

.dsmm-inner { padding: 1.25rem 0; overflow: hidden; }

/* ===== Newsletter-style columns (removes big vertical gaps) ===== */
.dsmm-grid {
  column-count: var(--dsmm-cols, 5);
  column-gap: 1.25rem;
}
@media (max-width: 1200px) { .dsmm-grid { column-count: 4; } }
@media (max-width: 992px)  { .dsmm-grid { column-count: 3; } }
@media (max-width: 768px)  { .dsmm-grid { column-count: 2; } }
@media (max-width: 480px)  { .dsmm-grid { column-count: 1; } }

.dsmm-group { break-inside: avoid; margin: 0 0 1rem 0; padding: 0; min-width: 0; }

/* Parent heading styling */
.dsmm-group-title {
  font-size: 1rem;
  margin: 0 0 .5rem 0;
  line-height: 1.2;
}
.dsmm-group-title a {
  font-weight:600;
  text-decoration: none;
  color: #111827;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease;
}
.dsmm-group-title a:hover,
.dsmm-group-title a:focus {
  border-bottom-color: currentColor;
}

/* Child list */
.dsmm-sublist { list-style: none; margin: 0; padding: 0; }
.dsmm-subitem { margin: 0 0 .25rem 0; }
.dsmm-subitem a { text-decoration: none; font-size:0.9rem; }

/* Close button */
.dsmm-close {
  position: sticky;
  top: 0;
  float: right;
  margin: 0 .75rem .5rem 0;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.dsmm-close:focus { outline: 2px solid #000; outline-offset: 2px; }

/* Scrollbar compensation to avoid layout shift when locking scroll */
html.dsmm-no-scroll { padding-right: var(--dsmm-scrollbar-comp, 0px); }

