/**
 * Store 前台商城样式
 */

/* ================================ */
/* 通用样式 */
/* ================================ */
.jumbotron {
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    border-radius: 0.375rem;
}

/* ================================ */
/* 商店卡片样式 */
/* ================================ */
.shop-card-item {
    transition: transform 0.2s;
}

.shop-card-item:hover {
    transform: translateY(-5px);
}

.shop-card-item .card {
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.shop-card-item .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ================================ */
/* 产品网格样式 */
/* ================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.product-card {
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card .card-footer {
    margin-top: auto;
}

/* ================================ */
/* 购物车样式 */
/* ================================ */
.cart-item {
    padding: 1rem;
    background-color: white;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cart-summary {
    position: sticky;
    top: 20px;
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.375rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ================================ */
/* 订单样式 */
/* ================================ */
.order-card {
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.order-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.order-header {
    background-color: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.order-body {
    padding: 1rem;
}

.order-footer {
    background-color: #f8f9fa;
    padding: 1rem;
    border-top: 1px solid #dee2e6;
}

/* ================================ */
/* 个人资料样式 */
/* ================================ */
.profile-container {
    margin-top: 2rem;
}

.profile-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
}

.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    text-align: center;
    color: white;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    font-weight: bold;
}

.profile-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.profile-info {
    padding: 2rem;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item label {
    font-weight: 500;
    color: #666;
    font-size: 0.9rem;
}

.info-value {
    font-size: 1.1rem;
    color: #333;
}

.profile-actions {
    padding: 1.5rem 2rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 1rem;
}

.profile-actions .btn {
    flex: 1;
}

/* ================================ */
/* 产品详情样式 */
/* ================================ */
.product-detail-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.product-image-section {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 0.375rem;
    text-align: center;
}

.product-image-placeholder {
    width: 100%;
    max-width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border-radius: 0.375rem;
    color: white;
    font-size: 5rem;
}

.product-info-section {
    padding: 2rem;
}

.product-order-section {
    position: sticky;
    top: 20px;
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.375rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toppings-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #dee2e6;
}

.topping-item {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s;
}

.topping-item:hover {
    background-color: #f8f9fa;
}

.topping-item input:checked ~ label {
    font-weight: 600;
    color: #0d6efd;
}

/* ================================ */
/* 响应式设计 */
/* ================================ */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-order-section {
        position: static;
    }
    
    .cart-summary {
        position: static;
    }
}

/* ================================ */
/* 空状态样式 */
/* ================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ================================ */
/* 加载状态 */
/* ================================ */
.loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 移除卡片的 padding 和 margin-bottom */
.card {
    padding: 0 !important;
    margin-bottom: 0 !important;
}

/* 卡片内容区域 padding 调整为 0.7rem */
.card-body {
    padding: 0.7rem !important;
}

/* 卡片图片统一高度 */
.card-img-top {
    height: 200px !important;
    object-fit: cover !important;
}

/* ================================ */
/* 訂單項目詳細信息樣式 */
/* ================================ */
.order-item {
    margin-bottom: 0.5rem;
}

.order-item .item-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.order-item .item-details {
    display: block;
    margin-left: 0.5rem;
    margin-top: 0.25rem;
    padding-left: 0.5rem;
    border-left: 2px solid #e9ecef;
}

