﻿/* ===== Mega menu & dropdown ===== */
      .nav { position: relative; }
      .nav-item { position: relative; }
      .nav-item.has-mega:hover, .nav-item.has-dd:hover, .nav-item.has-cascade:hover, .nav-item.is-open { color: var(--primary); }
      .mega-menu, .use-dropdown, .cascade-menu {
        position: absolute;
        left: 0; right: 0; top: 100%;
        background: white;
        border-top: 1px solid var(--line-2);
        border-bottom: 1px solid var(--line-2);
        box-shadow: 0 24px 50px rgba(15,23,42,.08);
        z-index: 60;
        opacity: 0; visibility: hidden; transform: translateY(-6px);
        transition: opacity .15s, transform .15s, visibility 0s linear .15s;
      }
      .mega-menu.open, .use-dropdown.open, .cascade-menu.open {
        opacity: 1; visibility: visible; transform: translateY(0);
        transition: opacity .15s, transform .15s;
      }
      .mm-inner { max-width: var(--shop-wrap, 1200px); margin: 0 auto; padding: 28px var(--shop-gutter, 32px) 32px; }

      .mm-grid { display: grid; grid-template-columns: 1fr 320px; gap: 28px; }
      .mm-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
      .mm-col h4 {
        font-size: 11px; font-weight: 800;
        color: var(--muted); letter-spacing: .08em;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--line-2);
      }
      .mm-col ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
      .mm-col li a {
        display: block;
        padding: 8px 10px;
        border-radius: 8px;
        text-decoration: none;
        transition: background .12s;
      }
      .mm-col li a:hover { background: var(--primary-50); }
      .mm-col .ml-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.2; }
      .mm-col .ml-desc { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
      .mm-col li a:hover .ml-label { color: var(--primary); }

      .mm-side { display: flex; flex-direction: column; gap: 14px; }
      .mm-spotlight {
        display: block;
        background: linear-gradient(180deg, #FFFCEB 0%, #FFF7CC 100%);
        border: 1px solid #FCD34D;
        border-radius: 14px;
        padding: 16px;
        text-decoration: none;
        transition: transform .12s, box-shadow .12s;
      }
      .mm-spotlight:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(120,53,15,.18); }
      .mm-spot-img {
        background: white;
        border-radius: 10px;
        height: 110px;
        display: flex; align-items: center; justify-content: center;
        margin-bottom: 10px;
        padding: 6px;
      }
      .mm-spot-img svg { max-height: 100%; }
      .mm-spot-tag {
        display: inline-block;
        background: #78350F; color: white;
        font-size: 9.5px; font-weight: 800;
        padding: 3px 8px; border-radius: 5px;
        letter-spacing: .04em;
        margin-bottom: 6px;
      }
      .mm-spotlight h5 { font-size: 14px; font-weight: 800; color: #78350F; margin-bottom: 3px; }
      .mm-spotlight p { font-size: 11.5px; color: #92400E; opacity: .85; margin-bottom: 10px; }
      .mm-spot-row { display: flex; justify-content: space-between; align-items: center; }
      .mm-spot-price { font-size: 18px; font-weight: 800; color: #78350F; letter-spacing: -0.02em; }
      .mm-spot-price small { font-size: 11px; font-weight: 700; opacity: .65; margin-left: 4px; letter-spacing: 0; }
      .mm-spot-arrow {
        width: 28px; height: 28px;
        background: #78350F; color: white;
        border-radius: 8px;
        display: flex; align-items: center; justify-content: center;
      }
      .mm-spot-arrow svg { width: 12px; height: 12px; }
      .mm-spot-ai {
        display: flex; align-items: center; gap: 6px;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px dashed rgba(120,53,15,.3);
        font-size: 11px; font-weight: 700;
        color: #78350F;
      }
      .mm-spot-ai svg { width: 11px; height: 11px; color: #B45309; }

      .mm-promo {
        background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
        color: white;
        border-radius: 14px;
        padding: 16px;
        position: relative;
        overflow: hidden;
      }
      .mm-promo::before {
        content: ''; position: absolute; inset: 0;
        background: radial-gradient(circle at 100% 0%, rgba(139,92,246,.25), transparent 50%);
      }
      .mm-promo > * { position: relative; }
      .mm-promo-eyebrow {
        display: inline-flex; align-items: center; gap: 5px;
        background: linear-gradient(135deg, var(--primary), var(--violet));
        padding: 3px 8px;
        border-radius: 999px;
        font-size: 9.5px; font-weight: 800;
        letter-spacing: .04em;
        margin-bottom: 10px;
      }
      .mm-promo-eyebrow svg { width: 10px; height: 10px; }
      .mm-promo h6 { font-size: 14px; font-weight: 800; margin-bottom: 4px; line-height: 1.3; }
      .mm-promo p { font-size: 11.5px; opacity: .75; margin-bottom: 12px; line-height: 1.45; }
      .mm-promo-btn {
        background: white; color: var(--ink);
        padding: 9px 14px;
        border-radius: 8px;
        font-size: 12px; font-weight: 800;
        display: inline-flex; align-items: center; gap: 6px;
        cursor: pointer; border: none;
      }
      .mm-promo-btn:hover { background: var(--primary); color: white; }
      .mm-promo-btn svg { width: 12px; height: 12px; }

      /* Use case dropdown */
      .use-dropdown .mm-inner { padding: 24px 40px 26px; }
      .ud-head {
        display: flex; justify-content: space-between; align-items: baseline;
        margin-bottom: 16px;
      }
      .ud-head h4 { font-size: 14px; font-weight: 800; }
      .ud-all {
        font-size: 12px; color: var(--primary); font-weight: 700;
        display: inline-flex; align-items: center; gap: 4px;
        text-decoration: none;
      }
      .ud-all svg { width: 12px; height: 12px; }
      .ud-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
      }
      .ud-item {
        display: grid;
        grid-template-columns: 36px 1fr;
        gap: 10px;
        align-items: center;
        padding: 10px 12px;
        background: var(--soft);
        border: 1px solid var(--line-2);
        border-radius: 10px;
        text-decoration: none;
        color: var(--ink);
        transition: all .12s;
      }
      .ud-item:hover { background: var(--primary-50); border-color: var(--primary); }
      .ud-ic {
        width: 36px; height: 36px;
        background: white;
        border: 1px solid var(--line-2);
        border-radius: 8px;
        display: flex; align-items: center; justify-content: center;
        color: var(--primary);
      }
      .ud-item:hover .ud-ic { background: var(--primary); color: white; border-color: var(--primary); }
      .ud-ic svg { width: 16px; height: 16px; }
      .ud-label { display: block; font-size: 12.5px; font-weight: 800; line-height: 1.2; }
      .ud-count { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; font-weight: 600; }

      /* ===== Cascading 3-level menu ===== */
      .cas-grid { display: grid; grid-template-columns: 280px 1fr 260px; gap: 0; min-height: 380px; }
      .cas-cats {
        padding: 22px 16px;
        background: var(--soft);
        border-right: 1px solid var(--line-2);
        display: flex; flex-direction: column;
        gap: 2px;
      }
      .cas-cats-head {
        font-size: 10.5px; font-weight: 800;
        color: var(--muted); letter-spacing: .08em;
        padding: 0 12px 10px;
      }
      .cas-cat {
        display: grid;
        grid-template-columns: 32px 1fr 14px;
        gap: 10px; align-items: center;
        padding: 10px 12px;
        border-radius: 10px;
        text-decoration: none;
        color: var(--ink-2);
        cursor: pointer;
        transition: all .12s;
      }
      .cas-cat:hover, .cas-cat.active {
        background: white;
        color: var(--ink);
        box-shadow: 0 1px 3px rgba(15,23,42,.04);
      }
      .cas-cat.active { box-shadow: 0 4px 12px rgba(15,23,42,.06); }
      .cas-ic {
        width: 32px; height: 32px;
        background: white; border: 1px solid var(--line-2);
        border-radius: 8px;
        display: flex; align-items: center; justify-content: center;
        color: var(--primary);
        flex-shrink: 0;
      }
      .cas-cat.active .cas-ic {
        background: linear-gradient(135deg, var(--primary), var(--violet));
        color: white; border-color: transparent;
      }
      .cas-ic svg { width: 15px; height: 15px; }
      .cas-text { min-width: 0; }
      .cas-label { display: block; font-size: 13px; font-weight: 800; line-height: 1.2; }
      .cas-desc { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.3; }
      .cas-chev {
        color: var(--muted-2);
        display: flex;
      }
      .cas-chev svg { width: 12px; height: 12px; transform: rotate(-90deg); }
      .cas-cat.active .cas-chev { color: var(--primary); }
      .cas-bottom-cta {
        margin-top: auto;
        padding: 10px 12px;
        font-size: 11.5px;
        font-weight: 800;
        color: var(--primary);
        text-decoration: none;
        display: inline-flex; align-items: center; gap: 6px;
      }
      .cas-bottom-cta svg { width: 12px; height: 12px; transform: rotate(180deg); }

      /* Middle panel */
      .cas-panels {
        padding: 26px 28px;
        position: relative;
      }
      .cas-panel {
        display: none;
      }
      .cas-panel.active {
        display: flex;
        flex-direction: column;
        animation: fadeSlide .15s ease-out;
      }
      @keyframes fadeSlide {
        from { opacity: 0; transform: translateX(-8px); }
        to { opacity: 1; transform: translateX(0); }
      }
      .cas-panel-head { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
      .cas-panel-head h5 { font-size: 14px; font-weight: 800; margin-bottom: 3px; }
      .cas-panel-desc { font-size: 11.5px; color: var(--muted); }
      .cas-sub-list { display: flex; flex-direction: column; gap: 2px; }
      .cas-sub-item {
        display: flex; justify-content: space-between; align-items: center;
        padding: 9px 12px;
        border-radius: 8px;
        text-decoration: none;
        transition: background .1s;
      }
      .cas-sub-item:hover { background: var(--primary-50); }
      .cas-sub-label {
        font-size: 13px; font-weight: 700; color: var(--ink);
        line-height: 1.3;
      }
      .cas-sub-item:hover .cas-sub-label { color: var(--primary); }
      .cas-sub-desc {
        background: var(--soft); border: 1px solid var(--line-2);
        padding: 2px 7px; border-radius: 999px;
        font-size: 9.5px; font-weight: 800;
        color: var(--muted);
        letter-spacing: .04em;
        white-space: nowrap;
        margin-left: 12px;
      }
      .cas-all {
        display: inline-flex; align-items: center; gap: 6px;
        margin-top: 16px;
        padding-top: 14px;
        border-top: 1px dashed var(--line-2);
        font-size: 12px;
        font-weight: 700;
        color: var(--primary);
        text-decoration: none;
      }
      .cas-all svg { width: 12px; height: 12px; }
      .cas-all b { font-weight: 800; }

      /* Right featured */
      .cas-featured {
        background: linear-gradient(180deg, #FFFCEB 0%, #FFF7CC 100%);
        border-left: 1px solid var(--line-2);
        padding: 22px;
        display: flex;
        flex-direction: column;
      }
      .cas-feat-eyebrow {
        display: inline-flex; align-items: center; gap: 5px;
        background: linear-gradient(135deg, var(--primary), var(--violet));
        color: white;
        padding: 3px 9px; border-radius: 999px;
        font-size: 9.5px; font-weight: 800;
        letter-spacing: .04em;
        margin-bottom: 12px;
        align-self: flex-start;
      }
      .cas-feat-eyebrow svg { width: 10px; height: 10px; }
      .cas-feat-img {
        background: white;
        border-radius: 10px;
        height: 130px;
        display: flex; align-items: center; justify-content: center;
        margin-bottom: 12px;
        padding: 8px;
      }
      .cas-feat-img svg { max-height: 100%; }
      .cas-featured h6 { font-size: 14px; font-weight: 800; color: #78350F; margin-bottom: 4px; line-height: 1.3; }
      .cas-featured p { font-size: 11.5px; color: #92400E; opacity: .85; line-height: 1.5; margin-bottom: 12px; }
      .cas-feat-cta {
        margin-top: auto;
        background: #78350F; color: white;
        padding: 9px 14px; border-radius: 9px;
        font-size: 12px; font-weight: 800;
        display: inline-flex; align-items: center; gap: 6px;
        text-decoration: none;
        justify-content: center;
      }
      .cas-feat-cta:hover { background: #451A03; }
      .cas-feat-cta svg { width: 12px; height: 12px; }

      /* ===== AI panel ===== */
      .float-chat.is-open { background: var(--ink); }
      .ai-panel {
        position: fixed;
        bottom: 84px; right: 30px;
        width: 380px;
        max-height: 600px;
        background: white;
        border-radius: 18px;
        box-shadow: 0 28px 60px rgba(15,23,42,.25), 0 4px 12px rgba(15,23,42,.08);
        display: flex; flex-direction: column;
        z-index: 70;
        opacity: 0; visibility: hidden; transform: translateY(8px) scale(.98);
        transition: opacity .18s, transform .18s, visibility 0s linear .18s;
        overflow: hidden;
      }
      .ai-panel.open {
        opacity: 1; visibility: visible; transform: translateY(0) scale(1);
        transition: opacity .18s, transform .18s;
      }
      .ai-head {
        background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
        color: white;
        padding: 16px 18px;
        display: flex; justify-content: space-between; align-items: center;
        position: relative;
        overflow: hidden;
      }
      .ai-head::before {
        content: ''; position: absolute; inset: 0;
        background: radial-gradient(circle at 100% 0%, rgba(139,92,246,.3), transparent 60%);
      }
      .ai-head > * { position: relative; }
      .ai-head-left { display: flex; gap: 10px; align-items: center; }
      .ai-av {
        width: 36px; height: 36px;
        background: linear-gradient(135deg, var(--primary), var(--violet));
        border-radius: 10px;
        display: flex; align-items: center; justify-content: center;
        color: white;
        flex-shrink: 0;
      }
      .ai-av svg { width: 16px; height: 16px; }
      .ai-head h4 { font-size: 14px; font-weight: 800; margin-bottom: 1px; }
      .ai-head span {
        font-size: 11px;
        opacity: .7;
        display: flex; align-items: center; gap: 5px;
      }
      .ai-head span .dot {
        width: 6px; height: 6px;
        background: #10B981; border-radius: 50%;
        box-shadow: 0 0 0 0 rgba(16,185,129,.5);
        animation: ai-pulse 1.8s infinite;
      }
      @keyframes ai-pulse {
        0% { box-shadow: 0 0 0 0 rgba(16,185,129,.5); }
        70% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
      }
      .ai-close {
        background: rgba(255,255,255,.1);
        border: none;
        color: white;
        width: 30px; height: 30px;
        border-radius: 8px;
        display: flex; align-items: center; justify-content: center;
        cursor: pointer;
      }
      .ai-close:hover { background: rgba(255,255,255,.2); }
      .ai-close svg { width: 14px; height: 14px; }

      .ai-suggestions {
        padding: 12px 14px;
        background: var(--soft);
        border-bottom: 1px solid var(--line-2);
        display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
      }
      .ai-sug-label { font-size: 10.5px; font-weight: 800; color: var(--muted); letter-spacing: .04em; margin-right: 4px; }
      .ai-sug {
        background: white;
        border: 1px solid var(--line);
        padding: 6px 10px;
        border-radius: 999px;
        font-size: 11.5px; font-weight: 700;
        color: var(--ink-2);
        cursor: pointer;
      }
      .ai-sug:hover { border-color: var(--primary); color: var(--primary); }

      .ai-body {
        padding: 16px 18px;
        flex: 1;
        overflow-y: auto;
        display: flex; flex-direction: column; gap: 12px;
        max-height: 320px;
      }
      .ai-msg { display: flex; gap: 8px; align-items: flex-start; }
      .ai-msg.user { flex-direction: row-reverse; }
      .ai-msg .ai-av { width: 26px; height: 26px; border-radius: 8px; }
      .ai-msg .ai-av svg { width: 12px; height: 12px; }
      .ai-msg.user .ai-av { background: var(--soft-2); color: var(--muted); }
      .ai-bubble {
        background: var(--soft);
        border: 1px solid var(--line-2);
        border-radius: 12px 12px 12px 4px;
        padding: 10px 12px;
        font-size: 12.5px;
        color: var(--ink-2);
        line-height: 1.45;
        max-width: 84%;
      }
      .ai-bubble b { color: var(--ink); font-weight: 800; }
      .ai-msg.user .ai-bubble {
        background: var(--primary-50);
        border-color: rgba(37,99,235,.2);
        color: var(--ink);
        border-radius: 12px 12px 4px 12px;
      }

      .ai-typing {
        display: inline-flex; align-items: center; gap: 4px;
      }
      .ai-typing span {
        width: 6px; height: 6px; background: var(--muted-2); border-radius: 50%;
        animation: typing 1.2s infinite;
      }
      .ai-typing span:nth-child(2) { animation-delay: .15s; }
      .ai-typing span:nth-child(3) { animation-delay: .3s; }
      @keyframes typing {
        0%, 60%, 100% { transform: translateY(0); opacity: .4; }
        30% { transform: translateY(-4px); opacity: 1; }
      }

      .ai-input {
        display: flex; gap: 6px;
        padding: 12px 14px;
        border-top: 1px solid var(--line-2);
        background: white;
      }
      .ai-input input {
        flex: 1;
        border: 1.5px solid var(--line);
        border-radius: 10px;
        padding: 10px 12px;
        font-family: inherit;
        font-size: 13px;
        outline: none;
        color: var(--ink);
      }
      .ai-input input:focus { border-color: var(--primary); }
      .ai-send {
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 10px;
        width: 40px; height: 40px;
        display: flex; align-items: center; justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
      }
      .ai-send:hover { background: var(--primary-700); }
      .ai-send svg { width: 15px; height: 15px; }

      .ai-foot {
        padding: 9px 14px 11px;
        font-size: 10.5px;
        color: var(--muted);
        background: var(--soft);
        text-align: center;
        border-top: 1px solid var(--line-2);
      }
      .ai-foot span { display: inline-flex; align-items: center; gap: 5px; }
      .ai-foot svg { width: 10px; height: 10px; color: var(--success); }
