/* ===== 包子铺 - 品牌定制样式 ===== */

:root {
    --baozi-red: #C41E3A;
    --baozi-red-dark: #9B1B30;
    --baozi-gold: #D4A843;
    --baozi-cream: #FFF8F0;
    --baozi-warm: #FEF3E2;
    --baozi-brown: #5C3D2E;
    --baozi-green: #4A7C59;
    --baozi-gray: #6B5B4E;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    background: #FFF8F0;
    color: #333;
    line-height: 1.6;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--baozi-red) !important;
    letter-spacing: 2px;
}

.navbar {
    background: linear-gradient(135deg, var(--baozi-red) 0%, var(--baozi-red-dark) 100%) !important;
    box-shadow: 0 2px 12px rgba(196, 30, 58, 0.3);
}

.navbar .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    transition: all 0.3s;
}

.navbar .nav-link:hover {
    color: var(--baozi-gold) !important;
}

.navbar .navbar-toggler {
    border-color: rgba(255,255,255,0.5);
}

.navbar .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

/* ===== Hero 区域 ===== */
.hero-section {
    background: linear-gradient(135deg, var(--baozi-red) 0%, #8B1A2B 50%, var(--baozi-red-dark) 100%);
    color: white;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero-section .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* ===== 分类导航 ===== */
.category-bar {
    background: white;
    border-radius: 50px;
    padding: 8px 16px;
    display: inline-flex;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    flex-wrap: wrap;
    justify-content: center;
}

.category-bar .btn {
    border-radius: 50px !important;
    padding: 6px 20px;
    font-size: 0.9rem;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.category-bar .btn.active,
.category-bar .btn:hover {
    background: var(--baozi-red) !important;
    color: white !important;
    border-color: var(--baozi-red) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(196,30,58,0.3);
}

/* ===== 产品卡片 ===== */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(196, 30, 58, 0.15);
}

.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s;
}

.product-card:hover .card-img-top {
    transform: scale(1.08);
}

.product-card .card-img-wrap {
    overflow: hidden;
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #FFF0E0 0%, #FFE4CC 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .card-img-wrap img {
    transition: transform 0.4s ease;
}

.product-card:hover .card-img-wrap img {
    transform: scale(1.08);
}

.product-card .card-img-wrap .emoji-placeholder {
    font-size: 5rem;
    transition: transform 0.4s;
}

.product-card:hover .emoji-placeholder {
    transform: scale(1.2) rotate(5deg);
}

.badge-hot {
    position: absolute;
    top: 12px; left: 12px;
    background: linear-gradient(135deg, #FF6B35, #F72C25);
    color: white;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    z-index: 2;
    animation: pulse 2s infinite;
}

.badge-recommend {
    position: absolute;
    top: 12px; right: 12px;
    background: linear-gradient(135deg, var(--baozi-gold), #E8941A);
    color: white;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    z-index: 2;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

.product-card .card-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #333;
    margin-bottom: 6px;
}

.product-card .card-text {
    color: #888;
    font-size: 0.85rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price-row {
    display: flex;
    align-items: baseline;
    margin: 10px 0;
    gap: 8px;
}

.price-current {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--baozi-red);
}

.price-original {
    font-size: 0.85rem;
    color: #bbb;
    text-decoration: line-through;
}

.btn-add-cart {
    background: linear-gradient(135deg, var(--baozi-red) 0%, var(--baozi-red-dark) 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
}

.btn-add-cart:hover {
    background: linear-gradient(135deg, #D62A48 0%, #9B1B30 100%);
    color: white;
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(196,30,58,0.4);
}

.sold-info {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 6px;
}

/* ===== 购物车角标 ===== */
.cart-badge {
    background: var(--baozi-gold) !important;
    color: white !important;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== 区块标题 ===== */
.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--baozi-brown);
    text-align: center;
    margin: 3rem 0 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--baozi-red), var(--baozi-gold));
    margin: 12px auto 0;
    border-radius: 2px;
}

.section-title .en {
    font-size: 0.8rem;
    color: #bbb;
    font-weight: 400;
    display: block;
    letter-spacing: 3px;
}

/* ===== 搜索框 ===== */
.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.search-box input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 2px solid #EEE;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s;
    outline: none;
}

.search-box input:focus {
    border-color: var(--baozi-red);
    box-shadow: 0 0 0 4px rgba(196,30,58,0.1);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--baozi-red);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.search-box button:hover {
    background: var(--baozi-red-dark);
}

/* ===== 购物车页面 ===== */
.cart-item {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.cart-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.cart-item .item-img {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    background: var(--baozi-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    flex-shrink: 0;
}

.cart-item .item-info {
    flex: 1;
}

.cart-item .item-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.cart-item .item-price {
    color: var(--baozi-red);
    font-weight: 700;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #EEE;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.1rem;
    font-weight: 700;
    color: #555;
}

.qty-btn:hover {
    border-color: var(--baozi-red);
    color: var(--baozi-red);
}

.qty-num {
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 30px;
    text-align: center;
}

/* ===== 结账页面 ===== */
.checkout-section {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.form-control:focus, .form-select:focus {
    border-color: var(--baozi-red);
    box-shadow: 0 0 0 3px rgba(196,30,58,0.1);
}

.order-summary {
    background: linear-gradient(135deg, var(--baozi-red) 0%, var(--baozi-red-dark) 100%);
    color: white;
    border-radius: 20px;
    padding: 28px;
}

.order-summary .summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.order-summary .summary-total {
    font-size: 1.5rem;
    font-weight: 800;
    margin-top: 12px;
}

/* ===== 支付页面 ===== */
.pay-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.wechat-qr {
    background: white;
    border: 3px solid var(--baozi-green);
    border-radius: 16px;
    padding: 16px;
    display: inline-block;
    margin: 20px 0;
}

.wechat-qr img {
    width: 200px;
    height: 200px;
    display: block;
}

.pay-timer {
    font-size: 1.3rem;
    color: #666;
    margin: 16px 0;
}

.pay-timer span {
    color: var(--baozi-red);
    font-weight: 700;
}

.btn-pay-done {
    background: linear-gradient(135deg, var(--baozi-green) 0%, #3A6246 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.btn-pay-done:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(74,124,89,0.4);
    color: white;
}

/* ===== 订单成功 ===== */
.order-success {
    text-align: center;
    padding: 40px 0;
}

.order-success .success-icon {
    font-size: 5rem;
    color: var(--baozi-green);
    margin-bottom: 20px;
}

.order-no {
    background: var(--baozi-warm);
    border-radius: 12px;
    padding: 16px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--baozi-brown);
    display: inline-block;
    letter-spacing: 2px;
}

/* ===== 后台管理 ===== */
.admin-sidebar {
    background: linear-gradient(180deg, #2C2C2C 0%, #1a1a1a 100%);
    min-height: 100vh;
    color: white;
    padding: 0;
}

.admin-sidebar .admin-logo {
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--baozi-gold);
}

.admin-sidebar .nav-item {
    padding: 0;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 14px 24px;
    border-left: 3px solid transparent;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.08);
    color: var(--baozi-gold);
    border-left-color: var(--baozi-gold);
}

.admin-topbar {
    background: white;
    padding: 16px 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #333;
}

.stat-card .stat-label {
    color: #888;
    font-size: 0.9rem;
}

.table-wrapper {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.table th {
    color: #888;
    font-weight: 500;
    font-size: 0.85rem;
    border: none;
    padding: 12px 16px;
}

.table td {
    vertical-align: middle;
    border-color: #F0F0F0;
    padding: 14px 16px;
}

.table-hover tbody tr:hover {
    background: #FFFBF5;
}

.badge-status {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-pending { background: #FFF3E0; color: #E65100; }
.badge-paying { background: #E3F2FD; color: #1565C0; }
.badge-paid { background: #E8F5E9; color: #2E7D32; }
.badge-cancelled { background: #FFEBEE; color: #C62828; }

/* ===== 弹窗/Toast ===== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

.custom-toast {
    background: white;
    border-radius: 12px;
    padding: 16px 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    margin-bottom: 10px;
    min-width: 260px;
    border-left: 4px solid var(--baozi-green);
}

.custom-toast.error {
    border-left-color: var(--baozi-red);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== Footer ===== */
.site-footer {
    background: linear-gradient(135deg, var(--baozi-brown) 0%, #3E2723 100%);
    color: rgba(255,255,255,0.8);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.site-footer h5 {
    color: var(--baozi-gold);
    font-weight: 700;
    margin-bottom: 16px;
}

.site-footer a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.3s;
}

.site-footer a:hover {
    color: var(--baozi-gold);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 1.8rem; }
    .hero-section { padding: 40px 0; }
    .product-card .card-img-wrap { height: 160px; }
    .product-card .card-img-top { height: 160px; }
    .checkout-section { padding: 20px; }
    .cart-item { flex-wrap: wrap; }
    .admin-sidebar { min-height: auto; }
}

/* ===== 装饰 ===== */
.decorative-divider {
    text-align: center;
    margin: 3rem 0;
    color: var(--baozi-gold);
    font-size: 1.5rem;
    letter-spacing: 10px;
}

.img-placeholder-circle {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FFF0E0, #FFE4CC);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

/* ===== 产品详情页 ===== */
.detail-header {
    background: linear-gradient(135deg, var(--baozi-red) 0%, var(--baozi-red-dark) 100%);
    color: white;
    padding: 40px 0;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a { color: rgba(255,255,255,0.7); }
.breadcrumb-item.active { color: white; }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.4); }

.detail-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
}

.detail-img {
    background: linear-gradient(135deg, #FFF0E0, #FFE4CC);
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    font-size: 10rem;
}

.detail-body {
    padding: 32px;
}

.detail-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #333;
}

.detail-desc {
    color: #666;
    font-size: 1rem;
    line-height: 1.8;
    margin: 16px 0;
}

.detail-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--baozi-red);
}

.detail-original {
    font-size: 1.1rem;
    color: #bbb;
    text-decoration: line-through;
    margin-left: 12px;
}

.btn-detail-add {
    background: linear-gradient(135deg, var(--baozi-red) 0%, var(--baozi-red-dark) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.3s;
    width: 100%;
}

.btn-detail-add:hover {
    color: white;
    transform: scale(1.03);
    box-shadow: 0 6px 25px rgba(196,30,58,0.4);
}

.related-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    color: inherit;
}

.related-card .related-img {
    height: 100px;
    background: linear-gradient(135deg, #FFF0E0, #FFE4CC);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.related-card .related-body {
    padding: 12px;
}

/* ===== 管理员登录 ===== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--baozi-red) 0%, var(--baozi-red-dark) 100%);
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card h2 {
    font-weight: 800;
    color: var(--baozi-red);
    margin-bottom: 8px;
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}

.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}
