/* ============================================================
   MEGA MENU — All dropdowns
   ============================================================ */

/* Make the li the positioning anchor */
.has-mega-menu {
  position: static;
}

/* The dropdown panel */
.mega-menu {
  display: none;
  position: fixed;
  top: 125px; /* dynamically overridden by mega-menu.js */
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.14);
  z-index: 99999;
  min-width: 700px;
  max-width: 1100px;
  width: 90vw;
  padding: 28px 28px 20px;
  border-top: 3px solid #b01733;
}

/* Show via JS .is-open class */
.mega-menu.is-open {
  display: block;
}

/* ---- Inner grid ---- */
.mega-menu-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.mega-menu-inner--3col {
  grid-template-columns: 1fr 1fr 1.3fr;
}

/* ---- Column ---- */
.mega-col h4.mega-col-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #111;
  text-transform: uppercase;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.mega-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-col ul li {
  margin-bottom: 7px;
}

.mega-col ul li a {
  font-size: 13px;
  color: #444;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}

.mega-col ul li a:hover {
  color: #b01733;
}

/* ---- Column image (Shop menu) ---- */
.mega-col-img {
  position: relative;
  width: 100%;
  height: 110px;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 12px;
  background: #f5f5f5;
}

.mega-col-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mega-col-img-new {
  position: relative;
}

.mega-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #e8a000;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

/* ---- Inline tags (NEW / POPULAR) ---- */
.mega-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.06em;
  vertical-align: middle;
}

.mega-tag--new {
  background: #e8a000;
  color: #fff;
}

.mega-tag--popular {
  background: #b01733;
  color: #fff;
}

/* ---- Featured product card (Paint — vertical) ---- */
.mega-col--featured {
  border-left: 1px solid #f0f0f0;
  padding-left: 20px;
}

.mega-featured-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mega-featured-img-wrap {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f5f5;
}

.mega-featured-img-wrap img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.mega-sale-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #2ecc71;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.04em;
}

.mega-featured-name {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  margin: 0;
}

.mega-featured-stars {
  color: #f5a623;
  font-size: 12px;
  margin: 3px 0;
}

.mega-featured-price {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mega-price-old {
  font-size: 12px;
  color: #999;
  text-decoration: line-through;
}

.mega-price-new {
  font-size: 15px;
  font-weight: 700;
  color: #b01733;
}

.mega-price-green {
  color: #27ae60 !important;
}

.mega-price-from-label {
  font-size: 12px;
  color: #999;
}

/* ---- Featured product cards (Doors — horizontal stack) ---- */
.mega-col--featured-stack {
  border-left: 1px solid #f0f0f0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mega-featured-card--horizontal {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.mega-featured-card--horizontal:last-of-type {
  border-bottom: none;
}

.mega-featured-card--horizontal img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 4px;
  background: #f5f5f5;
  flex-shrink: 0;
}

.mega-featured-card--horizontal .mega-featured-info {
  flex: 1;
}

.mega-featured-card--horizontal .mega-featured-name {
  font-size: 13px;
}

