/* =========================================
   基本字體 / 版面
========================================= */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    padding: 0;
    padding-top: 60px; /* 因為 navbar sticky 在上面，所以 body 往下推一點 */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f5f5f5;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* 讓主內容有一點底部空間 */
.fg-main-container {
    padding-bottom: 2rem;
}

/* 接近 Bootstrap text-white-75 的效果（全站共用） */
.text-white-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* =========================================
   Focus 樣式
========================================= */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #e05b18;
}

/* =========================================
   NAVBAR (橘色企業風，背景不變，黑字版)
========================================= */
.fg-nav {
    background: linear-gradient(90deg, #ff8a3c, #ffb347);
    color: #111827;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

/* 右上帳號區基礎排版 */
.fg-nav-user {
    gap: 0.5rem;
}

/* navbar 裡用 text-white-75 的東西一律改黑色 */
.fg-nav .text-white-75 {
    color: #111827 !important;
}

    .fg-nav .text-white-75 i {
        color: #111827 !important;
    }

/* 左上 LOGO 圖片大小 */
.fg-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* 桌機版主選單擺位：和 Logo 拉開，三個項目之間有固定間距 */
@media (min-width: 992px) {
    .fg-nav-main {
        margin-left: 60px;
        gap: 2.4rem;
    }
}

/* 導覽列連結：黑字＋底線滑動動畫（排除 admin-link & Admin 下拉） */
.fg-nav .nav-link {
    position: relative;
    color: rgba(17, 24, 39, 0.9);
    font-weight: 600;
    font-size: 0.96rem;
    letter-spacing: 0.03em;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    text-shadow: none;
    transition: color 0.18s ease, opacity 0.18s ease;
}

    /* 只有一般頁籤要底線，不包含 .admin-link 與 .fg-user-toggle */
    .fg-nav .nav-link:not(.admin-link):not(.fg-user-toggle)::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -0.18rem;
        width: 0;
        height: 2px;
        border-radius: 999px;
        background: rgba(17, 24, 39, 0.95);
        transition: width 0.22s ease;
    }

    .fg-nav .nav-link:hover {
        color: #111827;
    }

    /* hover / active 展開底線，但一樣排除 admin-link & Admin 下拉 */
    .fg-nav .nav-link:not(.admin-link):not(.fg-user-toggle):hover::after,
    .fg-nav .nav-link:not(.admin-link):not(.fg-user-toggle).active::after {
        width: 100%;
    }

    /* active 狀態保持深色字 */
    .fg-nav .nav-link.active {
        color: #111827;
    }

/* 漢堡按鈕在橘色底上維持白色圖示 */
.navbar-toggler {
    border: 0;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler-icon {
    filter: invert(1);
}

/* 登入按鈕：白色膠囊 + 黑字 */
.fg-btn-outline-light {
    border-radius: 999px;
    border-width: 1px;
    padding-inline: 18px;
    padding-block: 6px;
    font-weight: 600;
    font-size: 0.86rem;
    background-color: #ffffff;
    border-color: rgba(17, 24, 39, 0.08);
    color: #111827;
    text-shadow: none;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

    .fg-btn-outline-light:hover {
        background-color: #111827;
        color: #ffffff;
        border-color: #111827;
        box-shadow: 0 8px 18px rgba(0,0,0,0.25);
        transform: translateY(-1px);
    }

/* 管理後台連結：白色膠囊按鈕（無底線動畫） */
.admin-link {
    color: #111827 !important;
    font-weight: 600;
    border-radius: 999px;
    padding: 6px 14px !important;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(17, 24, 39, 0.12);
    text-shadow: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.18);
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}

    .admin-link:hover {
        background: #111827;
        border-color: #111827;
        color: #ffffff !important;
        box-shadow: 0 8px 18px rgba(0,0,0,0.3);
        transform: translateY(-1px);
    }

    .admin-link.active {
        background: #111827;
        border-color: #ffffff;
        color: #ffffff !important;
    }

/* 齒輪 icon 動畫 */
.admin-gear-icon {
    transition: transform 0.25s ease;
    font-size: 1.02rem;
}

.admin-link:hover .admin-gear-icon {
    transform: rotate(25deg);
}

/* 帳號下拉：admin + 純黑字 + 黑色小三角形（無膠囊） */
.fg-user-dropdown .fg-user-toggle {
    padding: 0.25rem 0;
    border-radius: 0;
    color: #111827;
    font-weight: 500;
    text-shadow: none;
    border: none;
    background-color: transparent;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* 帳號下拉：admin + 純黑字 + 黑色小三角形（無膠囊） */
.fg-user-dropdown .fg-user-toggle {
    padding: 0.25rem 0;
    border-radius: 0;
    color: #111827;
    font-weight: 500;
    text-shadow: none;
    border: none;
    background-color: transparent;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* hover：恢復細底線（但沒有黑色粗底線動畫） */
.fg-user-toggle:hover {
    color: #000000;
    text-decoration: underline;
}


/* 右側黑色小箭頭（只有三角形，不要外框背景） */
.fg-user-caret {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #111827;
    margin-left: 2px;
}

/* 下拉選單樣式 */
.fg-user-dropdown .dropdown-menu {
    min-width: 120px;
    font-size: 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(209, 213, 219, 0.9);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
    padding-block: 0.3rem;
}

.fg-user-dropdown .dropdown-item {
    font-size: 0.9rem;
    padding: 0.4rem 0.9rem;
}

    .fg-user-dropdown .dropdown-item:hover {
        background-color: #fffbeb;
        color: #b45309;
    }

/* 手機版導覽列展開排版調整 */
@media (max-width: 991.98px) {

    .fg-nav .navbar-collapse {
        padding-top: 0.5rem;
        padding-bottom: 0.75rem;
    }

    .fg-nav-main {
        margin-left: 0;
        gap: 0.4rem;
    }

        .fg-nav-main .nav-link {
            padding-left: 0;
            padding-right: 0;
        }

    .fg-nav-user {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.35);
        align-items: center;
        justify-content: flex-start;
        gap: 0.5rem;
    }

        .fg-nav-user .nav-link,
        .fg-nav-user form {
            margin-left: 0;
        }
}

/* =========================================
   HERO 橫幅區
========================================= */
.fg-hero-banner {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
    height: 380px;
}

.fg-hero-img {
    width: 100%;
    height: 120%;
    object-fit: cover;
    object-position: 60% 60%;
    filter: brightness(0.8);
}

.fg-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: 2.5rem;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.45) 60%, rgba(0, 0, 0, 0.75) 100%);
    color: #fff;
}

