/* Custom Styles for Shopping Mall */

:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --text-dark: #2b2d42;
    --text-muted: #8d99ae;
    --bg-light: #f8f9fa;
    --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 15px 30px rgba(67, 97, 238, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-dark);
    background-color: #fdfdfd;
}

/* Navbar Beautification */
.navbar {
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
    background: linear-gradient(135deg, #1e1e2f 0%, #2d2d44 100%) !important;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    background: linear-gradient(45deg, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 网站标题自适应缩放 */
.site-title-text {
    display: inline-block;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    font-size: clamp(0.85rem, 2.5vw, 1.2rem);
}

@media (max-width: 576px) {
    .site-title-text {
        max-width: 120px;
    }
}

/* 底部网站标题自适应 */
.footer-site-title {
    display: inline-block;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(0.9rem, 2vw, 1.25rem);
    vertical-align: middle;
    line-height: 1.2;
}

.nav-link {
    font-weight: 500;
    color: rgba(255,255,255,0.85) !important;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.nav-link:hover {
    color: #fff !important;
    transform: translateY(-1px);
}

/* Hero Carousel */
#heroCarousel {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    margin-top: 2rem;
}

#heroCarousel .carousel-item {
    height: 450px;
}

#heroCarousel img {
    height: 450px;
    object-fit: cover;
    filter: brightness(0.85);
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    padding: 20px;
    bottom: 15%;
}

/* Product Cards */
.product-card {
    border: none;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow-hover);
}

.product-img-container {
    position: relative;
    overflow: hidden;
    height: 240px;
    background-color: #f0f2f5;
}

.product-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.shop-name {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.price-tag {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ef233c;
    margin-bottom: 1rem;
}

/* Category Filter */
.category-btn {
    border-radius: 50px;
    padding: 8px 20px;
    font-weight: 600;
    border: 1px solid #dee2e6;
    background: #fff;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.category-btn:hover, .category-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

/* Custom Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    border-radius: 10px;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Footer 强制颜色修复 */
footer.footer {
    background-color: #12121f !important;
    color: #ffffff !important;
}

footer.footer h5,
footer.footer h6,
footer.footer .text-white {
    color: #ffffff !important;
}

footer.footer p,
footer.footer span,
footer.footer small,
footer.footer .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

footer.footer a {
    color: rgba(255, 255, 255, 0.6) !important;
    transition: all 0.3s ease;
}

footer.footer a:hover {
    color: #4361ee !important;
    text-decoration: none;
}

footer.footer hr {
    border-color: rgba(255, 255, 255, 0.1) !important;
    opacity: 1;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 3px;
    border: none;
    color: var(--text-dark);
    font-weight: 600;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

/* 辅助颜色类 (Soft Colors for Admin/Seller UI) */
.bg-primary-soft { background-color: #e7eefd !important; color: #4361ee !important; }
.bg-info-soft { background-color: #e3fafc !important; color: #0c8599 !important; }
.bg-warning-soft { background-color: #fff9db !important; color: #f08c00 !important; }
.bg-success-soft { background-color: #e6fcf5 !important; color: #0ca678 !important; }
.bg-danger-soft { background-color: #fff5f5 !important; color: #fa5252 !important; }
.bg-secondary-soft { background-color: #f8f9fa !important; color: #6c757d !important; }

/* 文本与排版增强 */
.fw-600 { font-weight: 600 !important; }
.leading-relaxed { line-height: 1.6; }

/* 进度条动画增强 */
.progress-line { border-radius: 10px; overflow: hidden; }
.progress-line-active { border-radius: 10px; }

/* 响应式表格微调 */
.table > :not(caption) > * > * {
    padding: 1.2rem 1rem;
    vertical-align: middle;
}

/* 导航栏搜索框优化 */
.search-group-wrapper {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.search-group-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.placeholder-light::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* 消息提示框优化 */
.alert {
    border: none;
    border-radius: 0;
    font-weight: 500;
}

.alert-success {
    background-color: #2ecc71;
    color: white;
}

.alert-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* 按钮点击波纹感 */
.btn:active {
    transform: scale(0.98);
}

/* 图片上传预览样式 */
.image-preview-wrapper {
    position: relative;
    width: 100%;
    min-height: 200px;
    border-radius: 16px;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.image-preview-wrapper:hover {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.02);
}

.image-preview-wrapper img {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 12px;
}

.upload-placeholder {
    text-align: center;
    color: #adb5bd;
    padding: 20px;
}