/* ---- Brand logos (Doors) ---- */
.mega-doors-brands {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.mega-doors-brands .mega-col-title {
  font-size: 10px;
  margin-bottom: 10px;
}

.mega-brand-logos {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mega-brand-logos img {
  height: 22px;
  width: auto;
  object-fit: contain;
  filter: grayscale(30%);
  opacity: 0.85;
  transition: opacity 0.2s;
}

.mega-brand-logos img:hover {
  opacity: 1;
  filter: none;
}

/* ---- Blog card (Resources) ---- */
.mega-blog-card {
  display: block;
  text-decoration: none;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #eee;
  transition: box-shadow 0.2s;
}

.mega-blog-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

.mega-blog-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.mega-blog-info {
  padding: 10px 12px 12px;
}

.mega-blog-date {
  font-size: 11px;
  color: #999;
  margin: 0 0 4px;
}

.mega-blog-title {
  font-size: 13px;
  font-weight: 600;
  color: #222;
  margin: 0 0 8px;
  line-height: 1.4;
}

.mega-blog-read {
  font-size: 12px;
  color: #b01733;
  font-weight: 600;
}

/* ============================================================
   SHOP MEGA MENU — F style
   Dual product columns: Paint | Doors | Slim extras
   ============================================================ */
.mega-menu-shop { padding: 0; overflow: hidden; width: 860px; }
.mshop-f-inner { display: grid; grid-template-columns: 1fr 1fr 0.55fr; }
.mshop-f-col { padding: 24px 24px; }
.mshop-f-col:not(:last-child) { border-right: 1px solid #f0f0f0; }
.mshop-f-col-header { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.mshop-f-col-icon { width: 28px; height: 28px; border-radius: 5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mshop-f-col-icon.paint { background: #fef0f2; }
.mshop-f-col-icon.doors { background: #f0faf7; }
.mshop-f-col-title { font-size: 13px; font-weight: 800; color: #111; }
.mshop-f-col-sub { font-size: 10px; color: #aaa; font-weight: 500; }
.mshop-f-tiles { display: flex; flex-direction: column; gap: 7px; }
.mshop-f-inner .mshop-f-tile { display: flex; align-items: center; gap: 10px; padding: 9px 10px; height: auto; border: 1.5px solid #f0f0f0; border-radius: 7px; text-decoration: none; transition: all 0.15s; }
.mshop-f-inner .mshop-f-tile:hover { border-color: #b01733; background: #fdf8f9; }
.mshop-f-inner .mshop-f-tile.doors-tile:hover { border-color: #1a6b5a; background: #f0faf7; }
.mshop-f-tile-thumb { width: 34px; height: 34px; border-radius: 5px; overflow: hidden; flex-shrink: 0; background: #f5f5f5; display: flex; align-items: center; justify-content: center; }
.mshop-f-tile-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mshop-f-tile-name { font-size: 12px; font-weight: 600; color: #222; line-height: 1.3; }
.mshop-f-tile-price { font-size: 11px; font-weight: 700; margin-top: 1px; }
.mshop-f-tile-price.teal { color: #1a6b5a; }
.mshop-f-inner .mshop-f-showall { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-decoration: none; padding: 0; height: auto; margin-top: 14px; }
.mshop-f-inner .mshop-f-showall.red { color: #b01733; }
.mshop-f-inner .mshop-f-showall.teal { color: #1a6b5a; }
.mshop-f-extras { background: #fafafa; display: flex; flex-direction: column; }
.mshop-f-extras h5 { font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #bbb; margin-bottom: 12px; }
.mshop-f-extra-links { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.mshop-f-inner .mshop-f-extra-links li a { font-size: 12px; font-weight: 500; color: #555; text-decoration: none; padding: 0; height: auto; }
.mshop-f-inner .mshop-f-extra-links li a:hover { color: #b01733; }
.mshop-f-inner .mshop-f-all-btn { display: flex; align-items: center; justify-content: center; gap: 6px; background: #111; color: #fff; padding: 8px 12px; border-radius: 6px; font-size: 11px; font-weight: 700; text-decoration: none; margin-top: auto; height: auto; }
.mshop-f-inner .mshop-f-all-btn:hover { background: #b01733; color: #fff; }


/* ============================================================
   PAINT & DOORS MEGA MENUS — I style (2-col, no featured col)
   Editorial image card (left) + 2-col product/resource lists (right)
   ============================================================ */
.mega-menu-paint,
.mega-menu-doors {
  padding: 0;
  overflow: hidden;
  width: 680px;
}
.medit-inner {
  position: relative;
  padding-left: 270px; /* reserves column for the editorial card */
  min-height: 280px;
  display: flex;
}
/* Left: editorial image card — absolutely fills the reserved column */
.medit-card {
  position: absolute;
  left: 0; top: 0;
  width: 270px;
  height: 100%;
  min-height: 280px;
  overflow: hidden;
  text-decoration: none;
}
.medit-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.35s;
}
.medit-card:hover img { transform: scale(1.04); }
.medit-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.08) 65%, transparent 100%);
}
.medit-card-body { position: absolute; bottom: 0; left: 0; right: 0; z-index: 1; padding: 20px 20px; }
.medit-badge {
  display: inline-block;
  background: #b01733; color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 3px 8px; border-radius: 3px;
  margin-bottom: 8px; letter-spacing: 0.5px;
}
.medit-badge.teal { background: #1a6b5a; }
.medit-card h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 15px; font-weight: 900; color: #fff;
  line-height: 1.2; margin: 0 0 5px;
}
.medit-card p {
  font-size: 11px; color: rgba(255,255,255,0.55);
  line-height: 1.5; margin: 0 0 10px;
  white-space: normal; overflow: visible;
  display: block;
}
.medit-price {
  font-size: 20px; font-weight: 900; color: #fff;
  margin-bottom: 12px;
}
.medit-price span {
  font-size: 12px; color: rgba(255,255,255,0.35);
  text-decoration: line-through; font-weight: 400; margin-right: 4px;
}
.medit-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #b01733; color: #fff;
  padding: 8px 16px; border-radius: 5px;
  font-size: 12px; font-weight: 700; text-decoration: none;
}
.medit-btn.teal { background: #1a6b5a; }

/* Right: 2-col links — fills remaining space after padding-left on parent */
.medit-right {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-left: 1px solid #e8e8e8;
}
/* Single column variant (Paint menu) */
.medit-right--single {
  grid-template-columns: 1fr;
}
.medit-col { padding: 20px 22px; }
.medit-col:first-child { border-right: 1px solid #f0f0f0; }
.medit-col-title {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: #bbb; margin-bottom: 14px;
}
.medit-links { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.medit-links li a {
  font-size: 13px; font-weight: 500; color: #333;
  text-decoration: none;
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 9px; border-bottom: 1px solid #f5f5f5;
  transition: color 0.15s;
}
.medit-links li:last-child a { border-bottom: none; padding-bottom: 0; }
.medit-links li a.medit-link-all { font-weight: 700; color: #111; }
.medit-links li a:hover { color: #b01733; }
.medit-links li a i { font-size: 9px; color: #e0e0e0; }
.medit-links li a:hover i { color: #b01733; }
.medit-shop-all {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; text-decoration: none;
  margin-top: 14px;
}
.medit-shop-all.red { color: #b01733; }
.medit-shop-all.teal { color: #1a6b5a; }


/* ============================================================
   RESOURCES MEGA MENU — A style
   3-col: Door Resources | Paint Resources + Blog | Featured post
   ============================================================ */
.mega-menu-resources { padding: 0; overflow: hidden; max-width: 920px; }
.mra-inner { display: grid; grid-template-columns: 1fr 1fr 1.3fr; }
.mra-col { padding: 24px 26px; min-width: 0; }
.mra-col:not(:last-child) { border-right: 1px solid #f0f0f0; }
.mra-col--featured { background: #fafafa; }
.mra-col-title {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  color: #bbb; text-transform: uppercase; margin-bottom: 14px;
  display: flex; align-items: center; gap: 5px;
}
.mra-col-title i { font-size: 10px; }
.mra-section-divider { margin-top: 20px; padding-top: 18px; border-top: 1px solid #f0f0f0; }
/* Link list */
.mra-links { list-style: none; }
.mra-inner .mra-links li a {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 500; color: #444;
  text-decoration: none; padding: 7px 0; height: auto;
  border-bottom: 1px solid #f5f5f5; transition: color 0.15s;
}
.mra-inner .mra-links li:last-child a { border-bottom: none; }
.mra-inner .mra-links li a:hover { color: #b01733; }
.mra-inner .mra-links li a i { font-size: 9px; color: #ddd; width: 12px; flex-shrink: 0; }
.mra-inner .mra-links li a:hover i { color: #b01733; }
/* See all link */
.mra-inner .mra-see-all {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; text-decoration: none;
  padding: 0; height: auto; margin-top: 12px;
}
.mra-inner .mra-see-all.teal { color: #1a6b5a; }
.mra-inner .mra-see-all.red { color: #b01733; }
/* Featured blog card */
.mra-inner .mra-blog-card {
  display: block; text-decoration: none; height: auto; padding: 0;
  border-radius: 8px; overflow: hidden;
  border: 1px solid #eee; transition: box-shadow 0.2s;
  white-space: normal;
}
.mra-inner .mra-blog-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.10); }
.mra-blog-card img { width: 100%; height: 130px; object-fit: cover; display: block; }
.mra-blog-info { padding: 12px 14px 14px; }
.mra-blog-meta { font-size: 10.5px; color: #aaa; margin-bottom: 6px; }
.mra-blog-title { font-size: 13px; font-weight: 700; color: #111; line-height: 1.4; margin-bottom: 10px; }
.mra-blog-read { font-size: 12px; font-weight: 700; color: #b01733; display: flex; align-items: center; gap: 5px; }


/* ============================================================
   Transparent hover bridge — fills gap between nav item & menu
   so cursor doesn't break the hover zone
   ============================================================ */
.has-mega-menu::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -20px;
  right: -20px;
  height: 14px;
  background: transparent;
  pointer-events: none;
  display: none;
}

.has-mega-menu:hover::after {
  display: block;
  pointer-events: auto;
}
