/* ========== 主页商品卡片布局 ========== */
#mainPanel-goods #goodsList {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 10px;
}
#mainPanel-goods #goodsList .goods-card {
    flex: 1 1 140px;
    min-width: 130px;
}

/* ========== 商品详情弹窗（原 shop-detail 完整样式） ========== */

/* 弹窗框架 */
#goodsDetailModal.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
#goodsDetailModal .goods-detail-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    animation: modalFade 0.3s ease;
    padding: 8px 0;
}
@keyframes modalFade {
    from {opacity: 0; transform: translateY(20px);}
    to {opacity: 1; transform: translateY(0);}
}
#goodsDetailModal .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #eee;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
#goodsDetailModal .modal-close:hover {background: #ef4444; color: #fff; border-color: #ef4444;}

#goodsDetailModal .detail-container {
    padding: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
#goodsDetailModal .detail-info {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
#goodsDetailModal .detail-img {
    flex: 1;
    min-width: 300px;
}
#goodsDetailModal .detail-name {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}
#goodsDetailModal .detail-category {
    font-size: 13px;
    color: #2563eb;
    padding: 3px 8px;
    background: #eff6ff;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

/* 图片轮播 */
#goodsDetailModal .carousel-container {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    user-select: none;
}
#goodsDetailModal .carousel-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}
#goodsDetailModal .carousel-slide {
    min-width: 100%;
    height: 100%;
}
#goodsDetailModal .carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f5f5f5;
}
#goodsDetailModal .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    z-index: 2;
}
#goodsDetailModal .carousel-btn:hover {background: rgba(0,0,0,0.6);}
#goodsDetailModal .carousel-prev { left: 8px; }
#goodsDetailModal .carousel-next { right: 8px; }

/* 规格选择 */
#goodsDetailModal .spec-group {
    margin: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
#goodsDetailModal .spec-title {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    flex-shrink: 0;
}
#goodsDetailModal .spec-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
#goodsDetailModal .spec-btn {
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
}
#goodsDetailModal .spec-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* 价格 */
#goodsDetailModal .detail-price-block {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
}
#goodsDetailModal .detail-price {
    font-size: 20px;
    color: #e63946;
    font-weight: bold;
}
#goodsDetailModal .detail-subtotal {
    font-size: 14px;
    color: #666;
}
#goodsDetailModal .detail-stock {
    font-size: 13px;
    color: #666;
}

/* 属性 */
#goodsDetailModal .detail-attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
#goodsDetailModal .detail-attr {
    padding: 4px 10px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

/* 描述 */
#goodsDetailModal .detail-desc {
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
    line-height: 1.6;
    font-size: 13px;
    color: #666;
}

/* 操作按钮区 */
#goodsDetailModal .detail-operation {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

/* 数量控件 */
#goodsDetailModal .detail-quantity {
    display: flex;
    align-items: center;
    gap: 6px;
}
#goodsDetailModal .detail-quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 16px;
    cursor: pointer;
}
#goodsDetailModal .detail-quantity-input {
    width: 60px;
    height: 32px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}
#goodsDetailModal .detail-quantity-input:disabled,
#goodsDetailModal .detail-quantity-btn:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    border-color: #ddd;
}

/* 备注输入 */
#goodsDetailModal .detail-remark {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
}
#goodsDetailModal .detail-remark:focus {border-color: #2563eb;}

/* 按钮行 */
#goodsDetailModal .detail-btns {
    display: flex;
    gap: 8px;
}
#goodsDetailModal .detail-add-cart {
    flex: 1;
    padding: 10px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}
#goodsDetailModal .detail-add-cart:hover {background: #1d4ed8;}
#goodsDetailModal .detail-pay-btn {
    flex: 1;
    padding: 10px;
    background: #e63946;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}
#goodsDetailModal .detail-pay-btn:hover {background: #dc2626;}
#goodsDetailModal .detail-cancel {
    padding: 10px;
    background: #6b7680;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}
#goodsDetailModal .detail-cancel:hover {background: #4b4b63;}
#goodsDetailModal .detail-contact-btn {
    width: 100%;
    padding: 10px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}
#goodsDetailModal .detail-contact-btn:hover {background: #059669;}
#goodsDetailModal .detail-tip {
    font-size: 13px;
    color: #2563eb;
    text-align: center;
    font-weight: 500;
    min-height: 18px;
}

/* 规格图文展示 */
#goodsDetailModal .spec-info-wrapper {
    margin-top: 16px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}
#goodsDetailModal .spec-info-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}
#goodsDetailModal .spec-item-box {
    margin-bottom: 10px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
}
#goodsDetailModal .spec-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 6px;
}
#goodsDetailModal .spec-item-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    line-height: 1.5;
}
/* 规格图片列表（垂直排列） */
.spec-img-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}
.spec-detail-img {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    border-radius: 6px;
    background: #f5f5f5;
    cursor: zoom-in;
    display: block;
}

/* 图片放大预览 */
#imgPreviewModal {
    display: none;
    z-index: 9999;
}

/* ===== 店铺导航按钮样式 ===== */
.shop-nav-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 14px;
    background: #ff6b35;
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.shop-nav-btn:hover {
    background: #e55a2b;
    transform: scale(1.05);
}
.shop-nav-btn:active {
    transform: scale(0.95);
}

/* 店铺导航按钮（全宽版，用于详情页） */
.shop-nav-btn-full {
    display: block;
    width: 100%;
    padding: 10px 0;
    background: #ff6b35;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.shop-nav-btn-full:hover {
    background: #e55a2b;
}

/* ========== 详情弹窗底部Tab区（规格详情 / 商品评价）========== */
.detail-tabs-area {
    width: 100%;
    margin-top: 12px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}
.detail-tabs-header {
    display: flex;
    gap: 28px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}
.detail-tab {
    padding: 8px 4px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.detail-tab.active {
    color: #2563eb;
    font-weight: 600;
    border-bottom-color: #2563eb;
}
.detail-tab-body {
    font-size: 13px;
    line-height: 1.6;
    max-height: 280px;
    overflow-y: auto;
    padding: 4px 0;
}
