/* ===== 基本設定 ===== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
    background: linear-gradient(135deg, #f4f8fb 0%, #edf3f8 100%);
    color: #1f2d3d;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* ===== 左側欄 ===== */
.sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #e7edf3;
    padding: 32px 20px;
    box-shadow: 4px 0 20px rgba(15, 23, 42, 0.04);
}

.sidebar-header {
    margin-bottom: 28px;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.6rem;
    color: #16324f;
}

.sidebar-header p {
    margin: 8px 0 0;
    font-size: 0.9rem;
    color: #7b8a9a;
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-list li {
    padding: 14px 14px;
    margin-bottom: 10px;
    border-radius: 14px;
    font-size: 1rem;
    color: #334155;
    cursor: pointer;
    transition: all 0.25s ease;
}

.category-list li:hover {
    background: #eef6ff;
    color: #1565c0;
    transform: translateX(4px);
}

.category-list li.active {
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    color: #0f4c9a;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

/* ===== 右側內容 ===== */
.content {
    flex: 1;
    padding: 40px;
}

.content-header {
    margin-bottom: 32px;
}

.section-label {
    margin: 0 0 10px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: #6b8db3;
    font-weight: 700;
}

.content-header h1 {
    margin: 0 0 12px;
    font-size: 2.2rem;
    color: #16324f;
}

.section-desc {
    margin: 0;
    max-width: 760px;
    color: #667085;
    line-height: 1.8;
    font-size: 1rem;
}

/* ===== 卡片區 ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 28px;
}

.card {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 560px;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

/* ===== 圖片區 ===== */
.card-image {
    width: 100%;
    height: 280px;
    background: linear-gradient(180deg, #f8fbfe 0%, #eef4f8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border-bottom: 1px solid #edf2f7;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 如果還沒放圖，可以用下面這段當佔位 */
/*
.card-image::before {
    content: "商品圖片";
    color: #94a3b8;
    font-size: 1.1rem;
}
.card-image img {
    display: none;
}
*/

/* ===== 卡片文字內容 ===== */
.card-body {
    padding: 26px 26px 30px;
}

.card-badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #eef6ff;
    color: #1565c0;
    font-size: 0.9rem;
    font-weight: 700;
}

.card-title {
    margin: 0 0 14px;
    font-size: 2rem;
    color: #16324f;
}

.card-desc {
    margin: 0 0 20px;
    font-size: 1rem;
    color: #667085;
    line-height: 1.8;
}

.card-tag {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 12px;
    background: #f4f8ff;
    color: #0f4c9a;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid #dbeafe;
}

/* ===== Hover 資訊 ===== */
.hover-info {
    position: absolute;
    inset: 0;
    background: rgba(21, 101, 192, 0.92);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.card:hover .hover-info {
    opacity: 1;
}

.hover-content h4 {
    margin: 0 0 18px;
    font-size: 1.8rem;
}

.hover-content p {
    margin: 10px 0;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ===== 響應式 ===== */
@media (max-width: 1100px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .card {
        min-height: 520px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e7edf3;
    }

    .content {
        padding: 24px;
    }

    .content-header h1 {
        font-size: 1.8rem;
    }

    .card-title {
        font-size: 1.7rem;
    }
}
.product-page {
    padding: 40px;
    min-height: 100vh;
    background: linear-gradient(135deg, #f4f8fb 0%, #edf3f8 100%);
}

.product-page-header {
    margin-bottom: 30px;
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    text-decoration: none;
    color: #1565c0;
    font-weight: 700;
}

.back-link:hover {
    text-decoration: underline;
}

.product-page-header h1 {
    margin: 0 0 12px;
    font-size: 2rem;
    color: #16324f;
}

.product-page-header p {
    margin: 0;
    color: #667085;
    font-size: 1rem;
}

.product-list-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.product-item {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.product-thumb {
    height: 180px;
    border-radius: 16px;
    background: #eef4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    margin-bottom: 16px;
}

.product-item h3 {
    margin: 0 0 10px;
    color: #16324f;
    font-size: 1.2rem;
}

.product-item p {
    margin: 0;
    color: #667085;
    line-height: 1.7;
}

@media (max-width: 900px) {
    .product-list-grid {
        grid-template-columns: 1fr;
    }
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}


.category-list li a {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: #334155;
    font-size: 1rem;
    transition: all 0.25s ease;
}

.category-list li a:hover {
    background: #eef6ff;
    color: #1565c0;
    transform: translateX(4px);
}

/* ===== 商品列表頁 ===== */
.products-page {
    min-height: 100vh;
    padding: 36px 40px 60px;
    background: #f5f5f5;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    gap: 20px;
}

.back-link {
    display: inline-block;
    text-decoration: none;
    color: #1565c0;
    font-weight: 700;
}

.back-link:hover {
    text-decoration: underline;
}

.products-header h1 {
    margin: 0;
    font-size: 2rem;
    color: #1f3b57;
}

.section-title-row {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.section-title-row h2 {
    margin: 0;
    font-size: 2rem;
    color: #1f5b89;
    font-weight: 700;
    position: relative;
    padding-left: 18px;
}

.section-title-row h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 8px;
    height: 32px;
    background: #f4a261;
    border-radius: 2px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 22px;
}

.product-card {
    background: #fff;
    border: 1px solid #d9d9d9;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.product-image-wrap {
    position: relative;
    width: 100%;
    height: 190px;
    background: #fafafa;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    display: block;
}

.image-placeholder {
    display: none;
    color: #9aa4b2;
    font-size: 1rem;
}

.product-image-wrap.no-image .image-placeholder {
    display: block;
}

.product-info {
    padding: 14px 12px 16px;
}

.product-name {
    margin: 0 0 8px;
    font-size: 1rem;
    line-height: 1.45;
    color: #243b53;
    min-height: 48px;
}

.product-brand {
    font-size: 0.9rem;
    color: #8a8a8a;
}

.empty-state {
    grid-column: 1 / -1;
    background: #fff;
    padding: 30px;
    border: 1px solid #ddd;
    color: #667085;
}

@media (max-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .products-page {
        padding: 24px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    .products-header h1,
    .section-title-row h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 520px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 商品詳細頁 ===== */
.detail-page {
    min-height: 100vh;
    padding: 36px 40px 60px;
    background: #f5f5f5;
}

.detail-header {
    margin-bottom: 24px;
}

.detail-main {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 32px;
}

.detail-gallery {
    display: flex;
    gap: 18px;
}

.detail-main-image-wrap {
    flex: 1;
    min-height: 520px;
    background: #fff;
    border: 1px solid #d9d9d9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.detail-main-image {
    max-width: 100%;
    max-height: 460px;
    object-fit: contain;
}

.detail-thumbs {
    width: 110px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.thumb-btn {
    border: 1px solid #ddd;
    background: #fff;
    padding: 8px;
    cursor: pointer;
    transition: 0.25s ease;
}

.thumb-btn img {
    width: 100%;
    height: 82px;
    object-fit: contain;
}

.thumb-btn.active {
    border: 2px solid #1f3b57;
}

.detail-info {
    background: transparent;
    padding-top: 8px;
}

.detail-name {
    margin: 0 0 12px;
    font-size: 2.2rem;
    line-height: 1.4;
    color: #1f3b57;
    font-weight: 500;
}

.detail-meta {
    color: #d34b4b;
    font-size: 0.95rem;
}

.detail-tabs-section {
    margin-top: 10px;
}

.detail-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 0;
}

.detail-tab {
    min-width: 160px;
    padding: 16px 22px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #243b53;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.25s ease;
}

.detail-tab.active {
    border: 2px solid #222;
    color: #f28c28;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.detail-panels {
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 28px 24px;
    margin-top: -1px;
}

.detail-panel {
    display: none;
    color: #243b53;
    line-height: 1.9;
    font-size: 1rem;
}

.detail-panel.active {
    display: block;
}

.detail-panel p {
    margin: 0 0 14px;
}

@media (max-width: 1024px) {
    .detail-main {
        grid-template-columns: 1fr;
    }

    .detail-gallery {
        flex-direction: column;
    }

    .detail-thumbs {
        width: 100%;
        flex-direction: row;
    }

    .thumb-btn {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .detail-page {
        padding: 24px;
    }

    .detail-main-image-wrap {
        min-height: 360px;
    }

    .detail-name {
        font-size: 1.8rem;
    }

    .detail-tab {
        flex: 1 1 50%;
        min-width: auto;
    }
}

.contact-block {
    line-height: 1.9;
}

.contact-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 14px 22px;
    background: #1565c0;
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s ease;
}

.contact-btn:hover {
    background: #0d47a1;
}

/* ===== 展場用視覺版 ===== */
.expo-page {
    min-height: 100vh;
    padding: 40px;
    background:
        radial-gradient(circle at top left, #eef6ff 0%, #f8fbff 35%, #f4f7fb 100%);
}

.expo-hero {
    margin-bottom: 42px;
}

.expo-label {
    margin: 0 0 10px;
    color: #5b87b2;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.expo-hero h1 {
    margin: 0 0 16px;
    font-size: 2.7rem;
    line-height: 1.25;
    color: #16324f;
}

.expo-desc {
    max-width: 900px;
    margin: 0;
    color: #5f6f82;
    font-size: 1.05rem;
    line-height: 1.9;
}

.expo-category-section {
    margin-bottom: 46px;
}

.expo-category-section h2 {
    margin: 0 0 22px;
    font-size: 1.6rem;
    color: #16324f;
}

.expo-category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.expo-category-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #dbe6f0;
    border-radius: 20px;
    padding: 22px 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    min-height: 210px;
}

.expo-category-card h3 {
    margin: 16px 0 12px;
    font-size: 1.2rem;
    color: #16324f;
}

.expo-category-card p {
    margin: 0;
    color: #667085;
    line-height: 1.8;
    font-size: 0.95rem;
}

.expo-category-card.active {
    background: linear-gradient(135deg, #1565c0 0%, #0f4c9a 100%);
    border: none;
}

.expo-category-card.active h3,
.expo-category-card.active p {
    color: #fff;
}

.expo-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.expo-status.planning {
    background: #eef3f8;
    color: #6b7280;
}

.expo-status.current {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
}

.expo-featured-section {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 34px;
    align-items: center;
    background: #fff;
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
    border: 1px solid #e6edf5;
}

.expo-featured-image {
    background: linear-gradient(180deg, #f9fbfd 0%, #eef4f8 100%);
    border-radius: 24px;
    padding: 24px;
    min-height: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expo-featured-image img {
    max-width: 100%;
    max-height: 390px;
    object-fit: contain;
}

.expo-featured-content h2 {
    margin: 0 0 10px;
    font-size: 2.2rem;
    color: #16324f;
}

.featured-label {
    margin: 0 0 10px;
    color: #1565c0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.featured-subtitle {
    margin: 0 0 18px;
    color: #6b7280;
    font-size: 1rem;
}

.featured-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.featured-tags span {
    background: #eef6ff;
    color: #1565c0;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
}

.featured-list {
    margin: 0 0 20px;
    padding-left: 20px;
    color: #334155;
    line-height: 1.9;
}

.featured-desc {
    margin: 0;
    color: #667085;
    line-height: 1.9;
}

@media (max-width: 1200px) {
    .expo-category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .expo-featured-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .expo-page {
        padding: 24px;
    }

    .expo-hero h1 {
        font-size: 2rem;
    }

    .expo-category-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 右上角 Logo → Hover 變 QR Code ===== */
.floating-contact {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    z-index: 999;
    cursor: pointer;
}

/* 兩張圖片疊在一起 */
.floating-contact img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 16px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

/* 初始狀態 */
.logo-img {
    opacity: 1;
}

.qr-img {
    opacity: 0;
    transform: scale(0.9);
}

/* hover 切換 */
.floating-contact:hover .logo-img {
    opacity: 0;
    transform: scale(0.9);
}

.floating-contact:hover .qr-img {
    opacity: 1;
    transform: scale(1);
}