/* ===================== 商城通用容器 ===================== */
.shop,
.product-detail,
.order-list,
.cart,
.product-review {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
}

.shop h2,
.product-detail h2,
.order-list h2,
.cart h2,
.product-review h2 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 24px;
    padding-bottom: 12px;
    position: relative;
}

.shop h2::after,
.product-detail h2::after,
.order-list h2::after,
.cart h2::after,
.product-review h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 48px;
    height: 3px;
    background: var(--primary-color, #3498db);
    border-radius: 2px;
}

/* ===================== 分类侧栏 ===================== */
.categories {
    float: left;
    width: 200px;
    margin-right: 30px;
}

.categories h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #2c3e50;
}

.categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories li {
    margin-bottom: 6px;
}

.categories li a {
    text-decoration: none;
    color: #555;
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.25s ease;
}

.categories li a:hover {
    background-color: #f1f5fb;
    color: var(--primary-color, #3498db);
}

.categories li.active a {
    background-color: var(--primary-color, #3498db);
    color: #fff;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

/* ===================== 商品网格 ===================== */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 22px;
    overflow: visible;
}

.product {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border: 1px solid #edf0f5;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(20, 40, 80, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.product:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(20, 40, 80, 0.14);
    border-color: #d6e4ff;
}

.product-thumb {
    height: 170px;
    background: linear-gradient(135deg, #eef3fb, #e1ebfa);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product h3 {
    margin: 16px 18px 6px;
    font-size: 17px;
    color: #2c3e50;
    line-height: 1.4;
}

.product p {
    margin: 0 18px 12px;
    color: #8a94a6;
    line-height: 1.55;
    font-size: 13.5px;
    flex: 1;
}

.product .price {
    font-size: 18px;
    font-weight: bold;
    color: #e67e22;
    margin: 0 18px 14px;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin: 0 18px 18px;
}

/* ===================== 按钮变体（商城内） ===================== */
.btn.outline {
    background-color: #fff;
    color: var(--primary-color, #3498db);
    border: 1.5px solid var(--primary-color, #3498db);
    box-shadow: none;
}

.btn.outline:hover {
    background-color: var(--primary-color, #3498db);
    color: #fff;
    transform: translateY(-2px);
}

.btn.primary {
    background-color: #e67e22;
}

.btn.primary:hover {
    background-color: #d35400;
}

.btn.cancel {
    background-color: #95a5a6;
}

.btn.cancel:hover {
    background-color: #7f8c8d;
}

/* ===================== 空状态 ===================== */
.no-products,
.empty-cart p {
    text-align: center;
    padding: 60px 0;
    color: #9aa4b2;
    font-size: 17px;
    background: #fff;
    border: 1px dashed #dde3ec;
    border-radius: 12px;
}

.empty-cart {
    text-align: center;
    padding: 80px 0;
}

/* ===================== 商品详情 ===================== */
.product-detail .product-info,
.product-review .product-info {
    background-color: #fff;
    border: 1px solid #edf0f5;
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(20, 40, 80, 0.06);
    margin-bottom: 28px;
}

.product-detail .product-info .description {
    margin-bottom: 20px;
    line-height: 1.7;
    color: #444;
}

.product-detail .product-info .price {
    font-size: 24px;
    font-weight: bold;
    color: #e67e22;
    margin-bottom: 24px;
}

.product-detail .btn {
    margin-right: 10px;
}

/* 商品评价 */
.product-reviews {
    background-color: #fff;
    border: 1px solid #edf0f5;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(20, 40, 80, 0.06);
}

.product-reviews h3 {
    margin: 0 0 20px;
    color: #2c3e50;
}

.review-item {
    padding: 18px 0;
    border-bottom: 1px solid #f0f2f6;
}

.review-item:last-of-type {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.review-user {
    font-weight: 600;
    color: #2c3e50;
}

.review-rating {
    color: #f39c12;
    letter-spacing: 2px;
}

.review-time {
    font-size: 12px;
    color: #9aa4b2;
}

.review-content {
    line-height: 1.6;
    color: #5a6473;
}

.no-reviews {
    text-align: center;
    padding: 30px 0;
    color: #9aa4b2;
}

/* ===================== 购物车 / 订单：现代卡片 ===================== */
.cart-page,
.order-page {
    max-width: 980px;
    margin: 0 auto;
    padding: 26px 20px 60px;
}

/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #9aa4b2;
    margin-bottom: 14px;
}
.breadcrumb a {
    color: #6b7488;
    text-decoration: none;
    transition: color 0.2s ease;
}
.breadcrumb a:hover { color: #4361ee; }
.breadcrumb .sep { color: #c4ccda; font-size: 11px; }
.breadcrumb .current { color: #1f2d50; font-weight: 600; }

.page-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}
.page-head h1 {
    font-size: 26px;
    font-weight: 800;
    color: #1f2d50;
    margin: 0;
    letter-spacing: 0.3px;
}
.count-pill {
    font-size: 12px;
    color: #4361ee;
    background: #eaf0ff;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

/* ---- 购物车布局 ---- */
.cart-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 22px;
    align-items: start;
}
.cart-items-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 2px 12px rgba(20, 40, 80, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.cart-item:hover {
    box-shadow: 0 10px 26px rgba(20, 40, 80, 0.1);
    transform: translateY(-2px);
    border-color: #d6e4ff;
}
.ci-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: linear-gradient(135deg, #eef3fb, #e1ebfa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #4361ee;
    text-decoration: none;
    transition: transform 0.2s ease;
}
.ci-thumb:hover { transform: scale(1.05); }
.ci-main { flex: 1 1 auto; min-width: 0; }
.ci-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1f2d50;
    text-decoration: none;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ci-title:hover { color: #4361ee; }
.ci-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #8a92a6;
}
.ci-price { color: #e67e22; font-weight: 600; }
.ci-sub { color: #5a6473; }
.ci-sub .subtotal { color: #e67e22; font-weight: 700; }

.ci-qty { flex: 0 0 auto; }
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #dde3ec;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.qty-stepper button {
    width: 34px;
    height: 34px;
    border: none;
    background: #f8fafc;
    cursor: pointer;
    font-size: 14px;
    color: #4a5169;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-stepper button:hover { background: #eef3fb; color: #4361ee; }
.qty-stepper input {
    width: 48px;
    height: 34px;
    border: none;
    border-left: 1px solid #dde3ec;
    border-right: 1px solid #dde3ec;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #1f2d50;
    -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.ci-actions { flex: 0 0 auto; }
.remove-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #fdecec;
    color: #e74c3c;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}
.remove-btn:hover { background: #fbd5d5; transform: scale(1.05); }

/* 订单摘要侧栏 */
.cart-summary {
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 16px;
    padding: 22px 20px;
    box-shadow: 0 2px 12px rgba(20, 40, 80, 0.05);
    position: sticky;
    top: 90px;
}
.summary-title {
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 700;
    color: #1f2d50;
}
.coupon-box {
    background: #f8faff;
    border: 1px dashed #c7d6f7;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 18px;
}
.coupon-input-row {
    display: flex;
    gap: 8px;
}
.coupon-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 36px;
    border: 1px solid #dde3ec;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 13px;
    color: #1f2d50;
    outline: none;
    transition: border-color 0.2s ease;
}
.coupon-input:focus { border-color: #4361ee; }
.coupon-msg {
    font-size: 12px;
    margin-top: 8px;
    min-height: 16px;
}
.coupon-msg.ok { color: #1a9e5a; }
.coupon-msg.err { color: #e74c3c; }
.summary-rows { margin-bottom: 18px; }
.s-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 9px 0;
    font-size: 14px;
    color: #5a6473;
}
.s-row .sub-total,
.s-row .discount-val { color: #e67e22; font-weight: 700; }
.s-row.total-row {
    border-top: 1px solid #eef1f6;
    margin-top: 4px;
    padding-top: 14px;
}
.s-row.total-row span { font-size: 15px; font-weight: 600; color: #1f2d50; }
.s-row.total-row .pay-total { color: #e67e22; font-size: 22px; font-weight: 800; }
.btn.block {
    display: block;
    width: 100%;
    text-align: center;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
}
.continue-link {
    display: block;
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    color: #6b7488;
    text-decoration: none;
    transition: color 0.2s ease;
}
.continue-link:hover { color: #4361ee; }

/* ---- 订单列表 ---- */
.order-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-tab {
    border: 1px solid #dde3ec;
    background: #fff;
    color: #5a6473;
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.filter-tab:hover { border-color: #4361ee; color: #4361ee; }
.filter-tab.active {
    background: #4361ee;
    border-color: #4361ee;
    color: #fff;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.28);
}
.order-list-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
}
.order-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 2px 12px rgba(20, 40, 80, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.order-card:hover {
    box-shadow: 0 10px 26px rgba(20, 40, 80, 0.1);
    transform: translateY(-2px);
    border-color: #d6e4ff;
}
.oc-thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #eef3fb, #e1ebfa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #4361ee;
    text-decoration: none;
    transition: transform 0.2s ease;
}
.oc-thumb:hover { transform: scale(1.05); }

/* 购物车/订单缩略图：商品图片（无图时回退 cube 图标） */
.ci-thumb img, .oc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}
.oc-main { flex: 1 1 auto; min-width: 0; }
.oc-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.oc-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2d50;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.oc-title:hover { color: #4361ee; }
.oc-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #8a92a6;
}
.oc-meta i { margin-right: 4px; }
.oc-right {
    flex: 0 0 auto;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.oc-price { color: #e67e22; font-size: 18px; font-weight: 800; }
.oc-actions { display: flex; gap: 8px; }

.status-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 11px;
    border-radius: 20px;
    white-space: nowrap;
}
.status-completed { background: #e6f7ee; color: #1a9e5a; }
.status-pending { background: #fff4e0; color: #d98800; }
.status-cancelled { background: #f0f1f5; color: #8a92a6; }

.order-back { margin-top: 8px; }
.empty-filter {
    text-align: center;
    padding: 40px 0;
    color: #9aa4b2;
    font-size: 15px;
    background: #fff;
    border: 1px dashed #dde3ec;
    border-radius: 14px;
}

/* ---- 空状态 ---- */
.empty-state {
    text-align: center;
    padding: 70px 20px;
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(20, 40, 80, 0.05);
}
.empty-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eef3fb, #e1ebfa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: #4361ee;
}
.empty-state p {
    font-size: 17px;
    color: #8a92a6;
    margin-bottom: 22px;
}

/* 小号按钮复用 .btn.sm */
.btn.sm { padding: 7px 14px; font-size: 13px; }

/* ===================== 响应式 ===================== */
@media (max-width: 900px) {
    .cart-body { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
}
@media (max-width: 640px) {
    .cart-item,
    .order-card {
        flex-wrap: wrap;
        gap: 12px;
    }
    .ci-qty,
    .oc-right {
        flex: 1 1 100%;
        justify-content: space-between;
    }
    .oc-right { align-items: center; flex-direction: row; text-align: left; }
}

/* ===================== 商品详情评价样式 ===================== */
.product-reviews .btn {
    margin-top: 20px;
}

/* ===================== 评价表单样式 ===================== */
.product-review .form-group {
    margin-bottom: 20px;
}

.product-review .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.rating-stars {
    display: flex;
    gap: 10px;
}

.rating-stars input[type="radio"] {
    display: none;
}

.rating-stars label {
    cursor: pointer;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.rating-stars input[type="radio"]:checked + label {
    background-color: #f39c12;
    color: white;
    border-color: #f39c12;
}

.product-review .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

/* ===================== 响应式 ===================== */
@media (max-width: 768px) {
    .categories {
        float: none;
        width: 100%;
        margin-right: 0;
        margin-bottom: 24px;
    }

    .categories ul {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .categories li {
        margin-bottom: 0;
    }

    .products {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .user-info {
        flex-direction: column;
        text-align: center;
    }

    .avatar {
        margin-right: 0;
        margin-bottom: 20px;
    }
}
