﻿
.remove-product-box {
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid #daf6ff;
    border-radius: 4px;
    box-shadow: 0px 0px 9px #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px 20px 15px 20px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
}

.remove-product-box > span {
    text-shadow: 0px 0px 9px #daf6ff;
    color: #daf6ff;
    font-family: 'Inconsolata', monospace;
    font-weight: 700;
}

.remove-product-box > span + span {
    margin-top: 10px;
}

.remove-product-box > div {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
}

.remove-product-box .box_cancel_btn,
.remove-product-box .box_save_btn {
    font-size: 22px;
}

.remove-product-box button {
    height: 40px;
    border-radius: 20px;
    padding: 5px 15px;
}

/* ---------------------------------------------------------------------------------------------------- */

.shop-container > .btn-box > .send-btn,
.shop-list-box > .btn-box > .send-btn {
    width: 110px;
    height: 44px;
    background-color: #8cbdcd;
    border-radius: 20px;
}

body.modal-open {
    overflow: hidden;
}

@media screen and (max-width: 767px) {
    .shop-container {
        width: var(--page-width);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 40px;
        margin-top: 110px;
        margin-bottom: 40px;
    }

    .shop-container > .title {
        align-self: center;
        font-size: 24px;
        font-weight: 700;
    }

    .shop-container > .check-all-box {
        width: 100%;
        height: 50px;
        background-color: #8ac1cc;
        color: #ffffff;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        font-size: 18px;
        font-weight: 700;
    }

    .shop-container > .check-all-box > input[type="checkbox"] {
        width: 20px;
        height: 20px;
        box-sizing: border-box;
        margin: 0px;
    }

    .shop-container > .content {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 40px;
    }

    .shop-container .table-div > .tbody > .tr > .td.td-img > img {
        max-width: calc(100% - 20px);
        max-height: calc(100% - 20px);
        margin: auto;
    }

    .shop-container .table-div > .tbody > .tr > .td:nth-child(4) > input {
        color: #000000;
        font-size: 16px;
        padding: 1px 15px 3px 15px;
        text-align: center;
    }

    .shop-container .table-div > .tbody > .tr > .td i.remove {
        margin-left: 10px;
    }

    .shop-container > .content > .total-box {
        width: 100%;
        color: #9c1f1f;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 20px;
        font-weight: 700;
        letter-spacing: 2px;
        padding-right: 17px;
    }

    /* ---------------------------------------------------------------------------------------------------- */

    .remove-product-box {
        width: var(--page-width);
    }

    .remove-product-box > span {
        font-size: 19px;
    }

    /* ---------------------------------------------------------------------------------------------------- */

    .shop-list-box {
        width: calc(100vw - 20px);
        height: calc(100dvh - 20px);
        max-height: calc(100dvh - 20px);
        background-color: #ffffff;
        box-shadow: 0px 0px 9px #000000;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        position: fixed;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        overflow: hidden;
        overscroll-behavior: contain;
        touch-action: pan-y;
        z-index: 9;
    }

    .shop-list-box > .header {
        width: 100%;
        height: 48px;
        flex-shrink: 0;
        background-color: #8ac1cc;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 20px;
        font-weight: 700;
        padding: 0px 20px;
    }

    .shop-list-box > .header > .closebox {
        width: 30px;
        height: 30px;
        background-color: #ffffff;
        border-radius: 50%;
        cursor: pointer;
        position: relative;
    }

    .shop-list-box > .header > .closebox > i {
        color: #f89a8b;
        font-size: 24px;
        pointer-events: none;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .shop-list-box > .content {
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 16px;
        overflow: hidden;
        padding: 0 12px;
    }

    .shop-list-box > .content > .title {
        align-self: center;
        flex-shrink: 0;
        font-size: 22px;
        font-weight: 700;
        margin-top: 16px;
    }

    .shop-list-box .table-div {
        flex: 1 1 auto;
        width: 100%;
        height: auto;
        min-height: 0;
        overflow: hidden;
    }

    .shop-list-box .table-div > .thead {
        display: none;
    }

    .shop-list-box .table-div > .tbody {
        height: 100%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        gap: 12px;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding-right: 2px;
    }

    /* 訂單確認 modal —— 完全獨立 class，不繼承 .table-div */
    .order-confirm {
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .order-confirm__head {
        display: none;
    }

    .order-confirm__body {
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        gap: 12px;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding-right: 2px;
    }

    .order-confirm__row {
        width: 100%;
        background-color: #ffffff;
        border: 1px solid #dddddd;
        border-radius: 8px;
        padding: 12px;
        display: grid;
        grid-template-columns: 80px minmax(0, 1fr);
        grid-template-rows: auto auto auto auto auto;
        gap: 6px 12px;
    }

    .order-confirm__cell {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }

    .order-confirm__cell--image {
        grid-column: 1;
        grid-row: 1 / span 5;
        width: 80px;
        height: 80px;
        align-self: center;
        justify-content: center;
    }

    .order-confirm__cell--image > img {
        width: 80px;
        height: 80px;
        object-fit: contain;
    }

    .order-confirm__cell--name {
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-start;
        min-height: 38px;
    }

    .order-confirm__row > .order-confirm__cell:nth-of-type(3) { grid-column: 2; grid-row: 2; }
    .order-confirm__row > .order-confirm__cell:nth-of-type(4) { grid-column: 2; grid-row: 3; }
    .order-confirm__row > .order-confirm__cell:nth-of-type(5) { grid-column: 2; grid-row: 4; }
    .order-confirm__row > .order-confirm__cell:nth-of-type(6) { grid-column: 2; grid-row: 5; }

    .order-confirm__name {
        font-size: 16px;
        font-weight: 700;
        text-align: left;
    }

    .order-confirm__label {
        flex-shrink: 0;
        color: #666666;
        font-size: 13px;
        font-weight: 400;
    }

    .order-confirm__value {
        font-size: 15px;
        font-weight: 600;
        text-align: right;
    }

    .shop-list-box > .content > .total-box {
        width: 100%;
        flex-shrink: 0;
        color: #9c1f1f;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        font-size: 20px;
        font-weight: 700;
        letter-spacing: 0;
        padding: 0 4px 4px;
    }

    .shop-list-box > .btn-box {
        width: 100%;
        flex-shrink: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 16px 0;
    }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
    .shop-container {
        width: var(--page-width);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 40px;
        margin: 70px 0px;
    }

    .shop-container > .title {
        align-self: center;
        font-size: 24px;
        font-weight: 700;
    }

    .shop-container > .check-all-box {
        width: 100%;
        height: 50px;
        background-color: #8ac1cc;
        color: #ffffff;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        font-size: 18px;
        font-weight: 700;
    }

    .shop-container > .check-all-box > input[type="checkbox"] {
        width: 20px;
        height: 20px;
        box-sizing: border-box;
        margin: 0px;
    }

    .shop-container > .content {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 40px;
    }

    .shop-container .table-div > .tbody > .tr > .td.td-img > img {
        max-width: calc(100% - 20px);
        max-height: calc(100% - 20px);
        margin: auto;
    }

    .shop-container .table-div > .tbody > .tr > .td:nth-child(4) > input {
        color: #000000;
        font-size: 16px;
        padding: 1px 15px 3px 15px;
        text-align: center;
    }

    .shop-container .table-div > .tbody > .tr > .td i.remove {
        margin-left: 10px;
    }

    .shop-container > .content > .total-box {
        width: 100%;
        color: #9c1f1f;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 20px;
        font-weight: 700;
        letter-spacing: 2px;
        padding-right: 17px;
    }

    /* ---------------------------------------------------------------------------------------------------- */

    .remove-product-box {
        width: var(--page-width);
    }

    .remove-product-box > span {
        font-size: 19px;
    }

    /* ---------------------------------------------------------------------------------------------------- */

    .shop-list-box {
        width: calc(100vw - 4px);
        height: calc(100vh - 72px);
        background-color: #ffffff;
        box-shadow: 0px 0px 9px #000000;
        border-radius: 20px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        position: fixed;
        top: 70px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 9;
    }

    .shop-list-box > .header {
        width: 100%;
        height: 40px;
        background-color: #8ac1cc;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 20px;
        font-weight: 700;
        padding: 0px 20px;
    }

    .shop-list-box > .header > .closebox {
        width: 30px;
        height: 30px;
        background-color: #ffffff;
        border-radius: 50%;
        cursor: pointer;
        position: relative;
    }

    .shop-list-box > .header > .closebox > i {
        color: #f89a8b;
        font-size: 24px;
        pointer-events: none;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .shop-list-box > .content {
        width: 100%;
        height: calc(100% - 124px);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 20px;
    }

    .shop-list-box > .content > .title {
        align-self: center;
        font-size: 24px;
        font-weight: 700;
        margin-top: 20px;
    }

    /* 訂單確認 modal —— 平板版用表格樣式 */
    .order-confirm {
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .order-confirm__head,
    .order-confirm__row {
        width: 100%;
        display: flex;
        align-items: center;
    }

    .order-confirm__head {
        height: 50px;
        flex-shrink: 0;
        background-color: #8cbdcd;
        border: 1px solid #8cbdcd;
        color: #ffffff;
        font-weight: 700;
    }

    .order-confirm__body {
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .order-confirm__row {
        min-height: 100px;
        border-right: 1px solid #d9d9d9;
        border-bottom: 1px solid #d9d9d9;
        border-left: 1px solid #d9d9d9;
    }

    .order-confirm__row:nth-child(even) {
        background-color: #f5f5f5;
    }

    .order-confirm__col,
    .order-confirm__cell {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 8px;
        font-size: 16px;
        text-align: center;
    }

    .order-confirm__col + .order-confirm__col {
        border-left: 1px solid #8cbdcd;
    }

    .order-confirm__cell + .order-confirm__cell {
        border-left: 1px solid #d9d9d9;
    }

    .order-confirm__col--image,
    .order-confirm__cell--image {
        flex: 0 0 120px;
    }

    .order-confirm__col--name,
    .order-confirm__cell--name {
        flex: 2;
    }

    .order-confirm__cell--image > img {
        max-width: 100%;
        max-height: 80px;
        object-fit: contain;
    }

    .order-confirm__name {
        font-weight: 700;
    }

    .order-confirm__label {
        display: none;
    }

    .order-confirm__value {
        font-weight: 600;
    }

    .shop-list-box > .content > .total-box {
        width: 100%;
        color: #9c1f1f;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 20px;
        font-weight: 700;
        letter-spacing: 2px;
        padding-right: 17px;
    }

    .shop-list-box > .btn-box {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 20px 0px;
    }
}

@media screen and (min-width: 1025px) {
    .shop-container {
        flex: auto;
        max-width: var(--page-max-width);
        width: var(--page-width);
        min-height: 92px;
        background-color: #ffffff;
        border-radius: 4px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 40px;
        margin: 310px 0px 80px 0px;
    }

    .shop-container > .title {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 30px;
        font-weight: 700;
    }

    .shop-container > .check-all-box { display: none; }

    .shop-container > .content {
        flex: auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 60px;
        position: relative;
    }

    .shop-container > .btn-box {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* ---------------------------------------------------------------------------------------------------- */

    .shop-container .table-div { flex: auto; height: auto; }

    .shop-container .table-div > .tbody > .tr { width: calc(100% - (100% - 1263px)); height: 121px; }

    .shop-container .table-div > .thead > .tr > .td:nth-child(1),
    .shop-container .table-div > .tbody > .tr > .td:nth-child(1) { width: 50px; }
    .shop-container .table-div > .thead > .tr > .td:nth-child(2),
    .shop-container .table-div > .tbody > .tr > .td:nth-child(2) { width: 120px; }
    .shop-container .table-div > .thead > .tr > .td:nth-child(3),
    .shop-container .table-div > .tbody > .tr > .td:nth-child(3) { flex: 1; }
    .shop-container .table-div > .thead > .tr > .td:nth-child(4),
    .shop-container .table-div > .tbody > .tr > .td:nth-child(4),
    .shop-container .table-div > .thead > .tr > .td:nth-child(5),
    .shop-container .table-div > .tbody > .tr > .td:nth-child(5),
    .shop-container .table-div > .thead > .tr > .td:nth-child(6),
    .shop-container .table-div > .tbody > .tr > .td:nth-child(6),
    .shop-container .table-div > .thead > .tr > .td:nth-child(7),
    .shop-container .table-div > .tbody > .tr > .td:nth-child(7) { width: 100px; }
    .shop-container .table-div > .thead > .tr > .td:nth-child(8),
    .shop-container .table-div > .tbody > .tr > .td:nth-child(8) { width: 200px; }
    .shop-container .table-div > .thead > .tr > .td:nth-child(9),
    .shop-container .table-div > .tbody > .tr > .td:nth-child(9) { width: 50px; }

    .shop-container .table-div > .tbody > .tr > .td:nth-child(2) > img {
        max-width: 100%;
        max-height: 100%;
    }

    .shop-container .table-div > .tbody > .tr > .td:nth-child(4) > input {
        color: #000000;
        font-size: 16px;
        padding: 1px 15px 3px 15px;
        text-align: center;
    }

    .shop-container .table-div > .tbody > .tr > .td:nth-child(8) > input {
        color: #000000;
        font-size: 16px;
    }

    /* ---------------------------------------------------------------------------------------------------- */

    .shop-container > .content > .total-box {
        width: 100%;
        color: #9c1f1f;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        font-size: 24px;
        font-weight: 700;
        letter-spacing: 2px;
        padding-right: 17px;
    }

    /* ---------------------------------------------------------------------------------------------------- */

    .remove-product-box > span {
        font-size: 24px;
    }

    /* ---------------------------------------------------------------------------------------------------- */

    .shop-list-box {
        max-width: var(--page-max-width);
        width: var(--page-width);
        height: 658px;
        background-color: #ffffff;
        box-shadow: 0px 0px 9px #000000;
        border-radius: 20px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        position: fixed;
        bottom: 60px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 9;
    }

    .shop-list-box > .header {
        width: 100%;
        height: 50px;
        background-color: #8ac1cc;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 20px;
        font-weight: 700;
        padding: 0px 20px;
    }

    .shop-list-box > .header > .closebox {
        width: 40px;
        height: 40px;
        background-color: #ffffff;
        border-radius: 50%;
        cursor: pointer;
        position: relative;
    }

    .shop-list-box > .header > .closebox > i {
        color: #f89a8b;
        font-size: 34px;
        pointer-events: none;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .shop-list-box > .content {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 40px;
        padding-left: 20px;
        position: relative;
    }

    .shop-list-box > .content > .title {
        align-self: center;
        font-size: 28px;
        font-weight: 700;
        margin-top: 40px;
    }

    .shop-list-box > .btn-box {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 40px 0px;
    }

    /* 訂單確認 modal —— 桌面版用表格樣式 */
    .order-confirm {
        width: calc(100% - 3px);
        height: 292px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .order-confirm__head,
    .order-confirm__row {
        width: 100%;
        display: flex;
        align-items: center;
    }

    .order-confirm__head {
        height: 50px;
        flex-shrink: 0;
        background-color: #8cbdcd;
        border: 1px solid #8cbdcd;
        color: #ffffff;
        font-weight: 700;
    }

    .order-confirm__body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        scrollbar-gutter: stable;
    }

    .order-confirm__row {
        flex-shrink: 0;
        height: 121px;
        border-right: 1px solid #d9d9d9;
        border-bottom: 1px solid #d9d9d9;
        border-left: 1px solid #d9d9d9;
    }

    .order-confirm__row:nth-child(even) {
        background-color: #f5f5f5;
    }

    .order-confirm__col,
    .order-confirm__cell {
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px;
        font-size: 16px;
        text-align: center;
    }

    .order-confirm__col + .order-confirm__col {
        border-left: 1px solid #8cbdcd;
    }

    .order-confirm__cell + .order-confirm__cell {
        border-left: 1px solid #d9d9d9;
    }

    .order-confirm__col--image,
    .order-confirm__cell--image {
        flex: 0 0 120px;
    }

    .order-confirm__col--name,
    .order-confirm__cell--name {
        flex: 1;
    }

    .order-confirm__col:not(.order-confirm__col--image):not(.order-confirm__col--name),
    .order-confirm__cell:not(.order-confirm__cell--image):not(.order-confirm__cell--name) {
        flex: 0 0 100px;
    }

    .order-confirm__cell--image > img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    .order-confirm__name {
        font-weight: 700;
    }

    .order-confirm__label {
        display: none;
    }

    .order-confirm__value {
        font-weight: 600;
    }

    /* ---------------------------------------------------------------------------------------------------- */

    .shop-list-box > .content > .total-box {
        width: calc(100% - 3px);
        color: #9c1f1f;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        font-size: 24px;
        font-weight: 700;
        letter-spacing: 2px;
        padding-right: 17px;
    }
}
