@charset "UTF-8";
.RWDproduct002_v3 {
    clear: both;
    width: 100%;
    max-width: 2120px;
    margin: 0 auto;
    font-size: 15px;
    line-height: 1.5;
    --categoryGroupWidth: calc(100% / 3);
    --categoryGroupMargin: 15px;
}

#is-all-block,
#only-all-block {
    display: block;
}

@media (max-width: 1199px) {
    .RWDproduct002_v3 {
        font-size: 14px;
    }
}
@media (max-width: 768px) {
    .RWDproduct002_v3 {
        font-size: 13px;
    }
}
@media (max-width: 576px) {
    .RWDproduct002_v3 {
        font-size: 12px;
    }
}

/*標題區，樣式跟其他模組一致*/
.product-section-header {
    margin: 20px 0 50px;
    text-align: center;
}

.section-main-title {
    margin: 0 0 15px;
    font-size: 2.4em;
    letter-spacing: 3px;
    font-weight: bold;
}

.section-subtitle {
    margin: 0 0 15px;
    font-size: 1.2em;
    letter-spacing: 2px;
}

/* 頁籤按鈕樣式 */
.category-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 10px;
    flex-wrap: wrap;
}

.category-tab-button {
    padding: 12px 24px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    color: #6c757d;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.category-tab-button:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

.category-tab-button.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

@media (max-width: 768px) {
    .category-tabs {
        gap: 8px;
    }
    
    .category-tab-button {
        padding: 10px 18px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .category-tab-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/*產品項目區塊*/
.product-gallery-container {
    position: relative;
    overflow: hidden;
    margin: 70px 0;
}

.product-portfolio {
    display: block;
}

.category-group {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.category-group.active {
    display: block;
    opacity: 1;
}

.category-group.fade-in {
    animation: fadeIn 0.4s ease-in-out forwards;
}

.category-group.fade-out {
    animation: fadeOut 0.3s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, 300px);
    justify-content: center;
    gap: 30px;
    margin: 0 auto;
    padding: 0 15px;
    max-width: 100%;
}

.product-item {
    position: relative;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 450px;
    width: 300px;
    flex: 0 0 300px;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.product-link:hover {
    text-decoration: none;
    color: inherit;
}

.product-image-wrapper {
    position: relative;
    display: block;
    overflow: hidden;
    background: #f1f1f1;
    flex-shrink: 0;
    height: 60%;
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover .product-image-wrapper img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #EEE;
    color: #000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    z-index: 2;
}

/* 隱藏沒有內容的product-badge */
.product-badge:empty,
.product-badge[data-badge=""],
.product-badge[data-badge=" "] {
    display: none;
}

.product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 15px;
    background: white;
    height: 40%;
    overflow: hidden;
}

.product-name {
    display: -webkit-box;
    height: 2.4em;
    text-overflow: ellipsis;
    overflow: hidden;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 0.3em;
    color: #1d1d1f;
    font-size: 1em;
    font-weight: bold;
    line-height: 1.2;
}

.product-description {
    display: -webkit-box;
    color: #777;
    font-size: 0.85em;
    margin-bottom: 0.5em;
    line-height: 1.3;
    flex: 1;
    overflow: hidden;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-pricing {
    display: block;
    margin-top: auto;
}

.price-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-price {
    font-size: 1em;
    color: #1d1d1f;
    font-weight: bold;
}

.original-price {
    text-decoration: line-through;
    color: #828282;
    font-size: 0.9em;
}

/* 響應式設計 */
@media (max-width: 1199px) {
    .product-item {
        width: 280px;
        flex: 0 0 280px;
    }
    
    .product-list {
        grid-template-columns: repeat(auto-fit, 280px);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .product-item {
        width: 250px;
        height: 400px;
        flex: 0 0 250px;
    }
    
    .product-list {
        grid-template-columns: repeat(auto-fit, 250px);
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .product-item {
        width: 280px;
        height: 350px;
        flex: 0 0 280px;
    }
    
    .product-list {
        grid-template-columns: repeat(auto-fit, 280px);
        gap: 15px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-name {
        font-size: 0.95em;
    }
}
