/* ===== 購買選擇彈窗（AddCartModal，共用 partial：_AddCartModalPartial） =====
   畫廊區（大圖＋縮圖列）＋規格資訊區；Category / Index / IndexPreview / Stream 四頁共用 */

/* --- 版面：桌機左右兩欄、手機直排 --- */
.addcart-modal__layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.addcart-modal__gallery-col {
    flex: 0 0 48%;
    min-width: 0;
}

.addcart-modal__info-col {
    flex: 1 1 auto;
    min-width: 0;
}

@media only screen and (max-width : 767px) {
    .addcart-modal__layout {
        flex-direction: column;
    }

    .addcart-modal__gallery-col {
        flex: 1 1 auto;
        width: 100%;
    }

    .addcart-modal__info-col {
        width: 100%;
    }
}

/* --- 畫廊：大圖區 --- */
.addcart-modal__gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f8f8f8;
    border-radius: 6px;
    overflow: hidden;
}

.addcart-modal__slide {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.addcart-modal__slide--active {
    display: flex;
}

.addcart-modal__slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.addcart-modal__video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000000;
}

.addcart-modal__video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.addcart-modal__video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- 畫廊：縮圖列（水平捲動） --- */
.addcart-modal__gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.addcart-modal__thumb {
    position: relative;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    background: none;
    cursor: pointer;
    overflow: hidden;
}

.addcart-modal__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.addcart-modal__thumb--active {
    border-color: #d9534f;
}

.addcart-modal__thumb-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    font-size: 12px;
    pointer-events: none;
}

/* --- 資訊區 --- */
.addcart-modal__slogan {
    margin-bottom: 10px;
}

.addcart-modal__slogan span {
    display: inline-block;
    background-color: #F46C4E;
    padding: 5px 10px;
    color: #ffffff;
    border-radius: 6px;
    font-size: 13px;
}

.addcart-modal__shortinfo {
    color: #666666;
    font-size: 14px;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.addcart-modal__row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 0;
}

.addcart-modal__row-label {
    flex: 0 0 auto;
    font-weight: 600;
    font-size: 14px;
}

.addcart-modal__row-value {
    font-size: 14px;
}

.addcart-modal__row-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.addcart-modal__select {
    width: auto;
    display: inline-block;
    font-size: 14px;
}

.addcart-modal__note {
    color: darkred;
    font-size: 14px;
    padding: 4px 0;
}

/* --- 數量步進器 --- */
.addcart-modal__amount {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.addcart-modal__amount-input {
    width: 64px;
    height: 31px;
    text-align: center;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

/* --- 價格 --- */
.addcart-modal__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0 0 0;
}

.addcart-modal__price-original {
    color: #999999;
    text-decoration: line-through;
    font-size: 15px;
}

.addcart-modal__price-plain {
    color: #333333;
    font-size: 17px;
    font-weight: 600;
}

.addcart-modal__price-current {
    color: #d9534f;
    font-size: 19px;
    font-weight: 700;
}

/* --- 加購彈窗（AddiPurcSelectModal）疊在上方時，底下的購買選擇彈窗暗化 30% 區隔兩層 --- */
#AddCartModal.addcart-modal--dimmed .modal-content {
    filter: brightness(0.7);
}

/* --- On Sale 標記 --- */
.addcart-modal__onsale {
    display: inline-block;
    margin-top: 8px;
    background-color: #d9534f;
    color: #ffffff;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
}
