/* ========================================================
   PHP Shop Mall - Cart, Checkout & Payment Stylesheet
======================================================== */

.cart-page, .checkout-page, .pay-cashier-page, .pay-success-page {
    padding: 30px 0 60px 0;
    min-height: 540px;
    background: #fdfdfd;
}

/* 进度条 */
.cart-flow-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #eeeeee;
}

.cart-page-title {
    float: left;
    font-size: 22px;
    font-weight: 800;
    color: #222222;
}

.cart-num-tag {
    color: var(--primary-red);
    font-size: 16px;
}

.cart-flow-steps {
    float: right;
    font-size: 14px;
    color: #999999;
}

.step-item.active {
    color: var(--primary-red);
    font-weight: bold;
}

/* ---------------- 购物车表格 ---------------- */
.cart-table-wrap {
    background: #ffffff;
    border: 1px solid #eeeeee;
    margin-bottom: 20px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    height: 44px;
    background: #f7f7f7;
    color: #666666;
    font-size: 13px;
    font-weight: normal;
    border-bottom: 1px solid #eeeeee;
}

.cart-table td {
    padding: 20px 10px;
    border-bottom: 1px solid #f2f2f2;
    text-align: center;
    vertical-align: middle;
}

.cart-row.selected-row {
    background: #fffcfb;
}

.checkbox-label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.cart-goods-info {
    display: flex;
    align-items: center;
    text-align: left;
    padding-left: 10px;
}

