/* Mega menu: wide panels under the header on desktop; the phone menu keeps the simple list. */

/* ---------------------------------------------------------------- Shared (all widths) */
.cp-mega-links>a{display:flex;justify-content:space-between;align-items:center;gap:15px;font-size:14px;padding:13px 0;border-bottom:1px solid var(--cp-line);color:var(--cp-ink);text-decoration:none}
.cp-mega-links>a:last-child{border:0}
.cp-mega-links>a small{display:none}
.cp-mega-links .cp-icon{width:18px;height:18px}
.cp-mega-links>.cp-eyebrow{display:block;color:var(--cp-muted);margin-bottom:12px}
.cp-mega-group-title{display:flex;justify-content:space-between;align-items:center;gap:15px;font-size:14px;padding:13px 0;border-bottom:1px solid var(--cp-line);color:var(--cp-ink);text-decoration:none}
.cp-mega-group:last-of-type .cp-mega-group-title{border:0}
.cp-mega-group-title .cp-icon{width:18px;height:18px}
.cp-menu-panel .cp-mega-group ul,.cp-menu-panel .cp-mega-products,.cp-menu-panel.cp-mega>a.cp-mega-feature{display:none}

/* ---------------------------------------------------------------- Desktop */
@media(min-width:901px){
  .cp-header-inner{position:relative}
  .cp-menu-dropdown[data-mega]{position:static}
  .cp-menu-dropdown[data-mega]>summary{cursor:pointer}
  .cp-menu-panel.cp-mega{position:absolute;left:0;right:0;top:100%;width:auto;margin-top:0;padding:34px 36px 36px;background:#fff;border:1px solid var(--cp-line);border-top:3px solid var(--cp-orange);border-radius:0 0 8px 8px;box-shadow:0 40px 70px -30px rgba(24,35,51,.35);display:grid;gap:40px;z-index:120;animation:cp-mega-in 380ms cubic-bezier(.16,1,.3,1) both}
  @keyframes cp-mega-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
  /* An invisible bridge so the pointer can travel from the menu word to the panel without closing it. */
  .cp-menu-panel.cp-mega::before{content:"";position:absolute;left:0;right:0;top:-24px;height:24px}

  .cp-mega--products{grid-template-columns:minmax(0,.9fr) minmax(0,1.35fr) minmax(0,1fr)}
  .cp-mega--solutions{grid-template-columns:repeat(3,minmax(0,1fr)) minmax(0,1fr)}

  .cp-mega .cp-eyebrow{display:block;font-size:10px;color:#9b5b11;margin:0 0 16px}
  .cp-mega-links>a{padding:14px 0;font-weight:600}
  .cp-mega-links>a>span{display:flex;flex-direction:column;gap:2px}
  .cp-mega-links>a small{display:block;font-size:11px;font-weight:500;color:var(--cp-muted)}
  .cp-mega-links>a .cp-icon{transition:transform 400ms cubic-bezier(.16,1,.3,1);color:#a3610f}
  .cp-mega-links>a:hover{color:#8d5009}
  .cp-mega-links>a:hover .cp-icon{transform:translateX(4px)}
  .cp-mega-links>.cp-menu-all{color:#a95400;font-weight:700}

  .cp-menu-panel .cp-mega-products{display:flex;flex-direction:column;gap:10px}
  .cp-mega-product{display:grid;grid-template-columns:78px minmax(0,1fr);gap:16px;align-items:center;padding:8px;margin:0 -8px;border-radius:6px;color:var(--cp-ink);text-decoration:none;transition:background-color 220ms ease}
  .cp-mega-product:hover{background:var(--cp-paper)}
  .cp-mega-product-img{display:block;aspect-ratio:1;border-radius:5px;overflow:hidden;background:#efeae2}
  .cp-mega-product-img img{width:100%;height:100%;object-fit:cover;display:block;transition:transform 700ms cubic-bezier(.16,1,.3,1)}
  .cp-mega-product:hover .cp-mega-product-img img{transform:scale(1.06)}
  .cp-mega-product-text{display:flex;flex-direction:column;gap:3px;min-width:0}
  .cp-mega-product-text strong{font-size:14px;font-weight:650;line-height:1.3}
  .cp-mega-product-text em{font-style:normal;font-size:12px;color:var(--cp-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .cp-mega-product-text .price{font-size:13px;font-weight:700;margin-top:2px}
  .cp-mega-product-text .price .woocommerce-price-suffix{display:none}

  .cp-menu-panel.cp-mega>a.cp-mega-feature{display:flex;flex-direction:column;justify-content:flex-end;padding:0;border:0;gap:0;font-size:inherit;position:relative;min-height:260px;border-radius:8px;overflow:hidden;background:#182333;color:#fff;text-decoration:none;isolation:isolate}
  .cp-mega-feature>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2;transition:transform 900ms cubic-bezier(.16,1,.3,1)}
  .cp-mega-feature::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,rgba(15,24,38,.05) 20%,rgba(15,24,38,.85) 100%)}
  .cp-mega-feature:hover>img{transform:scale(1.05)}
  .cp-mega-feature-text{display:flex;flex-direction:column;gap:6px;padding:22px}
  .cp-mega-feature .cp-eyebrow{color:var(--cp-orange);margin:0}
  .cp-mega-feature strong{font-size:19px;line-height:1.25;letter-spacing:-.3px}
  .cp-mega-feature em{font-style:normal;font-size:12.5px;line-height:1.55;color:rgba(255,255,255,.82)}
  .cp-mega-feature-link{display:inline-flex;align-items:center;gap:8px;margin-top:8px;font-size:12px;font-weight:700;color:#fff}
  .cp-mega-feature-link .cp-icon{width:16px;height:16px;transition:transform 400ms cubic-bezier(.16,1,.3,1)}
  .cp-mega-feature:hover .cp-mega-feature-link .cp-icon{transform:translateX(5px)}

  .cp-mega-group-title{padding:0 0 14px;margin-bottom:10px;font-size:15px;font-weight:700;border-bottom:1px solid var(--cp-line)!important}
  .cp-mega-group-title .cp-icon{color:#a3610f;transition:transform 400ms cubic-bezier(.16,1,.3,1)}
  .cp-mega-group-title:hover{color:#8d5009}
  .cp-mega-group-title:hover .cp-icon{transform:translateX(4px)}
  .cp-menu-panel .cp-mega-group ul{display:flex;flex-direction:column;gap:2px;list-style:none;margin:0;padding:0}
  .cp-mega-group li a{display:flex;align-items:center;gap:12px;padding:7px 8px;margin:0 -8px;border-radius:5px;font-size:13.5px;line-height:1.35;color:var(--cp-ink);text-decoration:none;transition:background-color 200ms ease,color 200ms ease}
  .cp-mega-group li a:hover{background:var(--cp-paper);color:#8d5009}
  .cp-mega-mini{flex:0 0 40px;width:40px;height:40px;border-radius:5px;overflow:hidden;background:#e9ebe8}
  .cp-mega-mini img{width:100%;height:100%;object-fit:cover;display:block}
  .cp-mega--solutions .cp-mega-feature{min-height:100%}
}
@media(min-width:901px) and (max-width:1150px){
  .cp-menu-panel.cp-mega{padding:28px;gap:26px}
  .cp-mega--products{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr)}
  .cp-menu-panel.cp-mega--products>a.cp-mega-feature{display:none}
  .cp-mega--solutions{grid-template-columns:repeat(3,minmax(0,1fr))}
  .cp-menu-panel.cp-mega--solutions>a.cp-mega-feature{display:none}
}
@media(prefers-reduced-motion:reduce){.cp-menu-panel.cp-mega{animation:none}}
/* Feature cards: white text on a deeper shade so it reads on any photo. */
@media(min-width:901px){
  .cp-menu-panel.cp-mega .cp-mega-feature .cp-eyebrow{color:#fff;opacity:.92;letter-spacing:1.6px}
  .cp-mega-feature::after{background:linear-gradient(180deg,rgba(15,24,38,0) 15%,rgba(15,24,38,.55) 50%,rgba(15,24,38,.92) 100%)}
  .cp-mega-feature-text{text-shadow:0 1px 12px rgba(0,0,0,.35)}
}
