/*
 Theme Name:   Shoptimizer Child - 国内SEO优化版
 Theme URI:    https://www.commercegurus.com/
 Description:  Shoptimizer 子主题 - 针对国内搜索引擎SEO优化，含订单页商品缩略图增强
 Author:       CommerceGurus / Custom
 Version:      1.1.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Template:     shoptimizer
 Text Domain:  shoptimizer-child
*/


/* ==========================================================================
   我的订单页 - 信息行 + 商品明细行 + 查看按钮
   ========================================================================== */

/* --- 表格整体 --- */
.cg-orders-table {
    border-collapse: collapse;
    width: 100%;
}

.cg-orders-table thead th.cg-orders-th {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
    background: transparent;
    white-space: nowrap;
}

/* --- 订单信息行 --- */
.cg-orders-table .woocommerce-orders-table__row.order > td {
    padding: 14px 16px;
    border-bottom: none;
    vertical-align: middle;
    font-size: 14px;
}

.cg-orders-table .woocommerce-orders-table__cell-order-number a {
    font-weight: 600;
    color: #7c3aed;
    text-decoration: none;
}

.cg-orders-table .woocommerce-orders-table__cell-order-number a:hover {
    text-decoration: underline;
}

/* 状态标签 */
.cg-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.cg-status--completed { background: #ecfdf5; color: #059669; }
.cg-status--processing { background: #eff6ff; color: #2563eb; }
.cg-status--on-hold { background: #fff7ed; color: #d97706; }
.cg-status--pending { background: #fefce8; color: #ca8a04; }
.cg-status--cancelled,
.cg-status--refunded,
.cg-status--failed { background: #fef2f2; color: #dc2626; }

/* --- 商品明细行 --- */
.cg-orders-table .woocommerce-orders-table__row-items {
    border-bottom: 1px solid #e5e5e5 !important;
}

.cg-orders-table .woocommerce-orders-table__row-items > td {
    padding: 0;
    vertical-align: top;
}

.cg-items-cell {
    padding: 0 0 0 16px !important;
}

/* --- 嵌套商品表格 --- */
.cg-items-table {
    width: 100%;
    border-collapse: collapse;
}

.cg-items-table tr {
    border-top: 1px solid #f0f0f0;
}

.cg-items-table tr:first-child {
    border-top: none;
}

.cg-items-table td {
    padding: 12px 10px;
    vertical-align: middle;
}

/* 缩略图 */
.cg-item-td-img {
    width: 100px;
    padding-left: 0 !important;
}

.cg-item-td-img a {
    display: block;
}

.cg-item-td-img img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
    display: block;
}

/* 商品标题 */
.cg-item-td-title {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.cg-item-td-title a {
    color: #7c3aed;
    text-decoration: none;
}

.cg-item-td-title a:hover {
    text-decoration: underline;
}

.cg-item-meta {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* 数量 */
.cg-item-td-qty {
    white-space: nowrap;
    font-size: 14px;
    color: #555;
    text-align: center;
    width: 80px;
}

/* 小计 */
.cg-item-td-total {
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-align: right;
    width: 100px;
}

/* --- 操作列（查看按钮） --- */
.cg-action-cell {
    vertical-align: middle !important;
    text-align: center;
    padding: 12px 16px !important;
    width: 90px;
}

.cg-view-btn {
    display: inline-block;
    padding: 8px 24px;
    background: #7c3aed;
    color: #fff !important;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.2s;
}

.cg-view-btn:hover {
    background: #6d28d9;
}

/* ==========================================================================
   订单列表 - 移动端
   ========================================================================== */

@media (max-width: 768px) {
    .cg-orders-table thead {
        display: none;
    }

    .cg-orders-table,
    .cg-orders-table tbody {
        display: block;
        width: 100%;
    }

    .cg-orders-table tr {
        display: block;
    }

    .cg-orders-table .woocommerce-orders-table__row.order {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 14px;
        padding: 14px 16px 8px;
        align-items: center;
    }

    .cg-orders-table .woocommerce-orders-table__row.order > td {
        padding: 0;
        border: none;
        display: inline;
    }

    .cg-orders-table .woocommerce-orders-table__cell-order-total {
        margin-left: auto;
        font-weight: 600;
    }

    .cg-orders-table .woocommerce-orders-table__row.order > td:last-child {
        display: none;
    }

    .cg-orders-table .woocommerce-orders-table__row-items {
        display: block;
    }

    .cg-orders-table .woocommerce-orders-table__row-items > td {
        display: block;
    }

    .cg-items-cell {
        padding: 0 12px !important;
    }

    .cg-items-table td {
        padding: 10px 6px;
    }

    .cg-item-td-img {
        width: 72px;
    }

    .cg-item-td-img img {
        width: 72px;
        height: 72px;
        border-radius: 6px;
    }

    .cg-item-td-title {
        font-size: 13px;
    }

    .cg-item-td-qty,
    .cg-item-td-total {
        font-size: 13px;
        width: auto;
    }

    .cg-action-cell {
        display: block;
        text-align: right;
        padding: 8px 16px 16px !important;
    }

    .cg-view-btn {
        display: block;
        text-align: center;
        padding: 10px 0;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .cg-items-table tr {
        display: grid;
        grid-template-columns: 60px 1fr auto;
        gap: 0 10px;
        padding: 10px 0;
        align-items: center;
    }

    .cg-item-td-img {
        grid-row: 1 / 3;
        width: 60px;
        padding: 0 !important;
    }

    .cg-item-td-img img {
        width: 60px;
        height: 60px;
    }

    .cg-item-td-title {
        grid-column: 2 / 4;
        padding: 0 !important;
    }

    .cg-item-td-qty {
        grid-column: 2;
        text-align: left;
        padding: 4px 0 0 !important;
        font-size: 12px;
        color: #888;
    }

    .cg-item-td-total {
        grid-column: 3;
        padding: 4px 0 0 !important;
        font-size: 12px;
    }
}

/* ==========================================================================
   国内SEO相关样式
   ========================================================================== */

.seo-breadcrumb-wrapper {
    font-size: 13px;
    color: #666;
    padding: 8px 0;
}

.seo-breadcrumb-wrapper a {
    color: #555;
    text-decoration: none;
}

.seo-breadcrumb-wrapper a:hover {
    text-decoration: underline;
}

.seo-breadcrumb-wrapper .separator {
    margin: 0 6px;
    color: #ccc;
}

/* ==========================================================================
   WPCOM Member + WooCommerce 集成样式
   ========================================================================== */

/* --- 登录/注册 Tab 切换 --- */
.wpmx-wc-auth-wrapper {
    max-width: 480px;
    margin: 0 auto;
    padding: 0;
}

.wpmx-wc-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 24px;
}

.wpmx-wc-tab {
    flex: 1;
    padding: 12px 0;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #999;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
    outline: none;
}

.wpmx-wc-tab:hover {
    color: #555;
}

.wpmx-wc-tab.active {
    color: #333;
}

.wpmx-wc-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: #333;
    border-radius: 1px;
}

/* --- 登录/注册面板 --- */
.wpmx-wc-panel {
    display: none;
}

.wpmx-wc-panel.active {
    display: block;
}

/* 适配 WPCOM Member 表单在 WooCommerce 环境中的样式 */
.wpmx-wc-form-inner .member-form {
    max-width: 100%;
    margin: 0;
}

.wpmx-wc-form-inner .member-form .form-group {
    margin-bottom: 16px;
}

.wpmx-wc-form-inner .member-form .form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.wpmx-wc-form-inner .member-form .form-input:focus {
    border-color: #333;
    outline: none;
}

.wpmx-wc-form-inner .member-form .wpcom-btn {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
}

/* --- 社交登录分割线 --- */
.wpmx-wc-social-section {
    margin-top: 28px;
    padding-top: 0;
}

.wpmx-wc-divider {
    position: relative;
    text-align: center;
    margin-bottom: 20px;
}

.wpmx-wc-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #eee;
}

.wpmx-wc-divider span {
    position: relative;
    display: inline-block;
    padding: 0 16px;
    background: #fff;
    color: #999;
    font-size: 13px;
}

/* --- 社交登录按钮列表 --- */
.wpmx-wc-social-buttons .member-social-list {
    display: flex;
    justify-content: center;
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.wpmx-wc-social-buttons .social-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #666;
    transition: all 0.25s;
    text-decoration: none;
}

.wpmx-wc-social-buttons .social-item a:hover {
    background: #e8e8e8;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.wpmx-wc-social-buttons .social-item a svg,
.wpmx-wc-social-buttons .social-item a .wpcom-icon {
    width: 22px;
    height: 22px;
}

/* 社交平台品牌色悬浮效果 */
.wpmx-wc-social-buttons .social-wechat a:hover { background: #07c160; color: #fff; }
.wpmx-wc-social-buttons .social-wechat2 a:hover { background: #07c160; color: #fff; }
.wpmx-wc-social-buttons .social-qq a:hover { background: #12b7f5; color: #fff; }
.wpmx-wc-social-buttons .social-weibo a:hover { background: #e6162d; color: #fff; }
.wpmx-wc-social-buttons .social-github a:hover { background: #24292f; color: #fff; }
.wpmx-wc-social-buttons .social-google a:hover { background: #4285f4; color: #fff; }
.wpmx-wc-social-buttons .social-facebook a:hover { background: #1877f2; color: #fff; }
.wpmx-wc-social-buttons .social-twitter a:hover { background: #000; color: #fff; }

/* ==========================================================================
   WooCommerce 我的账户 - 社交绑定管理页
   ========================================================================== */

.wpmx-social-bindintg {
    max-width: 600px;
}

.wpmx-bindintg-desc {
    color: #777;
    font-size: 14px;
    margin-bottom: 20px;
}

.wpmx-bindintg-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.wpmx-bindintg-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.wpmx-bindintg-item:last-child {
    border-bottom: none;
}

.wpmx-bindintg-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 18px;
}

.wpmx-bindintg-icon svg,
.wpmx-bindintg-icon .wpcom-icon {
    width: 20px;
    height: 20px;
}

.wpmx-bindintg-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.wpmx-bindintg-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.wpmx-bindintg-status {
    font-size: 13px;
}

.wpmx-bindintg-status.bound {
    color: #07c160;
}

.wpmx-bindintg-status.unbound {
    color: #bbb;
}

.wpmx-bindintg-action {
    flex-shrink: 0;
}

.wpmx-btn-bind {
    display: inline-block;
    padding: 6px 16px;
    font-size: 13px;
    color: #fff;
    background: #333;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.wpmx-btn-bind:hover {
    background: #555;
    color: #fff;
}

.wpmx-btn-unbind {
    display: inline-block;
    padding: 6px 16px;
    font-size: 13px;
    color: #666;
    background: #f5f5f5;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.wpmx-btn-unbind:hover {
    background: #e8e8e8;
    color: #333;
}

/* --- 手机号绑定区块 --- */
.wpmx-phone-bindintg {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.wpmx-phone-bindintg h3 {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 12px;
}

.wpmx-phone-icon {
    font-style: normal;
    font-size: 18px;
}

/* ==========================================================================
   WPCOM Member 集成 - 移动端
   ========================================================================== */

@media (max-width: 768px) {
    .wpmx-wc-auth-wrapper {
        max-width: 100%;
        padding: 0 4px;
    }

    .wpmx-wc-tab {
        font-size: 15px;
    }

    .wpmx-wc-social-buttons .social-item a {
        width: 42px;
        height: 42px;
    }

    .wpmx-bindintg-item {
        gap: 10px;
        padding: 12px 0;
    }

    .wpmx-bindintg-icon {
        width: 36px;
        height: 36px;
    }
}

/* ==========================================================================
   五、配送地址簿（多地址管理）
   ========================================================================== */

/* --- 页面头部 --- */
.sa-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.sa-desc {
    color: #777;
    font-size: 14px;
    margin: 0 0 4px;
}

.sa-count {
    font-size: 13px;
    color: #999;
    margin: 0;
}

/* --- 按钮通用 --- */
.sa-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.sa-btn-primary {
    background: #333;
    color: #fff;
    border-color: #333;
}

.sa-btn-primary:hover {
    background: #555;
    border-color: #555;
}

.sa-btn-primary:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

.sa-btn-cancel {
    background: #f5f5f5;
    color: #666;
    border-color: #ddd;
}

.sa-btn-cancel:hover {
    background: #eee;
}

/* --- 空状态 --- */
.sa-empty {
    text-align: center;
    padding: 48px 16px;
    color: #999;
    font-size: 14px;
    background: #fafafa;
    border-radius: 12px;
    border: 1px dashed #ddd;
}

.sa-empty p {
    margin: 4px 0;
}

/* --- 地址卡片列表 --- */
.sa-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* --- 单个地址卡片 --- */
.sa-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 0;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.sa-card:hover {
    border-color: #ddd;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.sa-card.is-default {
    border-color: #333;
    border-width: 2px;
}

/* 卡片顶部：标签 + 操作 */
.sa-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px 0;
    gap: 8px;
}

.sa-card-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sa-card-label {
    display: inline-block;
    padding: 3px 10px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #555;
}

.sa-card.is-default .sa-card-label {
    background: #333;
    color: #fff;
}

.sa-card-badge {
    font-size: 11px;
    color: #fff;
    background: #07c160;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

/* 操作按钮 */
.sa-card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.sa-card:hover .sa-card-actions {
    opacity: 1;
}

.sa-action-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    font-size: 12px;
    color: #888;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s;
    white-space: nowrap;
}

.sa-action-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.sa-action-danger:hover {
    background: #fff1f0;
    color: #e24b4a;
}

/* 卡片内容 */
.sa-card-body {
    padding: 12px 16px 16px;
}

.sa-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-bottom: 6px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.sa-card-phone {
    font-weight: 400;
    font-size: 13px;
    color: #888;
}

.sa-card-addr {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 4px;
}

.sa-card-extra {
    font-size: 12px;
    color: #aaa;
    margin-top: 2px;
}

/* ==========================================================================
   弹窗 / 表单
   ========================================================================== */

.sa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.sa-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.sa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 0;
}

.sa-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.sa-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.sa-modal-close:hover {
    color: #333;
}

/* --- 表单 --- */
.sa-form {
    padding: 20px 24px 24px;
}

.sa-form-row {
    margin-bottom: 16px;
}

.sa-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.sa-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    margin-bottom: 6px;
}

.sa-required {
    color: #e24b4a;
}

.sa-optional {
    font-weight: 400;
    color: #bbb;
    font-size: 12px;
}

.sa-field input,
.sa-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background: #fff;
}

.sa-field input:focus,
.sa-field select:focus {
    border-color: #333;
    outline: none;
}

/* 标签快捷选择 */
.sa-label-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.sa-tag {
    padding: 5px 12px;
    border: 1px solid #eee;
    border-radius: 20px;
    font-size: 13px;
    background: #fafafa;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
}

.sa-tag:hover {
    border-color: #ccc;
    background: #f0f0f0;
}

.sa-tag.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* 表单底部操作 */
.sa-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

/* ==========================================================================
   结账页：地址选择器 + 内嵌添加表单（美化版）
   ========================================================================== */

/* --- 外层容器 --- */
.sa-co-wrapper {
    margin-bottom: 24px;
}

/* --- 选择器头部 --- */
.sa-co-picker {
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px 18px;
}

.sa-co-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sa-co-head label {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.sa-co-count {
    font-size: 12px;
    color: #aaa;
    background: #fff;
    padding: 2px 10px;
    border-radius: 20px;
    border: 1px solid #eee;
}

.sa-co-picker select {
    width: 100%;
    padding: 11px 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.sa-co-picker select:focus {
    border-color: #333;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
    outline: none;
}

/* ==========================================================================
   内嵌添加地址表单
   ========================================================================== */

.sa-co-add {
    margin-top: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

/* --- 表单头 --- */
.sa-co-add-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.sa-co-add-head h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.sa-co-add-close {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.sa-co-add-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* --- 表单内容 --- */
.sa-co-add-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* --- 标签选择 --- */
.sa-co-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2px;
}

.sa-co-tag {
    padding: 7px 14px;
    border: 1px solid #e8e8e8;
    border-radius: 24px;
    font-size: 13px;
    background: #fafafa;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.sa-co-tag:hover {
    border-color: #bbb;
    background: #f0f0f0;
}

.sa-co-tag.active {
    background: #333;
    color: #fff;
    border-color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* --- 分隔线 --- */
.sa-co-sep {
    height: 1px;
    background: #f0f0f0;
    margin: 4px 0;
}

/* --- 字段 --- */
.sa-co-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sa-co-field label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.sa-co-req {
    color: #e24b4a;
}

.sa-co-opt {
    font-weight: 400;
    color: #bbb;
    font-size: 12px;
}

.sa-co-inp {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sa-co-inp:focus {
    border-color: #333;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
    outline: none;
}

.sa-co-inp::placeholder {
    color: #ccc;
}

/* 两列网格 */
.sa-co-g2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* --- 表单底部操作 --- */
.sa-co-add-foot {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}

.sa-co-btn-cancel,
.sa-co-btn-save {
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid;
    transition: all 0.2s;
}

.sa-co-btn-cancel {
    background: #fff;
    color: #666;
    border-color: #ddd;
}

.sa-co-btn-cancel:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.sa-co-btn-save {
    background: #333;
    color: #fff;
    border-color: #333;
}

.sa-co-btn-save:hover {
    background: #444;
}

.sa-co-btn-save:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

/* ==========================================================================
   结账页内嵌表单 - 移动端
   ========================================================================== */

@media (max-width: 768px) {
    .sa-co-picker {
        padding: 14px;
        border-radius: 10px;
    }

    .sa-co-head label {
        font-size: 14px;
    }

    .sa-co-add {
        border-radius: 12px;
        margin-top: 12px;
    }

    .sa-co-add-body {
        padding: 16px;
        gap: 12px;
    }

    .sa-co-g2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .sa-co-tags {
        gap: 6px;
    }

    .sa-co-tag {
        padding: 6px 12px;
        font-size: 12px;
    }

    .sa-co-add-foot {
        flex-direction: column-reverse;
        padding: 14px 16px;
        gap: 10px;
    }

    .sa-co-btn-cancel,
    .sa-co-btn-save {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .sa-co-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .sa-co-add-head {
        padding: 14px 16px;
    }

    .sa-co-add-head h4 {
        font-size: 14px;
    }

    .sa-co-inp {
        padding: 9px 12px;
        font-size: 13px;
    }
}

/* ==========================================================================
   配送地址 - 移动端
   ========================================================================== */

@media (max-width: 768px) {
    .sa-header {
        flex-direction: column;
        gap: 12px;
    }

    .sa-btn {
        width: 100%;
        justify-content: center;
    }

    .sa-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .sa-card-actions {
        opacity: 1;
    }

    .sa-modal {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
    }

    .sa-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .sa-row-2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .sa-form {
        padding: 16px 20px 20px;
    }

    .sa-form-actions {
        flex-direction: column-reverse;
    }

    .sa-form-actions .sa-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .sa-label-tags {
        gap: 6px;
    }

    .sa-tag {
        padding: 4px 10px;
        font-size: 12px;
    }
}
