/* 頂部導航樣式（家具站） */
.top-nav { position: sticky; top: 0; z-index: 1000; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 6px; padding: 10px 16px; background-color: #ffffff; border-bottom: 1px solid #eee; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: flex; align-items: center; }
.search { display: flex; align-items: center; gap: 8px; }
.search-input { height: 32px; border: 1px solid #ddd; border-radius: 6px; padding: 0 10px; min-width: 220px; }
.search-go { border: none; background: #f5f5f5; border-radius: 6px; padding: 6px 10px; cursor: pointer; display: none; }
/* 有文字時顯示跳轉按鈕；空文字時隱藏 */
.search-input:not(:placeholder-shown) + .search-go { display: inline-flex; }
.menu { display: flex; align-items: center; gap: 16px; }
.menu a { color: #333; text-decoration: none; padding: 6px 10px; border-radius: 6px; }
.menu a.active, .menu a:hover { background: #f5f5f5; }

/* 第二行分類膠囊導覽 */
.menu2 { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; column-gap: 40px; padding: 10px 12px; border-top: 1px solid #eee; }
.menu2 > .menu2-item:nth-child(1){ justify-self: start; }
.menu2 > .menu2-item:nth-child(2){ justify-self: center; }
.menu2 > .menu2-item:nth-child(3){ justify-self: end; }
.menu2 > .menu2-item > a { display:inline-flex; align-items:center; padding:8px 12px; border-radius:8px; }
.menu2 a.active, .menu2 a:hover { color: #8ff573; }
/* 避免頂層樣式影響下拉內的連結 */
.menu2 .dropdown a { width:auto; height:auto; margin:0; padding:4px 8px; }

/* 右側（第三個）菜單的下拉向左展開，避免超出視窗 */
.menu2 > .menu2-item:last-child .dropdown { left:auto; right:0; }

/* 下拉選單（滑鼠懸浮顯示） */
.menu2-item { position: relative; }
.menu2-item .dropdown { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 180px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.08); padding: 6px; z-index: 1200; }
.menu2-item.open .dropdown { display: block; }
.menu2-item .dropdown a { display: block; color: #374151; padding: 8px 10px; border-radius: 6px; text-decoration: none; }
.menu2-item .dropdown a:hover { background: #f5f5f5; }

/* 巨型下拉（多欄） */
.menu2-item .dropdown.megamenu { min-width: unset; width: 900px; max-width: calc(100vw - 40px); font-size: 13px; padding: 12px 16px; display: none; grid-template-columns: 180px 150px 150px 150px 150px 120px; gap: 14px; align-items: start; }
.menu2-item .dropdown.megamenu .mega-left { border-right: 1px solid #eee; padding-right: 12px; }
.menu2-item .dropdown.megamenu .mega-left .mega-group { display:flex; align-items:center; justify-content: space-between; color:#6b7280; padding:6px 8px; border-radius:8px; font-size: 13px; }
.menu2-item .dropdown.megamenu .mega-left .mega-group:hover { background:#f8faf9; color:#0f5132; }
.menu2-item .dropdown.megamenu .mega-left .mega-group.active { background:#eff6f3; color:#2f6f5f; }
.menu2-item .dropdown.megamenu .mega-left .chev { color:#9ca3af; }

.menu2-item .dropdown.megamenu .mega-col { display:flex; flex-direction:column; gap:4px; padding-top:2px; }
.menu2-item .dropdown.megamenu .mega-title { display:flex; align-items:center; font-weight:600; color:#0f5132; font-size: 14px; line-height:1.4; padding:4px 0; margin-bottom:8px; border-bottom:1px solid #edf1f0; }
.menu2-item .dropdown.megamenu .mega-col a { color:#374151; padding:2px 0; border-radius:6px; font-size: 13px; line-height:1.5; }

/* 面板容器佈局：置於第 2-5 欄 */
.menu2-item .dropdown.megamenu .mega-panels { grid-column: 2 / span 4; display: grid; grid-auto-flow: row; }
.menu2-item .dropdown.megamenu .mega-panel { display: none; }
.menu2-item .dropdown.megamenu .mega-panel.active { display: grid; gap: 14px; }
.menu2-item .dropdown.megamenu .mega-panel.cols-4 { grid-template-columns: repeat(4, 1fr); }
.menu2-item .dropdown.megamenu .mega-panel.cols-3 { grid-template-columns: repeat(3, 1fr); }
.menu2-item .dropdown.megamenu .mega-panel.cols-2 { grid-template-columns: repeat(3, 1fr); }
.menu2-item .dropdown.megamenu .mega-panel.cols-1 { grid-template-columns: repeat(3, 1fr); }
/* 右側 Learn More 置於第 6 欄 */
.menu2-item .dropdown.megamenu .mega-right { grid-column: 6; }
.menu2-item .dropdown.megamenu .mega-col a:hover { background:#f5f5f5; }

.menu2-item .dropdown.megamenu .mega-right { display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.menu2-item .dropdown.megamenu .mega-learn { color:#6b7280; font-weight:600; font-size: 13px; }
.menu2-item .dropdown.megamenu .mega-more { display:inline-block; color:#2f6f5f; border:1px solid #d1e8e1; background:#eff6f3; padding:5px 8px; border-radius:14px; font-size: 13px; }
.menu2-item .dropdown.megamenu .mega-more:hover { background:#e6f2ed; }
.menu2-item.open .dropdown.megamenu { display: grid; }

