/* Product List V2 */
.product-v2-page {
    background: #f7f8fa;
    color: #1C283A;
}

/* Banner */
.product-v2-banner {
    width: 100%;
    overflow: hidden;
    background: #e9edf1;
}
.product-v2-banner img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1920 / 616;
    object-fit: cover;
}
.product-v2-banner picture {
    display: block;
    width: 100%;
}

/* Main */
.product-v2-main {
    width: min(1600px, calc(100% - 160px));
    margin: 0 auto;
    padding: 34px 0 100px;
}

/* Toolbar */
.product-v2-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 54px;
}

/* Topic filter */
.product-v2-filter-area {
    position: relative;
    flex: 1;
    min-width: 0;
}
.product-v2-filter-top {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.product-v2-filter-button {
    appearance: none;
    border: 0;
    min-width: 120px;
    height: 38px;
    padding: 0 18px;
    border-radius: 999px;
    background: #1C283A;
    color: #F8F9FA;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background .2s ease, transform .2s ease;
}
.product-v2-filter-button:hover {
    background: #182231;
}
.product-v2-filter-button:active {
    transform: translateY(1px);
}
.product-v2-filter-arrow {
    font-size: 11px;
    transition: transform .2s ease;
}
.product-v2-filter-button.is-open .product-v2-filter-arrow {
    transform: rotate(180deg);
}

/* 已選標籤 */
.product-v2-selected {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.product-v2-selected:empty {
    display: none;
}
.product-v2-tag {
    height: 30px;
    padding: 0 12px 0 15px;
    border: 0;
    border-radius: 999px;
    background: #CFD3DB;
    color: #1C283A;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.product-v2-tag-x {
    font-size: 15px;
    line-height: 1;
    color: #8b929a;
}
.product-v2-clear {
    appearance: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8A8B8C;
    font-size: 13px;
    cursor: pointer;
}
.product-v2-clear:hover {
    color: #B5B6B7;
    text-decoration: underline;
}

/* 下拉選單 */
.product-v2-filter-dropdown {
    display: none;
    position: absolute;
    z-index: 50;
    top: 42px;
    left: 0;
    width: 340px;
    min-height: 390px;
    padding: 42px 28px 18px;
    background-image: url("../../images/product/篩選器底圖.svg");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% 100%;
}
.product-v2-filter-dropdown.is-open {
    display: block;
}

/* 兩欄議題 */
.product-v2-topic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    row-gap: 15px;
}

/* 單一議題 */
.product-v2-topic-option {
    appearance: none;
    width: 100%;
    min-height: 20px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1C283A;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    text-align: left;
}

/* checkbox */
.product-v2-topic-check {
    order: -1;
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    border: 1px solid #65717d;
    border-radius: 1px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 10px;
    line-height: 1;
}
.product-v2-topic-option:hover .product-v2-topic-check {
    border-color: #1C283A;
}

/* 已選 */
.product-v2-topic-option.is-selected .product-v2-topic-check {
    background: #1C283A;
    border-color: #1C283A;
    color: #F8F9FA;
}
/* 下方操作 */
.product-v2-filter-actions {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* 套用篩選 */
.product-v2-filter-apply {
    appearance: none;
    min-width: 122px;
    height: 30px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: #1C283A;
    color: #F8F9FA;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease;
}
.product-v2-filter-apply:hover {
    background: #F8F9FA;
    color: #1C283A;
    border-color: #1C283A;
}

/* 清除全部 */
.product-v2-filter-clear {
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    color: #8A8B8C;
    font-size: 13px;
    cursor: pointer;
}
.product-v2-filter-clear:hover {
    color: #465563;
    text-decoration: underline;
}

/* Search */
.product-v2-search {
    position: relative;
    width: 180px;
    flex: 0 0 auto;
    transition: width .25s ease;
}
.product-v2-search:hover,
.product-v2-search:focus-within {
    width: 230px;
}
.product-v2-search input {
    display: block;
    width: 100%;
    height: 38px;
    padding: 0 44px 0 16px;
    border: 1px solid #7c8793;
    border-radius: 999px;
    background: transparent;
    color: #1C283A;
    font-size: 13px;
    outline: none;
}
.product-v2-search input::placeholder {
    color: #68727d;
}
.product-v2-search-button {
    appearance: none;
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-v2-search-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Product Grid 12 欄：
 * 商品 = 4 欄
 * CTA = 8 欄 */
.product-v2-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 80px;
    row-gap: 34px;
    align-items: stretch;
}

/* Product card */
.product-v2-item {
    grid-column: span 4;
    min-width: 0;
}
.product-v2-card {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 138px;
    padding: 23px 48px 23px 24px;
    background: #F8F9FA;
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
    box-shadow:
        0 7px 16px rgba(36, 50, 68, .10),
        2px 4px 5px rgba(36, 50, 68, .08);
    transition:
        background-color .3s ease,
        transform .3s ease,
        box-shadow .3s ease;
}
.product-v2-card:hover {
    color: inherit;
    text-decoration: none;
    background: #E7E9EC;
    transform: translateY(-2px);
    box-shadow:
        0 12px 24px rgba(36, 50, 68, .16),
        2px 6px 8px rgba(36, 50, 68, .11);
}
.product-v2-card-image {
    width: 122px;
    flex: 0 0 122px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 14px;
}
.product-v2-card-image img {
    display: block;
    max-width: 112px;
    max-height: 112px;
    width: auto;
    height: auto;
    object-fit: contain;
    transform-origin: center center;
    transition: transform .2s ease-out;
}
.product-v2-card:hover .product-v2-card-image img {
    transform: rotate(35deg);
}
.product-v2-card-image-placeholder {
    width: 54px;
    height: 18px;
    border-radius: 999px;
    background: #dfe4e8;
}
.product-v2-card-content {
    flex: 1;
    min-width: 0;
}
.product-v2-card-title {
    margin: 0 0 2px;
    color: #1C283A;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.35;
}
.product-v2-card-en {
    margin: 0 0 13px;
    color: #7e8790;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.product-v2-card-description {
    margin: 0;
    color: #1C283A;
    font-size: 16px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-v2-card-arrow {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 20px;
    height: 20px;
    color: #1C283A;
    transition: transform .18s ease-out;
}
.product-v2-card-arrow svg {
    display: block;
    width: 100%;
    height: 100%;
}
.product-v2-card-arrow path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: square;
    stroke-linejoin: miter;
}
.product-v2-card:hover .product-v2-card-arrow {
    transform: translate(3px, -3px);
}

/* CTA */
.product-v2-cta {
    position: relative;
    grid-row: span 2;
    min-height: 0;
    overflow: hidden;
    border-radius: 14px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
.product-v2-cta::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 10px;
    background: linear-gradient(110deg,
            rgba(70, 85, 99, .30) 1%,
            rgba(248, 249, 250, .30) 99%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.product-v2-cta--right {
    grid-column: 5 / span 8;
}
.product-v2-cta--left {
    grid-column: 1 / span 8;
}
.product-v2-cta-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 32px 62px;
    display: grid;
    grid-template-columns: 1fr 260px;
    align-items: center;
    gap: 32px;
}
.product-v2-cta-title {
    margin: 0 0 32px;
    color: #F8F9FA;
    font-size: 28px;
    font-weight: 400;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-v2-cta-description {
    max-width: 570px;
    margin: 0;
    color: rgba(255, 255, 255, .95);
    font-size: 18px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-v2-cta-action {
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-v2-cta-button {
    min-width: 240px;
    height: 50px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: #F8F9FA;
    color: #1C283A;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    transition:
        background-color .2s ease,
        color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}
.product-v2-cta-button:hover {
    background: #465563;
    color: #F8F9FA;
    border-color: #344250;
    text-decoration: none;
    /*transform: translateY(-2px);*/
    box-shadow: 0 6px 14px rgba(28, 40, 58, .22);
}

/* Empty */
.product-v2-empty {
    grid-column: 1 / -1;
    padding: 80px 20px;
    text-align: center;
    color: #7c8793;
    font-size: 15px;
}

/* Loading */
.product-v2-loading {
    grid-column: 1 / -1;
    padding: 80px 20px;
    text-align: center;
    color: #7c8793;
    font-size: 14px;
}

/* Tablet */
@media (max-width: 1200px) {
    .product-v2-main {
        width: min(100% - 36px, 900px);
    }
    .product-v2-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }
    .product-v2-item {
        grid-column: span 1;
    }
    .product-v2-cta,
    .product-v2-cta--right,
    .product-v2-cta--left {
        grid-column: 1 / -1;
        grid-row: auto;
        min-height: 280px;
    }
    .product-v2-cta-inner {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 28px;
    }
}

@media (max-width: 767px) {
    .product-v2-banner img {
        aspect-ratio: auto;
    }
    .product-v2-main {
        width: calc(100% - 70px);
        padding-top: 24px;
    }
    .product-v2-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        margin-bottom: 34px;
    }
    .product-v2-search {
        order: 1;
        width: 100%;
    }
    .product-v2-filter-area {
        order: 2;
        width: 100%;
    }
    .product-v2-search:hover,
    .product-v2-search:focus-within {
        width: 100%;
    }
    .product-v2-grid {
        grid-template-columns: 1fr;
        row-gap: 20px;
    }
    .product-v2-item,
    .product-v2-cta,
    .product-v2-cta--right,
    .product-v2-cta--left {
        grid-column: 1;
    }
    .product-v2-card {
        min-height: 128px;
    }
    .product-v2-cta {
        height: 430px;
        min-height: 0;
    }
    .product-v2-cta-inner {
        padding: 32px 48px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 0;
    }
    .product-v2-cta-action {
        flex: 0 0 auto;
        justify-content: center;
    }
    .product-v2-cta-button {
        min-width: 200px;
        margin-bottom: 20px;
    }
    .product-v2-filter-dropdown {
        top: 42px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100vw - 30px);
        max-width: 390px;
        padding: 44px 34px 24px;
    }
    .product-v2-topic-option {
        min-height: 22px;
        gap: 14px;
        font-size: 15px;
        line-height: 1.45;
        white-space: nowrap;
    }
    .product-v2-topic-check {
        width: 15px;
        height: 15px;
        flex: 0 0 15px;
        font-size: 10px;
    }
    .product-v2-filter-actions {
        margin-top: 32px;
        gap: 15px;
    }
    .product-v2-filter-apply {
        min-width: 160px;
        height: 36px;
        padding: 0 24px;
        font-size: 15px;
    }
    .product-v2-filter-clear {
        font-size: 14px;
    }
    .product-v2-cta-copy {
        min-height: 0;
        overflow: hidden;
    }
    .product-v2-cta-title {
        font-size: 24px;
        line-height: 1.3;
        margin: 16px 0 42px;
        -webkit-line-clamp: 3;
    }
    .product-v2-cta-description {
        font-size: 16px;
        line-height: 1.3;
        -webkit-line-clamp: 5;
    }
} 