/* Gems Mantra style mega panel — server-rendered, CSS-only show/hide + tiny JS toggle.
 * Wide white panel, 4 text columns with hairline dividers, gold micro-headings,
 * icon links, pill badges, gradient fallback tiles, assurance strip. */

[data-mega-item] {
  position: static;
}

[data-mega-panel].gm-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 60;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  pointer-events: none;
  background: #fff;
  border-top: 1px solid #efe2d2;
  box-shadow: 0 34px 54px -22px rgba(80, 20, 25, 0.25);
}

[data-mega-item]:hover > [data-mega-panel].gm-wrap,
[data-mega-item]:focus-within > [data-mega-panel].gm-wrap,
[data-mega-item].mega-open > [data-mega-panel].gm-wrap {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ---- top-level nav items ---- */
.gm-top {
  position: relative;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #3a2b33;
  padding: 24px 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.gm-top:hover {
  color: #6b0f1a;
}

.gm-top.is-active {
  color: #6b0f1a;
}

.gm-top.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  height: 2px;
  border-radius: 2px;
  background: #b9935a;
}

.gm-top.is-sale {
  color: #c1121f;
}

.gm-top.is-sale:hover {
  color: #a30d1a;
}

[data-mega-btn][aria-expanded="true"] .mega-chevron {
  transform: rotate(180deg);
}

[data-mega-btn] .mega-chevron {
  transition: transform 0.2s ease;
}

/* ---- panel shell: full-width white, inner content shares the header's container ---- */
.gm-panel {
  width: min(calc(100% - 48px), 1480px);
  margin: 0 auto;
  background: #fff;
  padding: 30px 0 0;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
}

.gm-body {
  display: grid;
  grid-template-columns: 1fr 248px;
  gap: 32px;
  align-items: start;
}

.gm-body--no-tiles {
  grid-template-columns: 1fr;
}

.gm-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.gm-col {
  padding: 0 26px;
  min-width: 0;
}

.gm-col:first-child {
  padding-left: 0;
}

.gm-col:last-child {
  padding-right: 0;
}

.gm-col + .gm-col {
  border-left: 1px solid #f0e4d3;
}

.gm-group + .gm-group {
  margin-top: 22px;
}

.gm-h {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #8a6d3b;
  margin: 0 0 10px;
}

.gm-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
}

.gm-links--split {
  grid-template-columns: 1fr 1fr;
  column-gap: 18px;
}

.gm-link {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  font-size: 13.5px;
  font-weight: 500;
  color: #3a2b33;
  line-height: 1.35;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.gm-link:hover {
  color: #6b0f1a;
}

.gm-link:hover .gm-ico {
  color: #8a6d3b;
  transform: scale(1.08);
}

.gm-ico {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  color: #b9935a;
  display: inline-flex;
  transition: transform 0.15s ease;
}

.gm-ico svg {
  width: 14px;
  height: 14px;
  display: block;
}

.gm-txt {
  min-width: 0;
}

.gm-label {
  display: inline;
}

.gm-sub {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: #9a8f8a;
  margin-top: 1px;
}

.gm-link--explore {
  font-weight: 800;
  color: #3a2b33;
  text-decoration: underline;
  text-decoration-color: #b9935a;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.gm-link--blog {
  font-family: Marcellus, Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: #4a3a32;
}

.gm-badge {
  display: inline-block;
  vertical-align: 1px;
  margin-left: 7px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 3px 6px 2.5px;
  border-radius: 999px;
  border: 1px solid #d9a5a5;
  color: #b3384a;
  background: #fff5f5;
  white-space: nowrap;
}

.gm-badge--gold {
  border-color: #d9c08a;
  color: #8a6d3b;
  background: #fdf8ec;
}

/* ---- tiles ---- */
.gm-tiles {
  display: grid;
  gap: 16px;
  align-content: start;
}

.gm-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  min-height: 168px;
  border: 1px solid #e8d5bd;
  background: #2a0e12;
  isolation: isolate;
}

.gm-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gm-tile:hover img {
  transform: scale(1.05);
}

.gm-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 5, 8, 0.82) 0%, rgba(20, 5, 8, 0.25) 48%, rgba(20, 5, 8, 0) 70%);
  z-index: 1;
}

.gm-tile--fallback {
  background:
    radial-gradient(circle at 78% 18%, rgba(185, 147, 90, 0.55) 0, rgba(185, 147, 90, 0) 42%),
    radial-gradient(circle at 50% 120%, rgba(185, 147, 90, 0.35) 0, rgba(185, 147, 90, 0) 55%),
    linear-gradient(150deg, #4a1420 0%, #2a0e12 60%, #1c0a0e 100%);
}

.gm-tile--fallback::before {
  content: "";
  position: absolute;
  right: -34px;
  top: -34px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 1px solid rgba(185, 147, 90, 0.5);
  box-shadow: 0 0 0 14px rgba(185, 147, 90, 0.08), 0 0 0 28px rgba(185, 147, 90, 0.05);
  z-index: 0;
}

.gm-tile-label {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

/* ---- assurance strip: full-width band, items centered in the same container ---- */
.gm-assure-wrap {
  margin-top: 26px;
  border-top: 1px solid #f0e4d3;
  background: #fff;
}

.gm-assure {
  width: min(calc(100% - 48px), 1480px);
  margin: 0 auto;
  padding: 13px 0 15px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9a8f8a;
}

.gm-assure-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.gm-assure-item svg {
  width: 13px;
  height: 13px;
  color: #b9935a;
  flex: none;
}

.gm-assure-dot {
  color: #d9c8ac;
  font-weight: 400;
}

@media (max-width: 1100px) {
  .gm-body {
    grid-template-columns: 1fr 210px;
  }

  .gm-col {
    padding: 0 16px;
  }
}

@media (max-width: 768px) {
  .gm-panel,
  .gm-assure {
    width: min(calc(100% - 32px), 1480px);
  }
}

@media (max-width: 1023.5px) {
  [data-mega-panel].gm-wrap {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-mega-panel].gm-wrap,
  [data-mega-btn] .mega-chevron,
  .gm-tile img,
  .gm-link,
  .gm-ico {
    transition: none;
  }
}