.fg-hero-title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.fg-hero-breadcrumb {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.7);
}

/* 手機縮小 hero 文字 */
@media (max-width: 768px) {
    .fg-hero-img {
        height: 45vh;
    }

    .fg-hero-title {
        font-size: 2.1rem;
    }
}

/* =========================================
   左側分類 Sidebar
========================================= */
.fg-category-sidebar {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    padding: 0;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* 詳細頁用的黑色小標題 */
.fg-category-header {
    padding: .75rem 1.25rem;
    background: #000;
    color: #fff;
    text-transform: uppercase;
    font-weight: 600;
    font-size: .85rem;
    letter-spacing: .08em;
}

/* 每一個 accordion 外框 */
.fg-accordion-item {
    border: none;
    margin: 0 0 4px 0;
}

/* 上層三個大分類 header（黑底膠囊＋自訂箭頭） */
.fg-filter-header {
    background: #020617;
    border-radius: 999px;
    padding: 0.9rem 1.25rem;
    font-weight: 600;
    color: #e5e7eb !important;
    border: 1px solid rgba(148, 163, 184, 0.7);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.55);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, color 0.2s ease, border-color 0.2s ease;
    background-image: none;
    position: relative;
}

    /* 自訂箭頭 */
    .fg-filter-header::after {
        content: "";
        flex-shrink: 0;
        width: 1rem;
        height: 1rem;
        margin-left: auto;
        background-repeat: no-repeat;
        background-size: 1rem 1rem;
        background-position: center;
        transition: transform 0.2s ease, filter 0.2s ease;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23e5e7eb' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M3.25 5.75L8 10.25L12.75 5.75'/%3e%3c/svg%3e");
    }

    /* hover：稍微變亮一點的黑 + 浮起 */
    .fg-filter-header:hover {
        background: linear-gradient(135deg, #020617, #111827);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.8);
        transform: translateY(-1px);
        cursor: pointer;
    }

    /* 展開中：維持黑底＋橘色重點 */
    .fg-filter-header:not(.collapsed) {
        background: linear-gradient(135deg, #020617, #111827) !important;
        color: #f97316 !important;
        border-color: #f97316;
        box-shadow: 0 10px 26px rgba(248, 113, 30, 0.45);
    }

        .fg-filter-header:not(.collapsed)::after {
            transform: rotate(-180deg);
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23f97316' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M3.25 5.75L8 10.25L12.75 5.75'/%3e%3c/svg%3e");
        }

/* 產品分類內部「大分類」按鈕 */
.fg-category-item {
    border-radius: 0;
    padding: .65rem 1.25rem;
    font-size: .95rem;
    background-color: #ffffff;
    color: #333;
    border-left: 3px solid transparent;
    transition: all 0.18s ease;
}

    .fg-category-item:hover {
        background: #fafafa;
        border-left-color: #e05b18;
    }

    /* 大分類展開中底線分隔 */
    .fg-category-item:not(.collapsed) {
        box-shadow: inset 0 -1px 0 #f0f0f0;
    }

    /* 大分類 active（有選到的小類） */
    .fg-category-item.active {
        background: #ffeedb;
        color: #e05b18;
        font-weight: 600;
        border-left-color: #e05b18;
    }

/* 小分類連結（包含品牌 / 車種子項） */
.fg-subcategory-link {
    position: relative;
    font-size: .9rem;
    padding: .45rem 1.75rem;
    border: 0;
    color: #555;
    background: transparent;
    transition: all 0.18s ease;
}

    /* 左側橘色線，預設為透明 */
    .fg-subcategory-link::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        width: 3px;
        height: 100%;
        border-radius: 0 3px 3px 0;
        background: transparent;
        transition: background 0.18s ease;
    }

    /* 小分類 hover：淡灰背景 + 橘線 */
    .fg-subcategory-link:hover {
        background: #f7f7f7;
    }

        .fg-subcategory-link:hover::before {
            background: #fbbf77;
        }

    /* 小分類 active：淡橘背景 + 深橘線 */
    .fg-subcategory-link.active {
        background: #ffeedb;
        color: #e05b18;
        font-weight: 600;
    }

        .fg-subcategory-link.active::before {
            background: #e05b18;
        }

    /* 產品分類的小類：active 左側直線改成淡橘 */
    .fg-subcategory-link.fg-subcategory-maincat.active::before {
        background: #fbbf77;
    }

/* =========================================
   搜尋列：膠囊風格
========================================= */
.fg-search-wrapper {
    width: 100%;
    max-width: 420px;
}

.fg-search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    border-radius: 999px;
    padding: 4px 6px 4px 10px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.fg-search-icon {
    flex: 0 0 auto;
    color: #9ca3af;
    font-size: 0.95rem;
    padding-inline: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fg-search-input {
    border: none;
    outline: none;
    flex: 1 1 auto;
    font-size: 0.9rem;
    background: transparent;
    padding: 4px 8px;
    min-width: 140px;
}

    .fg-search-input::placeholder {
        color: #9ca3af;
    }

    .fg-search-input:focus {
        outline: none;
    }

/* 橘色搜尋按鈕 */
.fg-search-btn {
    flex: 0 0 auto;
    border-radius: 999px;
    border: none;
    padding: 6px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    background: linear-gradient(135deg, #ff8a3c, #e05b18);
    color: #fff;
    box-shadow: 0 6px 14px rgba(248, 113, 30, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
    white-space: nowrap;
}

    .fg-search-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(248, 113, 30, 0.45);
        background: linear-gradient(135deg, #ff9a50, #f97316);
    }

    .fg-search-btn:active {
        transform: translateY(0);
        box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
    }

/* 清除搜尋連結 */
.fg-search-clear-link {
    font-size: 0.78rem;
    color: #6b7280;
    text-decoration: none;
}

    .fg-search-clear-link:hover {
        color: #e05b18;
        text-decoration: underline;
    }

@media (max-width: 576px) {
    .fg-search-form {
        padding: 3px 6px;
    }

    .fg-search-btn {
        padding: 4px 12px;
        font-size: 0.8rem;
    }
}

/* =========================================
   產品卡片 Grid
========================================= */
.fg-product-grid {
    margin-top: .5rem;
}

.product-card {
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    overflow: hidden;
    background: #ffffff;
    transition: transform .18s ease, box-shadow .18s ease;
}

    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 24px rgba(0,0,0,0.16);
    }

.product-thumb-wrapper {
    background: #ffffff;
    height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f1f1f1;
}

.product-thumb-img {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
}

.product-info {
    padding: .75rem .9rem 1rem;
}

.product-subtitle {
    font-size: .78rem;
    letter-spacing: .04em;
}

.product-title {
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.3;
}

.product-part-number {
    font-size: .78rem;
    color: #888;
}

.product-price {
    font-weight: 700;
    color: #e05b18;
    font-size: .95rem;
}

/* =========================================
   分頁列 Pagination
========================================= */
.fg-pagination-bar {
    margin-top: 1.5rem;
    padding: 0.75rem 1.1rem;
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(209, 213, 219, 0.7);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.fg-page-info {
    color: #6b7280;
    white-space: nowrap;
}

    .fg-page-info strong {
        color: #111827;
    }

/* 中間頁碼按鈕區：膠囊風 */
.fg-page-nav {
    display: flex;
    align-items: center;
    justify-content: center;
}

    .fg-page-nav .pagination {
        margin: 0;
    }

    .fg-page-nav .page-link {
        border-radius: 999px !important;
        border: 1px solid #e5e7eb;
        color: #4b5563;
        font-size: 0.82rem;
        padding: 0.25rem 0.65rem;
        margin: 0 2px;
        background: #ffffff;
        transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    }

        .fg-page-nav .page-link:hover {
            background: #fff7ed;
            color: #e05b18;
            border-color: #f97316;
            transform: translateY(-1px);
            box-shadow: 0 4px 10px rgba(248, 113, 30, 0.28);
        }

    .fg-page-nav .page-item.active .page-link {
        background: linear-gradient(135deg, #ff8a3c, #e05b18);
        border-color: #e05b18;
        color: #ffffff;
        box-shadow: 0 6px 14px rgba(248, 113, 30, 0.4);
        transform: translateY(-1px);
    }

    .fg-page-nav .page-item.disabled .page-link {
        opacity: 0.45;
        cursor: default;
        box-shadow: none;
        transform: none;
    }

/* 右側跳頁區 */
.fg-page-jump {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #6b7280;
    white-space: nowrap;
}

.fg-page-jump-label {
    font-size: 0.82rem;
}

.fg-page-select {
    min-width: 70px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.9);
    padding: 0.25rem 1.6rem 0.25rem 0.7rem;
    font-size: 0.82rem;
    color: #111827;
    background-color: #ffffff;
    background-image: none;
    outline: none;
    appearance: none;
    position: relative;
}

/* 手機版：讓分頁列改為上下堆疊 */
@media (max-width: 768px) {
    .fg-pagination-bar {
        border-radius: 16px;
        padding: 0.7rem 0.9rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .fg-page-nav {
        width: 100%;
        justify-content: center;
    }

    .fg-page-jump {
        align-self: flex-end;
    }
}

/* =========================================
   商品詳細頁（舊版基礎樣式）
========================================= */
.product-detail-card {
    border-radius: 16px;
}

/* 圖片改固定正方形卡片 */
.product-detail-image-wrapper {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    padding: 1.5rem;
    text-align: center;
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-detail-title {
    font-size: 1.6rem;
    font-weight: 700;
}

.product-detail-partnumber {
    letter-spacing: .08em;
}

.product-detail-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e05b18;
}

.product-detail-description {
    font-size: .95rem;
}

/* 上方賣場描述：預留約 5 行高度 */
.fg-store-desc {
    min-height: 6.5em;
    line-height: 1.5;
    white-space: pre-line;
}

/* 內頁麵包屑 */
.fg-detail-breadcrumb {
    background: linear-gradient(120deg, #f9fafb, #fef3c7);
    border-radius: 999px;
    padding: .45rem 1.1rem;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .15rem;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10);
    border: 1px solid #fde68a;
}

    .fg-detail-breadcrumb::before {
        content: "";
        width: 6px;
        height: 6px;
        border-radius: 999px;
        background: linear-gradient(135deg, #f97316, #ea580c);
        margin-right: .4rem;
        box-shadow: 0 0 0 4px rgba(248, 113, 30, 0.18);
    }

.fg-breadcrumb-link {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
}

    .fg-breadcrumb-link:hover {
        color: #e05b18;
        text-decoration: underline;
    }

.fg-breadcrumb-current {
    color: #111827;
    font-weight: 700;
}

/* 大類 / 小類 Tag */
.fg-tag-main,
.fg-tag-sub {
    display: inline-flex;
    align-items: center;
    padding: .2rem .7rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.fg-tag-main {
    background: linear-gradient(135deg, #ff8a3c, #e05b18);
    color: #fff;
    box-shadow: 0 6px 12px rgba(248, 113, 30, 0.35);
}

.fg-tag-sub {
    border: 1px solid #e05b18;
    color: #e05b18;
    background: #fff7ed;
}

/* 明細表 Table */
.fg-detail-table {
    border-collapse: separate;
    border-spacing: 0;
}

    .fg-detail-table thead {
        background: #111827;
        color: #fff;
    }

        .fg-detail-table thead th {
            border: none;
            font-size: .8rem;
            letter-spacing: .06em;
            text-transform: uppercase;
            padding: .55rem 10px;
        }

    .fg-detail-table tbody td {
        border-top-color: #e5e7eb;
        padding: .55rem 10px;
        vertical-align: middle;
    }

    /* 欄位寬度 */
    .fg-detail-table th:nth-child(1),
    .fg-detail-table td:nth-child(1) {
        width: 24% !important;
    }

    .fg-detail-table th:nth-child(2),
    .fg-detail-table td:nth-child(2) {
        width: 52% !important;
    }

    .fg-detail-table th:nth-child(3),
    .fg-detail-table td:nth-child(3) {
        width: 8% !important;
    }

    .fg-detail-table th:nth-child(4),
    .fg-detail-table td:nth-child(4) {
        width: 16% !important;
    }

    /* 規格 / 單位 padding 微調 */
    .fg-detail-table th:nth-child(2),
    .fg-detail-table td:nth-child(2),
    .fg-detail-spec-cell {
        padding-right: 2px;
    }

    .fg-detail-table th:nth-child(3),
    .fg-detail-table td:nth-child(3),
    .fg-detail-unit-cell {
        padding-left: 2px;
    }

/* 規格欄文字 */
.fg-detail-spec-cell {
    line-height: 1.35;
    white-space: pre-line;
}

/* VIP 特惠 badge + 價格 */
.fg-vip-badge {
    font-size: .7rem;
    font-weight: 700;
    padding: .18rem .55rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
    animation: vipGlow 1.6s ease-in-out infinite alternate;
}

.fg-price {
    font-weight: 800;
    font-size: 1rem;
    color: #e05b18;
}

@keyframes vipGlow {
    from {
        box-shadow: 0 0 0 rgba(251, 191, 36, 0.0);
        transform: translateY(0);
    }

    to {
        box-shadow: 0 0 12px rgba(251, 191, 36, 0.7);
        transform: translateY(-1px);
    }
}

/* =========================================
   Footer 黏底（黑底版）
========================================= */
.fang-footer {
    background: #111;
    color: white;
    margin-top: auto;
}

    .fang-footer .footer-icon {
        font-size: 1.5rem;
        color: #ffffffb3;
        text-decoration: none;
    }

        .fang-footer .footer-icon:hover {
            color: #e05b18;
        }

.footer-link {
    color: #ffffffb3;
    text-decoration: none;
}

    .footer-link:hover {
        color: #e05b18;
    }

.footer-bottom {
    background: #000;
    font-size: .85rem;
    color: #ffffffa8;
    border-top: 1px solid #222;
}

/* =========================================
   PRODUCT DETAILS — PREMIUM 版
========================================= */

/* 麵包屑 Premium 版 */
.fgp-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1.2rem;
    border-radius: 999px;
    background: linear-gradient(120deg, #fdfdfd, #fbf7ee);
    border: 1px solid #f3e0b5;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    font-size: .85rem;
    color: #374151;
}

    .fgp-breadcrumb a {
        text-decoration: none;
        color: #6b7280;
        font-weight: 600;
    }

        .fgp-breadcrumb a:hover {
            color: #e05b18;
        }

    .fgp-breadcrumb span.current {
        font-weight: 700;
        color: #111827;
    }

    .fgp-breadcrumb span {
        color: #9ca3af;
    }

/* 上半：大圖＋資訊區塊 */
.fgp-product-hero {
    background: #ffffff;
    border-radius: 18px;
    padding: 2rem 2rem;
    box-shadow: 0 10px 28px rgba(0,0,0,0.06);
}

/* 大圖卡片 */
.fgp-product-image-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.2rem;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.fgp-product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform .25s ease;
}

    .fgp-product-image:hover {
        transform: scale(1.04);
    }

/* 標題與描述 */
.fgp-info-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.3;
}

.fgp-info-desc {
    font-size: .95rem;
    color: #585858;
    line-height: 1.6;
    min-height: 5.5em;
}

/* Meta（品牌 / 車種 / 地區） */
.fgp-info-meta {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #6b7280;
    font-size: .85rem;
}

    .fgp-info-meta i {
        margin-right: .3rem;
        color: #e05b18;
    }

/* Tag 樣式（主類 / 小類） */
.fgp-tag-main,
.fgp-tag-sub {
    font-size: .72rem;
    padding: .25rem .75rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: .05em;
}

/* 主類：橘色 */
.fgp-tag-main {
    background: linear-gradient(135deg, #ff8a3c, #e05b18);
    color: #fff;
    box-shadow: 0 4px 10px rgba(238, 108, 26, 0.35);
}

/* 小類：白底橘框 */
.fgp-tag-sub {
    background: #fff7ed;
    border: 1px solid #f97316;
    color: #e05b18;
}

/* 下半：規格列表 */
.fgp-spec-list {
    background: transparent;
}

/* 標題列：品牌品號 / 規格 / 單位 / 售價 */
.fgp-spec-header {
    display: grid;
    grid-template-columns: 25% 25% 15% 35%;
    column-gap: 0.75rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #ffffff;
    font-weight: 800;
    padding: 0.65rem 1.2rem;
    margin-bottom: 0.15rem;
    border-radius: 999px;
    background: #111827;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.fgp-spec-header-col {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.fgp-spec-header-price {
    justify-content: flex-start;
}

/* 每一列卡片 */
.fgp-spec-card {
    display: grid;
    grid-template-columns: 25% 25% 15% 35%;
    column-gap: 0.75rem;
    align-items: center;
    margin-top: 0.6rem;
    background: #ffffff;
    border-radius: 18px;
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 14px rgba(15,23,42,0.06);
    transition: box-shadow .2s ease, transform .2s ease;
}

    .fgp-spec-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 24px rgba(15,23,42,0.12);
    }

/* 品號 Tag */
.fgp-spec-part-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: .35rem .9rem;
    background: #020617;
    color: #f9fafb;
    font-weight: 700;
    border-radius: 999px;
    font-size: .85rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* 規格 */
.fgp-spec-desc {
    font-size: 0.92rem;
    color: #374151;
    line-height: 1.3;
    display: flex;
    align-items: center;
}

/* 單位 */
.fgp-spec-unit {
    font-size: 0.82rem;
    color: #111827;
    font-weight: 600;
    display: flex;
    align-items: center;
}

/* 價格欄 */
.fgp-spec-price {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding-right: 0;
}

    /* 售價數字 */
    .fgp-spec-price .value {
        font-size: 1.1rem;
        font-weight: 800;
        color: #e05b18;
    }

    /* Premium 版 VIP Badge */
    .fgp-spec-price .fgp-vip-badge,
    .fgp-vip-badge {
        padding: .25rem .75rem;
        font-size: .75rem;
        font-weight: 700;
        background: #fef3c7;
        border: 1px solid #fcd34d;
        border-radius: 999px;
        color: #92400e;
        box-shadow: 0 0 0 rgba(251, 191, 36, 0.0);
        animation: vipGlow 1.6s ease-in-out infinite alternate;
    }

/* 手機調整：改成上下堆疊 */
@media (max-width: 768px) {

    .fgp-product-hero {
        padding: 1.4rem 1.4rem;
    }

    .fgp-spec-header {
        display: none;
    }

    .fgp-spec-card {
        grid-template-columns: 1fr;
        row-gap: 0.3rem;
        padding: 0.75rem 0.85rem;
    }

    .fgp-spec-part-tag {
        justify-content: flex-start;
    }

    .fgp-spec-price {
        justify-content: flex-start;
    }
}

/* 返回按鈕 */
.fgp-back-btn {
    display: inline-block;
    padding: .6rem 1.8rem;
    border-radius: 999px;
    border: 2px solid #333;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: all .2s ease;
}

    .fgp-back-btn:hover {
        background: #333;
        color: #fff;
    }

/* ===============================
   修正黑色分類 hover / focus 閃白
================================= */

/* 完全蓋掉 Bootstrap 對 accordion-button 的白底與陰影 */
.accordion-button.fg-filter-header,
.accordion-button.fg-filter-header.collapsed,
.accordion-button.fg-filter-header:focus {
    background-color: #020617 !important;
    background-image: none !important;
    color: #e5e7eb !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.55);
    outline: none;
}

    /* 展開中仍使用橘色高亮 */
    .accordion-button.fg-filter-header:not(.collapsed) {
        background: linear-gradient(135deg, #020617, #111827) !important;
        color: #f97316 !important;
        border-color: #f97316;
        box-shadow: 0 10px 26px rgba(248, 113, 30, 0.45);
    }

    /* focus 狀態略微強調邊框即可 */
    .accordion-button.fg-filter-header:focus-visible {
        outline: none;
        box-shadow: 0 0 0 0.12rem rgba(249, 115, 22, 0.55), 0 8px 22px rgba(15, 23, 42, 0.75);
    }

/* =========================================
   修正黑底分類文字邊緣模糊
========================================= */
.accordion-button.fg-filter-header {
    transform: none !important;
    text-shadow: none !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

    .accordion-button.fg-filter-header:hover,
    .accordion-button.fg-filter-header:focus,
    .accordion-button.fg-filter-header:focus-visible {
        transform: none !important;
        background: linear-gradient(135deg, #020617, #111827) !important;
        color: #f97316 !important;
        border-color: #f97316;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.7);
    }

    .accordion-button.fg-filter-header.collapsed,
    .accordion-button.fg-filter-header.collapsed:hover {
        background-color: #020617 !important;
        color: #e5e7eb !important;
        transform: none !important;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.55);
    }