.cart-goods-thumb {
    width: 80px;
    height: 80px;
    border: 1px solid #eeeeee;
    margin-right: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-goods-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-goods-title {
    font-size: 13px;
    color: #333333;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-unit-price {
    font-size: 14px;
    color: #444444;
}

.cart-quantity-stepper {
    display: inline-flex;
    border: 1px solid #cccccc;
}

.cart-quantity-stepper .btn-step {
    width: 26px;
    height: 28px;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.cart-qty-input {
    width: 42px;
    height: 28px;
    border: none;
    border-left: 1px solid #cccccc;
    border-right: 1px solid #cccccc;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
}

.cart-subtotal {
    color: var(--primary-red);
    font-size: 16px;
    font-weight: bold;
}

.cart-del-btn {
    color: #888888;
    font-size: 13px;
}

.cart-del-btn:hover {
    color: var(--primary-red);
}

/* 购物车底部结算条 */
.cart-bottom-bar {
    height: 56px;
    line-height: 56px;
    background: #f7f7f7;
    border: 1px solid #e5e5e5;
    position: relative;
}

.bar-left {
    float: left;
    padding-left: 20px;
}

.continue-shopping {
    margin-left: 20px;
    color: #666666;
    font-size: 13px;
}

.bar-right {
    float: right;
    display: flex;
    align-items: center;
}

.selected-summary {
    margin-right: 20px;
    font-size: 13px;
    color: #666666;
}

.highlight-num {
    color: var(--primary-red);
    font-size: 16px;
    margin: 0 4px;
}

.total-label {
    font-size: 13px;
    color: #666666;
}

.total-amount-display {
    color: var(--primary-red);
    font-size: 18px;
    font-weight: bold;
    margin-right: 24px;
}

.total-amount-display strong {
    font-size: 26px;
}

.btn-checkout {
    height: 56px;
    width: 140px;
    background: var(--primary-red);
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-checkout:hover {
    background: var(--hover-red);
}

/* 空购物车 */
.empty-cart-box {
    text-align: center;
    padding: 80px 0;
    background: #ffffff;
    border: 1px solid #eeeeee;
}

.empty-cart-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-cart-box h3 {
    font-size: 18px;
    color: #333333;
    margin-bottom: 8px;
}

.empty-cart-box p {
    color: #888888;
    margin-bottom: 24px;
}

.btn-go-shopping {
    display: inline-block;
    padding: 10px 32px;
    background: var(--primary-red);
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
    border-radius: 4px;
}

/* ---------------- 订单结算核对页 ---------------- */
.checkout-card {
    background: #ffffff;
    border: 1px solid #eeeeee;
    padding: 24px;
    margin-bottom: 20px;
}

.checkout-card-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f2f2f2;
}

.card-title {
    float: left;
    font-size: 16px;
    font-weight: bold;
    color: #222222;
}

.btn-add-addr-link {
    float: right;
    color: var(--primary-red);
    font-size: 13px;
    font-weight: bold;
}

/* 地址卡片列表 */
.addr-list-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.addr-card-item {
    width: 275px;
    border: 2px solid #e0e0e0;
    padding: 14px;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.addr-card-item:hover, .addr-card-item.selected {
    border-color: var(--primary-red);
    background: #fffcfc;
}

.addr-card-top {
    margin-bottom: 8px;
    font-size: 14px;
}

.receiver-name {
    font-weight: bold;
    margin-right: 8px;
}

.receiver-phone {
    color: #666666;
}

.badge-default {
    background: #ff5722;
    color: #ffffff;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 2px;
    float: right;
}

.addr-card-detail {
    font-size: 12px;
    color: #666666;
    line-height: 1.4;
}

/* 支付方式选择单选块 */
.pay-methods-row {
    display: flex;
    gap: 16px;
}

.pay-item {
    border: 2px solid #dddddd;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: bold;
}

.pay-item.selected, .pay-item:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
    background: #fff9f9;
}

/* 送货清单表格 */
.order-items-table {
    width: 100%;
    border-collapse: collapse;
}

.order-items-table th {
    background: #f9f9f9;
    padding: 10px;
    font-size: 13px;
    color: #666666;
    text-align: left;
}

.order-items-table td {
    padding: 14px 10px;
    border-bottom: 1px solid #f2f2f2;
    font-size: 13px;
}

.order-goods-info {
    display: flex;
    align-items: center;
}

.goods-thumb {
    width: 50px;
    height: 50px;
    border: 1px solid #eeeeee;
    margin-right: 12px;
    object-fit: contain;
}

.goods-title {
    color: #333333;
}

.subtotal-cell {
    color: var(--primary-red);
    font-weight: bold;
}

/* 结算总额计算面板 */
.order-summary-box {
    background: #ffffff;
    border: 1px solid #eeeeee;
    padding: 24px;
    text-align: right;
}

.summary-line {
    margin-bottom: 8px;
    font-size: 14px;
    color: #666666;
}

.summary-line .val {
    display: inline-block;
    width: 120px;
    font-weight: bold;
    color: #333333;
}

.total-line {
    font-size: 16px;
    color: #333333;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #eeeeee;
}

.total-val {
    color: var(--primary-red);
    font-size: 22px;
}

.total-val strong {
    font-size: 32px;
}

.submit-btn-row {
    margin-top: 20px;
}

.btn-submit-order {
    padding: 12px 48px;
    background: var(--primary-red);
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(210, 30, 32, 0.35);
}

.btn-submit-order:hover {
    background: var(--hover-red);
}

/* ---------------- 模拟收银台支付与成功页 ---------------- */
.cashier-card, .success-card {
    background: #ffffff;
    border: 1px solid #eeeeee;
    padding: 40px;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}

.cashier-top-info {
    padding-bottom: 30px;
    border-bottom: 1px solid #eeeeee;
}

.info-left {
    float: left;
    display: flex;
    align-items: center;
}

.success-icon {
    width: 56px;
    height: 56px;
    line-height: 56px;
    text-align: center;
    background: #52c41a;
    color: #ffffff;
    font-size: 28px;
    font-weight: bold;
    border-radius: 50%;
    margin-right: 20px;
}

.info-text h3 {
    font-size: 20px;
    color: #222222;
    margin-bottom: 6px;
}

.order-sn-txt, .order-addr-txt {
    font-size: 13px;
    color: #666666;
    margin-top: 4px;
}

.info-right {
    float: right;
    text-align: right;
}

.pay-amount-label {
    font-size: 13px;
    color: #888888;
}

.pay-amount-val {
    color: var(--primary-red);
    font-size: 20px;
    font-weight: bold;
}

.pay-amount-val strong {
    font-size: 36px;
}

.cashier-body {
    padding-top: 30px;
}

.method-title {
    font-size: 16px;
    color: #333333;
    margin-bottom: 16px;
}

.method-cards-row {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.method-card {
    border: 2px solid #e0e0e0;
    padding: 20px;
    border-radius: 6px;
    width: 240px;
    cursor: pointer;
    transition: all 0.2s;
}

.method-card.active, .method-card:hover {
    border-color: var(--primary-red);
    background: #fffafa;
}

.method-card .m-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.method-card .m-title {
    font-size: 16px;
    font-weight: bold;
    color: #333333;
}

.method-card .m-desc {
    font-size: 12px;
    color: #888888;
    margin-top: 4px;
}

.btn-confirm-pay {
    padding: 14px 50px;
    background: var(--primary-red);
    color: #ffffff;
    font-size: 20px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(210, 30, 32, 0.35);
}

.btn-confirm-pay:hover {
    background: var(--hover-red);
}

/* 支付成功页 */
.success-card {
    text-align: center;
    padding: 60px 40px;
}

.success-icon-wrap {
    font-size: 64px;
    margin-bottom: 16px;
}

.success-title {
    font-size: 24px;
    color: #222222;
    margin-bottom: 8px;
}

.success-tip {
    font-size: 14px;
    color: #777777;
    margin-bottom: 30px;
}

.success-details-box {
    display: inline-block;
    background: #fbfbfb;
    border: 1px solid #eeeeee;
    padding: 20px 40px;
    text-align: left;
    border-radius: 4px;
    margin-bottom: 36px;
}

.success-details-box .detail-line {
    margin: 8px 0;
    font-size: 14px;
}

.success-details-box .lbl {
    color: #666666;
    width: 90px;
    display: inline-block;
}

.success-details-box .val.price {
    color: var(--primary-red);
    font-weight: bold;
    font-size: 18px;
}

.success-btn-actions a {
    display: inline-block;
    padding: 10px 32px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: bold;
    margin: 0 10px;
}

.btn-view-order {
    background: var(--primary-red);
    color: #ffffff;
}

.btn-continue-mall {
    background: #f0f0f0;
    color: #555555;
}
