/* 商品輪播組件樣式 - 完全按照 Figma 設計規格 */

/* 外層容器 */
.product-carousel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 0;
    width: 100%;
}

/* 內容區域 */
.product-carousel__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* 主要內容 */
.product-carousel__content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 0 0;
    min-height: 1px;
    min-width: 1px;
}

/* 標題區塊 */
.product-carousel__header {
    display: flex;
    gap: 10px;
    align-items: start;
    width: 100%;
    flex-shrink: 0;
}

/* 標題左側 */
.product-carousel__header-left {
    display: flex;
    flex: 1 0 0;
    gap: 10px;
    align-items: center;
    min-height: 1px;
    min-width: 1px;
}

/* 標題文字容器 */
.product-carousel__title-wrapper {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* 標題文字 */
.product-carousel__title {
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    letter-spacing: 0.42px;
    color: #333333;
    flex-shrink: 0;
}

/* 看更多區塊 */
.product-carousel__more {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.product-carousel__more-link {
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0.36px;
    color: #ff7800;
    text-decoration: none;
    flex-shrink: 0;
}

/* 商品列表容器 */
.product-carousel__items-wrapper {
    display: flex;
    gap: 10px;
    align-items: start;
    overflow-x: auto;
    overflow-y: clip;
    padding: 10px 0 10px 10px;
    width: 100%;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

/* 隱藏滾動條 */
.product-carousel__items-wrapper::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

/* 單個商品卡片 */
.product-carousel__item {
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 10px;
    border-radius: 5px;
    width: 150px;
    flex-shrink: 0;
    text-decoration: none;
}

/* 商品圖片容器 */
.product-carousel__item-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 5px 5px 0 0;
}

/* 商品圖片 */
.product-carousel__item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 商品資訊容器 */
.product-carousel__item-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px 0 6px;
    width: 100%;
    flex-shrink: 0;
}

/* 商品資訊內容 */
.product-carousel__item-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    flex-shrink: 0;
}

/* 商品標題容器 */
.product-carousel__item-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    flex-shrink: 0;
}

/* 商品標題 */
.product-carousel__item-title {
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
    color: #333333;
    width: 100%;
    height: 36px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: pre-wrap;
    flex-shrink: 0;
}

/* 商品價格容器 */
.product-carousel__item-price-wrapper {
    display: flex;
    gap: 3.111px;
    align-items: start;
    width: 100%;
    flex-shrink: 0;
}

/* 商品價格 */
.product-carousel__item-price {
    font-size: 12px;
    font-weight: 700;
    line-height: normal;
    color: #ff7800;
    text-align: center;
    flex-shrink: 0;
}

/* 延遲載入容器 */
.product-carousel-lazy {
    min-height: 0;
    transition: min-height 0.2s ease;
}

.product-carousel-lazy.is-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.product-carousel-lazy.is-loading::after {
    content: '';
    width: 28px;
    height: 28px;
    border: 3px solid #e0e0e0;
    border-top-color: #ff7800;
    border-radius: 50%;
    animation: carousel-spin 0.7s linear infinite;
}

@keyframes carousel-spin {
    to { transform: rotate(360deg); }
}
