/* ==========================================================================
   RS Tsaitang Product — 前台表格樣式
   ========================================================================== */

/* ── 容器：等寬、無額外間距 ── */
.rstp-table {
    width: 100%;
    background: #FFFEFB;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 32px;
    letter-spacing: 1.6px;
    color: #2C2624;
    box-sizing: border-box;
}

.rstp-table *,
.rstp-table *::before,
.rstp-table *::after {
    box-sizing: border-box;
}

/* ── 每行 ── */
.rstp-row {
    display: flex;
    width: 100%;
}

/* ── 並排模式：左右各一組（屬性、包裝發貨） ── */
.rstp-pair {
    flex: 1 1 0;
    display: flex;
    min-width: 0;
}

/* ── Cell 共用：只給 border-bottom ── */
.rstp-cell--label,
.rstp-cell--value {
    padding: 16px;
    border-bottom: 1px solid #D0C4B2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ── 第一行才加 border-top ── */
.rstp-row:first-child .rstp-cell--label,
.rstp-row:first-child .rstp-cell--value {
    border-top: 1px solid #D0C4B2;
}

/* ── 標題格 ── */
.rstp-cell--label {
    width: 136px;
    min-width: 136px;
    max-width: 136px;
    background: #F3EEE8;
}

/* 左側組 & 全寬行的標題：加左邊框 */
.rstp-pair--left > .rstp-cell--label,
.rstp-row--full > .rstp-cell--label {
    border-left: 1px solid #D0C4B2;
}

/* 右側組的標題：不加左邊框 */
.rstp-pair--right > .rstp-cell--label {
    border-left: none;
}

/* 右側組標題 letter-spacing 微調 */
.product .rstp-pair--right .rstp-cell--label {
    letter-spacing: 1px;
}

/* ── 值格 ── */
.rstp-cell--value {
    flex: 1 1 0;
    min-width: 0;
}

/* 右側組的值格：加右邊框 */
.rstp-pair--right > .rstp-cell--value {
    border-right: 1px solid #D0C4B2;
}

/* 全寬行（奇數最後一行 & 產品規格）：值格加右邊框 */
.rstp-row--full > .rstp-cell--value {
    border-right: 1px solid #D0C4B2;
}

/* ==========================================================================
   手機板：≤767px
   ========================================================================== */
@media (max-width: 767px) {

    .rstp-table {
        font-size: 14px;
        line-height: 24px;
        letter-spacing: 1px;
    }

    /* 每行改為不並排 */
    .rstp-row {
        flex-direction: column;
    }

    /* 並排組改為全寬 */
    .rstp-pair {
        width: 100%;
        flex: none;
    }

    /* 每組仍然是左右兩欄 */
    .rstp-pair,
    .rstp-row--full {
        display: flex;
        flex-direction: row;
    }

    /* 標題格固定寬度 */
    .rstp-cell--label {
        width: 110px;
        min-width: 110px;
        max-width: 110px;
        padding: 12px;
    }

    /* 值格 */
    .rstp-cell--value {
        padding: 12px;
    }

    /* 手機板統一邊框：所有標題格加左邊框 */
    .rstp-cell--label {
        border-left: 1px solid #D0C4B2;
    }

    /* 手機板統一邊框：所有值格加右邊框 */
    .rstp-cell--value {
        border-right: 1px solid #D0C4B2;
    }

    /* 右側組標題：手機板補回左邊框 */
    .product .rstp-pair--right .rstp-cell--label {
        border-left: 1px solid #D0C4B2;
    }
}

/* ==========================================================================
   ≤689px 微調
   ========================================================================== */
@media (max-width: 689px) {

    .product .rstp-pair--right .rstp-cell--label {
        font-size: 15px;
    }

    /* 第三塊（產品規格）第一行右側標題特殊縮小 */
    .elementor-element:nth-child(3) .elementor-widget-shortcode .elementor-shortcode .rstp-table .rstp-row:nth-child(1) .rstp-pair--right .rstp-cell--label {
        font-size: 13px;
    }
}
