/* ============================================================
   Sonay Shipping Mega Menu V4 — ssmm.css
   ============================================================ */
:root {
  --ssmm-navy:   #0b3475;
  --ssmm-blue:   #123d83;
  --ssmm-accent: #1769d2;
  --ssmm-ink:    #173765;
  --ssmm-pale:   #eaf2fc;
}

/* ── Reset ─────────────────────────────────────────────────── */
.ssmm, .ssmm * { box-sizing: border-box; }
.ssmm a { text-decoration: none; }
.ssmm { position: relative; font-family: inherit; color: var(--ssmm-ink); z-index: 200; }

/* ── Sticky ─────────────────────────────────────────────────── */
.ssmm-sticky { position: sticky; top: 0; }

/* ── Focus visible ──────────────────────────────────────────── */
.ssmm a:focus-visible,
.ssmm button:focus-visible,
.ssmm input:focus-visible { outline: 3px solid #8cc4ff; outline-offset: 2px; }

/* ─────────────────── TOP BAR ──────────────────────────────── */
.ssmm-topbar {
  background: #0a2e68;
  color: #fff;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,.18);
}
.ssmm-topbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  min-height: 38px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.ssmm-topbar-left  { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ssmm-topbar-right {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  justify-content: flex-end;
}
.ssmm-topbar-right .ssmm-search { margin-left: 4px; flex: 0 0 auto; }
.ssmm-tb-item, .ssmm-lang { color: #fff; font-size: 12px; }
.ssmm-tb-item:hover, .ssmm-lang:hover { opacity: .75; }
.ssmm-lang { font-weight: 600; }

/* ─────────────────── MAIN HEADER ──────────────────────────── */
.ssmm-main { background: var(--ssmm-blue); color: #fff; overflow: visible; }
.ssmm-main-inner {
  position: relative;
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  min-height: 88px;
  display: flex;
  align-items: stretch;
}

/* ─────────────────── NAV & LOGO LAYOUT ────────────────────── */
.ssmm-nav-left  { display: flex; align-items: center; gap: 4px; flex: 1 1 0; }
.ssmm-logo {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; z-index: 2; max-width: 40%; pointer-events: auto;
}
.ssmm-nav-right { display: flex; align-items: center; gap: 4px; flex: 1 1 0; justify-content: flex-end; }

.ssmm-hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; padding: 8px; border: 0; background: transparent; cursor: pointer;
  margin-left: auto;
}
.ssmm-hamburger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; }

/* ─────────────────── LOGO ──────────────────────────────────── */
.ssmm-logo img {
  display: block; width: 160px; max-width: 100%; max-height: 70px;
  height: auto; object-fit: contain;
}
.ssmm-logo-text { font-weight: 700; letter-spacing: 1px; font-size: 14px; white-space: nowrap; }

/* ─────────────────── NAV LINKS ─────────────────────────────── */
.ssmm-nav-item { position: relative; }

.ssmm-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 14px 13px;
  color: #fff; font-size: 14px; border-radius: 8px;
  transition: background .18s, color .18s;
  white-space: nowrap;
}
.ssmm-link:hover,
.ssmm-link:focus-visible,
.ssmm-link.ssmm-open { background: var(--ssmm-accent); color: #fff; }

.ssmm-arrow {
  display: inline-block;
  width: 7px; height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
  flex-shrink: 0;
}
.ssmm-link.ssmm-open .ssmm-arrow { transform: rotate(225deg) translateY(-2px); }

/* ─────────────────── SEARCH ────────────────────────────────── */
.ssmm-search {
  display: flex; align-items: center; overflow: hidden; border-radius: 20px;
  background: rgba(255,255,255,.13); height: 32px;
}
.ssmm-search input {
  width: 145px; padding: 0 11px; border: 0; outline: 0;
  background: transparent; color: #fff; font: inherit; font-size: 12px; height: 100%;
}
.ssmm-search input::placeholder { color: rgba(255,255,255,.65); }
.ssmm-search button {
  padding: 0 10px; border: 0; background: transparent;
  color: #fff; cursor: pointer; font-size: 15px; height: 100%;
  display: flex; align-items: center;
}

/* ─────────────────── DROPDOWN ──────────────────────────────── */
.ssmm-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(4,30,73,.18);
  padding: 6px 0;
  z-index: 400;
  animation: ssmm-fade .15s ease both;
}
.ssmm-dropdown[hidden] { display: none !important; }
@media (min-width: 769px) {
  .ssmm-nav-item:hover > .ssmm-dropdown { display: block !important; }
}

/* Prevent gap between trigger and dropdown from closing it */
.ssmm-dropdown::before {
  content: '';
  position: absolute;
  top: -8px; left: 0; right: 0; height: 8px;
}

.ssmm-sub-link {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 16px; color: var(--ssmm-ink);
  font-size: 13px; transition: background .14s, color .14s;
}
.ssmm-sub-link:hover { background: var(--ssmm-pale); color: var(--ssmm-accent); }
.ssmm-sub-icon { flex-shrink: 0; min-width: 16px; }
.ssmm-sub-text { display: block; }
.ssmm-sub-desc { display: block; margin-top: 2px; font-size: 11px; color: #627695; line-height: 1.35; }
.ssmm-sub-children { padding-left: 16px; border-left: 2px solid var(--ssmm-pale); margin: 0 12px 4px; }
.ssmm-sub-children .ssmm-sub-link { font-size: 12px; padding-top: 7px; padding-bottom: 7px; }

/* ─────────────────── MOBILE DRAWER ────────────────────────── */
.ssmm-mobile-nav { background: var(--ssmm-navy); padding: 8px 16px; }
.ssmm-mobile-nav[hidden] { display: none !important; }
.ssmm-mobile-nav .ssmm-nav-item { border-bottom: 1px solid rgba(255,255,255,.1); }
.ssmm-mobile-nav .ssmm-link { display: flex; width: 100%; justify-content: space-between; border-radius: 0; }
.ssmm-mobile-nav .ssmm-dropdown {
  position: static; box-shadow: none; border-radius: 0; padding: 0 0 0 16px;
  background: transparent; animation: none; min-width: 0;
}
.ssmm-mobile-nav .ssmm-dropdown::before { display: none; }
.ssmm-mobile-nav .ssmm-sub-link { color: rgba(255,255,255,.8); font-size: 13px; }
.ssmm-mobile-nav .ssmm-sub-link:hover { color: #fff; background: transparent; }

/* ─────────────────── MEGA PANEL ────────────────────────────── */
/*
  .ssmm-panel is a SIBLING of .ssmm-main (both inside .ssmm).
  .ssmm has position:relative — panel uses position:absolute
  relative to .ssmm, placed right after .ssmm-main via top:auto.
  
  For accurate full-bleed alignment we lift the panel out to
  viewport coordinates with left/right anchoring.
*/
.ssmm-panel {
  position: absolute;
  /* Align with the header content, not with the trigger link. */
  left: 50%;
  right: auto;
  top: auto;
  width: min(1280px, calc(100vw - 32px));
  transform: translateX(-50%);
  background: #fff;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 18px 48px rgba(4,30,73,.22);
  z-index: 300;
  animation: ssmm-drop .2s ease both;
  overflow: hidden;
}
.ssmm-panel[hidden] { display: none !important; }

/* Inner wrapper caps the content width and centres it */
.ssmm-panel-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

/* Full-screen variant stretches edge-to-edge */
.ssmm-mega-full .ssmm-panel { border-radius: 0; width: 100vw; }
.ssmm-mega-full .ssmm-panel-inner { max-width: 1280px; margin: 0 auto; }

.ssmm-panel-grid {
  display: grid;
  grid-template-columns: 200px 1fr 1fr 1.7fr;
  gap: 20px; align-items: start;
}
.ssmm-panel-grid > * { min-width: 0; }
.ssmm-panel-grid > *:not(:last-child) {
  border-right: 1px solid #e0e8f3; padding-right: 20px;
}

.ssmm-panel-title {
  font-size: 16px; font-weight: 700; color: var(--ssmm-ink); margin: 0 0 14px;
  display: flex; align-items: center; gap: 8px;
}

/* Ship list */
.ssmm-ship-list { display: grid; gap: 3px; }
.ssmm-ship-btn {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 10px; border: 0; border-radius: 7px;
  background: transparent; color: var(--ssmm-ink); text-align: left;
  cursor: pointer; font: inherit; font-size: 13px;
  transition: background .16s, color .16s;
}
.ssmm-ship-icon { font-size: 15px; flex-shrink: 0; }
.ssmm-ship-btn span:nth-child(2) { flex: 1; }
.ssmm-ship-arrow { font-size: 18px; opacity: 0; transition: opacity .16s; }
.ssmm-ship-btn:hover .ssmm-ship-arrow,
.ssmm-ship-btn.active .ssmm-ship-arrow { opacity: 1; }
.ssmm-ship-btn.active,
.ssmm-ship-btn:hover { background: var(--ssmm-pale); color: var(--ssmm-accent); }

/* Spec column */
.ssmm-spec-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.ssmm-spec-icon { font-size: 18px; color: var(--ssmm-accent); }
.ssmm-spec-name { margin: 0; font-size: 16px; color: var(--ssmm-ink); }
.ssmm-spec-rows { display: grid; gap: 8px; margin-bottom: 16px; }
.ssmm-spec-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding-bottom: 7px; border-bottom: 1px solid #edf1f6; font-size: 12px;
}
.ssmm-spec-row span { color: #627695; }
.ssmm-spec-row strong { text-align: right; color: var(--ssmm-ink); }
.ssmm-detail-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ssmm-accent); font-size: 12px; font-weight: 700;
}
.ssmm-detail-link:hover { opacity: .75; }

/* Description column */
.ssmm-desc-title { font-size: 16px; margin: 0 0 12px; color: var(--ssmm-ink); }
.ssmm-desc-text  { font-size: 13px; color: #546a8a; line-height: 1.65; margin: 0; }

/* Image card */
.ssmm-ship-card {
  position: relative; border-radius: 8px; overflow: hidden;
  min-height: 295px; background: linear-gradient(135deg,#dce9ff,#7896c5);
}
.ssmm-card-gallery { position: absolute; inset: 0; }
.ssmm-gallery-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: opacity .28s;
}
.ssmm-gallery-img.ssmm-img-hidden { opacity: 0; }
.ssmm-card-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: space-between; padding: 14px;
  background: linear-gradient(180deg,rgba(3,20,52,.08),rgba(3,20,52,.78));
  color: #fff; pointer-events: none;
}
.ssmm-status-badge {
  align-self: flex-start; background: #12c99a; padding: 6px 11px;
  border-radius: 20px; font-size: 11px; pointer-events: auto;
}
.ssmm-card-meta strong { display: block; font-size: 18px; }
.ssmm-card-meta small  { display: block; margin-top: 3px; font-size: 12px; }

.ssmm-slider-ctrl {
  position: absolute; right: 10px; bottom: 12px;
  display: flex; align-items: center; gap: 7px; color: #fff;
}
.ssmm-sl-prev, .ssmm-sl-next {
  border: 0; background: transparent; color: #fff;
  font-size: 22px; cursor: pointer; line-height: 1; padding: 0;
}
.ssmm-sl-dots { display: flex; gap: 5px; }
.ssmm-sl-dot {
  width: 7px; height: 7px; border-radius: 50%;
  border: 1px solid #fff; display: inline-block; cursor: pointer;
}
.ssmm-sl-dot.active { background: #fff; }

/* ─────────────────── ANIMATIONS ────────────────────────────── */
@keyframes ssmm-drop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ssmm-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────── TABLET ────────────────────────────────── */
@media (max-width: 1100px) {
  .ssmm-link { padding: 12px 9px; font-size: 12px; }
  .ssmm-panel-grid { grid-template-columns: 1fr 1fr; }
  .ssmm-panel-grid > *:nth-child(2) { border-right: 0; }
  .ssmm-ship-card { grid-column: 1 / -1; }
  .ssmm-col-desc  { border-right: 0 !important; }
}

/* ─────────────────── MOBILE ────────────────────────────────── */
@media (max-width: 768px) {
  .ssmm-topbar-inner { padding: 8px 16px; flex-wrap: wrap; }
  .ssmm-topbar-left  { flex-wrap: wrap; gap: 10px; }
  .ssmm-topbar-right { gap: 10px; width: 100%; justify-content: flex-start; }
  .ssmm-topbar-right .ssmm-search { flex: 1 1 160px; max-width: 100%; }
  .ssmm-topbar-right .ssmm-search input { width: 100%; }
  .ssmm-main-inner { min-height: 70px; padding: 0 14px; }
  .ssmm-nav-left, .ssmm-nav-right { display: none !important; }
  .ssmm-hamburger { display: flex; }

  .ssmm-panel {
    position: fixed; top: auto !important; left: 0; bottom: 0; right: 0;
    width: 100%; max-width: 100%; transform: none;
    max-height: 75vh; overflow-y: auto; border-radius: 16px 16px 0 0;
  }
  .ssmm-panel-inner { padding: 16px; }
  .ssmm-panel-grid { grid-template-columns: 1fr; gap: 14px; }
  .ssmm-panel-grid > *:not(:last-child) {
    border-right: 0; border-bottom: 1px solid #e0e8f3;
    padding-right: 0; padding-bottom: 14px;
  }
  .ssmm-ship-card { min-height: 220px; }

  .ssmm-dropdown {
    position: static; box-shadow: none; border-radius: 0; padding: 0 0 0 12px;
    background: transparent; animation: none; min-width: 0;
  }
  .ssmm-nav-item:hover > .ssmm-dropdown { display: none !important; }
  .ssmm-dropdown::before { display: none; }
  .ssmm-sub-children { border-left: 0; margin-left: 0; padding-left: 12px; }
}
