/* Custom CSS for GoldSmart Precious Metals Website */

/* Color Variables based on Pantone Standards */
:root {
    /* Pantone 109C: Gold - CMYK: C5, M22, Y99, K0 -> RGB: #FFD100 */
    --gold-primary: #FFD100;
    --gold-dark: #E0B900;
    --gold-light: #FFF0A0;
    
    /* Pantone Black 7C: Dark Gray - CMYK: C76, M72, Y72, K41 -> RGB: #333333 */
    --dark-primary: #333333;
    --dark-light: #444444;
    --dark-lighter: #666666;
    
    /* White and Neutral Colors */
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --medium-gray: #CCCCCC;
    --text-secondary: #666666;
    
    /* Success and Warning Colors */
    --success-color: #28a745;
    --danger-color: #dc3545;
}

/* Base Styles */
html {
    font-size: 14px;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 0;
    background-color: var(--white);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-primary);
    line-height: 1.6;
}

/* Navbar Styles */
.navbar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative !important; /* 确保z-index生效 */
    z-index: 1000 !important; /* 确保导航栏在所有内容之上（除了下拉菜单） */
}

.navbar:hover {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--gold-primary) !important;
    transition: all 0.3s ease;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    color: var(--dark-primary) !important;
    transition: all 0.3s ease;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Button Styles */
.btn {
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    padding: 0.75rem 1.5rem;
}

.btn-primary {
    background-color: var(--gold-primary);
    color: var(--dark-primary);
}

.btn-primary:hover {
    background-color: var(--gold-dark);
    color: var(--dark-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 209, 0, 0.4);
}

.btn-warning {
    background-color: var(--gold-primary);
    color: var(--dark-primary);
}

.btn-warning:hover {
    background-color: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 209, 0, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--dark-primary);
    color: var(--dark-primary);
    background-color: transparent;
}

/* Targeted style for View Details buttons in product cards */
.product-card .card-footer a.btn-outline-primary {
    color: var(--dark-primary);
}

.btn-outline-primary:hover {
    background-color: var(--gold-primary);
    border-color: var(--gold-primary);
    color: var(--dark-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-outline-primary.active {
    background-color: var(--gold-primary);
    border-color: var(--gold-primary);
    color: var(--dark-primary);
}

/* Card Styles */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

/* 在管理页面中禁用卡片的hover transform效果，防止模态框闪烁 */
.card:has(.table) {
    transform: none !important;
}

.card:has(.table):hover {
    transform: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* 保持原始阴影 */
}

.card.border-warning {
    border: 2px solid var(--gold-primary);
    background: linear-gradient(135deg, rgba(255, 209, 0, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

.card.border-secondary {
    border: 2px solid var(--medium-gray);
    background: linear-gradient(135deg, rgba(204, 204, 204, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

.card-header {
    background-color: var(--dark-primary);
    color: var(--white);
    border-bottom: none;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
    color: var(--white);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(51, 51, 51, 0.7), rgba(51, 51, 51, 0.7)), 
                url('../images/index_top01.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 8rem 0;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 209, 0, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Price Card Styles */
.price-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.price-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-primary), var(--medium-gray));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.price-card:hover::before {
    opacity: 1;
}

.price-card.gold {
    border-color: #ffc107;
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.15);
}

.price-card.gold:hover {
    box-shadow: 0 8px 30px rgba(255, 193, 7, 0.3);
}

.price-card.silver {
    border-color: #6c757d;
    box-shadow: 0 4px 20px rgba(108, 117, 125, 0.15);
}

.price-card.silver:hover {
    box-shadow: 0 8px 30px rgba(108, 117, 125, 0.3);
}

.price-card.platinum {
    border-color: #E5E4E2;
    box-shadow: 0 4px 20px rgba(229, 228, 226, 0.15);
}

.price-card.platinum:hover {
    box-shadow: 0 8px 30px rgba(192, 191, 189, 0.4);
}

.price-card.others {
    border-color: #6c757d;
    box-shadow: 0 4px 20px rgba(108, 117, 125, 0.15);
}

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

/* Homepage product cards - no border style */
.price-card.no-border {
    border: none !important;
    box-shadow: none !important;
    background: transparent;
    backdrop-filter: none;
}

.price-card.no-border:hover {
    transform: none;
    box-shadow: none !important;
}

.price-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #dc3545;
    margin: 0.5rem 0;
    transition: all 0.3s ease;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
    max-width: 100%;
    word-break: break-word;
    display: block;
    text-align: right;
}

.price-card:hover .price-value {
    transform: scale(1.05);
}

/* Responsive font sizes for price values */
@media (min-width: 992px) {
    .price-value {
        font-size: 2.5rem;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .price-value {
        font-size: 2.1rem;
    }
}

@media (max-width: 576px) {
    .price-value {
        font-size: 1.6rem;
    }
    
    .price-card .d-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .price-card .text-end {
        width: 100%;
        align-items: flex-start;
    }
    
    .price-value {
        text-align: left;
    }
    
    /* Ensure price cards on mobile have adequate padding */
    .price-card {
        padding: 1.5rem;
    }
}

/* Adjust price card layout for medium screens */
@media (max-width: 992px) {
    .price-card .text-end small {
        font-size: 0.8rem;
    }
    
    .price-value {
        font-size: 1.6rem;
    }
}

/* Price card content layout */
.price-card .d-flex {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.price-card .text-end {
    flex: 1;
    text-align: end;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.price-card .text-end small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    max-width: 100%;
    word-break: break-word;
}

.price-unit {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Price header layout */
.price-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem 1.5rem;
    position: relative;
    min-height: 130px;
}

/* Position metal badge to top-left of price value with 16px spacing */
.metal-badge {
    position: absolute;
    top: 11px; /* 向上移动约5像素，从1rem(16px)调整为11px */
    left: 1rem;
    margin: 0;
    z-index: 10;
}

/* Center price value horizontally with proper spacing from badge */
.price-header .price-value {
    text-align: center;
    margin: 0 0 0.5rem 0;
    position: relative;
    z-index: 5;
    font-size: 2.2rem;
}

/* Position price unit below price value */
.price-header .price-unit {
    display: block;
    text-align: center;
    margin: 0;
    font-size: 1rem;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .price-header {
        padding: 1.25rem 0.75rem;
        min-height: 100px;
    }
    
    .metal-badge {
        top: 8px; /* 向上移动约5像素，从0.75rem(12px)调整为8px */
        left: 0.75rem;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .price-header .price-value {
        font-size: 2rem;
        margin: 1.25rem 0 0.5rem 0;
    }
}

@media (max-width: 768px) {
    .price-header {
        padding: 1rem 0.5rem;
        min-height: 90px;
    }
    
    .metal-badge {
        top: 5px; /* 向上移动约5像素，从0.5rem(8px)调整为5px */
        left: 0.5rem;
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .price-header .price-value {
        font-size: 1.8rem;
        margin: 1rem 0 0.4rem 0;
    }
    
    .price-header .price-unit {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .price-header {
        padding: 0.75rem 0.5rem;
        min-height: 80px;
    }
    
    .metal-badge {
        top: 5px; /* 向上移动约5像素，从0.5rem(8px)调整为5px */
        left: 0.5rem;
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .price-header .price-value {
        font-size: 1.6rem;
        margin: 0.8rem 0 0.3rem 0;
    }
    
    .price-header .price-unit {
        font-size: 0.85rem;
    }
}

/* Product Card Styles */
.product-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

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

.product-card .card-img-top {
    height: auto;
    max-height: 250px;
    object-fit: contain;
    transition: all 0.3s ease;
    width: auto;
    margin: 0 auto;
    display: block;
}

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

.product-card .card-body {
    padding: 1.5rem;
}

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

.product-card .card-text {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #dc3545;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin: 1rem 0;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

/* 为h3元素设置两倍的字体大小 */
h3.product-price {
    font-size: 3rem;
}

.product-card:hover .product-price {
    color: #c82333;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* 黄金价格高亮样式 */
.text-gold {
    color: #dc3545 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

/* 白银价格样式 */
.text-silver {
    color: #dc3545 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

/* Price Trend Indicators */
.price-up {
    color: var(--success-color);
    font-weight: 600;
}

.price-down {
    color: var(--danger-color);
    font-weight: 600;
}

/* Universal Price Color Class - Apply to all price display elements */
.price {
    color: #dc3545 !important;
    font-weight: 700;
}

/* Force all price-related elements to use red color */
.price-value,
.product-price,
.text-gold,
.text-silver,
h3.price-value,
h5.product-price,
h6.price,
span.price,
strong.price,
td.price {
    color: #dc3545 !important;
    font-weight: 700 !important;
}

/* Top prices bar - white text for prices */
.top-prices-bar .price,
.top-prices-bar span.price,
.top-prices-bar strong.price {
    color: #FFFFFF !important;
    font-weight: 600 !important;
}

/* Featured products buttons - ensure title alignment */
.featured-btn {
    display: flex !important;
    align-items: stretch !important;
    height: 100% !important;
}

.featured-btn-content {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
}

.featured-btn-content img {
    flex: 0 0 auto !important;
    margin-bottom: auto !important;
    margin-top: 0 !important;
}

.featured-btn-text {
    display: block !important;
    margin-top: auto !important;
    text-align: center !important;
    padding-top: 8px !important;
    font-weight: 500 !important;
}

/* Mobile responsive for featured buttons */
@media (max-width: 768px) {
    .featured-products-buttons {
        margin-top: 6rem !important;
        margin-bottom: 6rem !important;
    }
    
    .featured-btn-text {
        font-size: 0.9rem !important;
        padding-top: 6px !important;
    }
}

@media (max-width: 576px) {
    .featured-products-buttons {
        margin-top: 5rem !important;
        margin-bottom: 5rem !important;
    }
    
    .featured-btn-text {
        font-size: 0.8rem !important;
        padding-top: 4px !important;
    }
}

/* PC responsive for featured buttons */
@media (min-width: 769px) {
    .featured-products-buttons {
        margin-top: 8rem !important;
        margin-bottom: 8rem !important;
    }
}

/* Override Bootstrap text-secondary and text-info for price display */
.price-value.text-info,
.price-value.text-secondary,
.product-price.text-info,
.product-price.text-secondary,
.text-gold.text-info,
.text-gold.text-secondary,
.text-silver.text-info,
.text-silver.text-secondary,
h6.text-info.price,
h6.text-secondary.price {
    color: #dc3545 !important;
    font-weight: 700 !important;
}

/* Chart Container */
.chart-container {
    background-color: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Chart container transition for smooth metal switching */
#chartContainer {
    transition: opacity 0.3s ease;
    opacity: 1;
}

.chart-container:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Top Metal Prices Bar */
.top-prices-bar {
    background-color: #2d2d2d !important;
    color: var(--white) !important;
    padding: 0.375rem 0 !important;
    position: relative !important;
    width: 100% !important;
    z-index: 1040 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    margin-bottom: 0 !important;
}

/* Fixed Footer with High Priority */
footer.footer {
    background-color: #2d2d2d !important;
    color: var(--white) !important;
    padding: 0.375rem 0 !important;
    position: relative !important;
    width: 100% !important;
    z-index: 1040 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2) !important;
    margin-top: 3rem !important;
}

/* Footer Links */
.footer-link {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    transition: color 0.3s ease !important;
    font-weight: 500 !important;
}

.footer-link:hover {
    color: var(--gold-primary) !important;
}

/* Social Media Icons */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white) !important;
    font-size: 1.15rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background-color: var(--gold-primary);
    color: var(--dark-primary) !important;
    transform: translateY(-3px);
}

/* Footer responsive adjustments */
@media (max-width: 768px) {
    footer.footer {
        padding: 1rem 0 !important;
        margin-top: 2rem !important;
    }
    
    footer.footer .row {
        text-align: center;
    }
    
    footer.footer .col-md-3,
    footer.footer .col-md-6 {
        margin-bottom: 1rem;
    }
    
    footer.footer .col-md-3:last-child,
    footer.footer .col-md-6:last-child {
        margin-bottom: 0;
    }
    
    footer.footer img {
        height: 32px;
        margin-bottom: 0.5rem;
    }
    
    footer.footer p {
        font-size: 0.8rem;
    }
    
    .footer-link {
        font-size: 0.85rem !important;
        padding: 0.5rem;
        display: inline-block;
        min-height: 36px;
        line-height: 1.5;
    }
    
    footer.footer .d-flex.flex-wrap.justify-content-center.gap-3 {
        gap: 0.5rem !important;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        min-width: 40px;
        min-height: 40px;
    }
    
    footer.footer .text-center.mt-2 small {
        font-size: 0.75rem;
        display: block;
        padding: 0 1rem;
    }
}

@media (max-width: 576px) {
    footer.footer {
        padding: 0.875rem 0 !important;
    }
    
    footer.footer img {
        height: 28px;
    }
    
    footer.footer p {
        font-size: 0.75rem;
    }
    
    .footer-link {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.5rem;
    }
    
    .social-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        min-width: 36px;
        min-height: 36px;
    }
    
    footer.footer .text-center.mt-2 small {
        font-size: 0.7rem;
    }
}

@media (max-width: 400px) {
    footer.footer {
        padding: 0.75rem 0 !important;
    }
    
    .footer-link {
        font-size: 0.75rem !important;
    }
    
    .social-icon {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
        min-width: 34px;
        min-height: 34px;
    }
}

@media (max-width: 390px) {
    footer.footer .d-flex.flex-wrap.justify-content-center.gap-3 {
        gap: 0.35rem !important;
    }
    
    .footer-link {
        font-size: 0.7rem !important;
        padding: 0.3rem 0.4rem;
    }
    
    .social-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        min-width: 32px;
        min-height: 32px;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark-primary);
    font-weight: 700;
}

.text-gold {
    color: #dc3545 !important;
}

.text-dark {
    color: var(--dark-primary) !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

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

.pulse {
    animation: pulse 2s infinite;
}

/* Form Styles */
.form-control {
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 0.25rem rgba(255, 209, 0, 0.25);
    outline: none;
}

/* Table Styles */
.table {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.table th {
    background-color: var(--dark-primary);
    color: var(--white);
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    padding: 1rem;
}

.table td {
    vertical-align: middle;
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
    text-align: center;
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 209, 0, 0.05);
}

/* Mobile Navigation Styles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        padding: 1rem 0;
    }
    
    .navbar-nav {
        margin-bottom: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .navbar-toggler {
        padding: 0.5rem;
        font-size: 1.25rem;
        border: none;
        min-width: 44px;
        min-height: 44px;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(255, 209, 0, 0.25);
    }
    
    /* Search box in mobile nav */
    .navbar-collapse form.d-flex {
        margin: 1rem 0;
        max-width: 100% !important;
        width: 100%;
    }
    
    .navbar-collapse form.d-flex .form-control {
        min-height: 44px;
    }
    
    .navbar-collapse form.d-flex .btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Language dropdown in mobile */
    .navbar-collapse .dropdown-menu {
        position: static !important;
        width: 100%;
        margin-top: 0.5rem;
        box-shadow: none;
        border: 1px solid rgba(0,0,0,0.1);
    }
    
    .navbar-collapse .dropdown-toggle {
        padding: 0.75rem 1rem;
        width: 100%;
        text-align: left;
    }
    
    /* Admin dropdown in mobile */
    .navbar-collapse .dropdown-menu-end {
        position: static !important;
        width: 100%;
    }
}

/* Extra small devices (phones, 400px and down) - Xiaomi 15 */
@media (max-width: 400px) {
    .navbar-brand img {
        height: 32px;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

/* iPhone 14/15 specific (390px) */
@media (max-width: 390px) {
    .navbar-brand img {
        height: 30px;
    }
}

/* iPhone 14 Pro/15 Pro specific (393px) */
@media (max-width: 393px) and (min-width: 391px) {
    .navbar-brand img {
        height: 31px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 0;
        background-attachment: scroll;
    }
    
    .price-value {
        font-size: 2rem;
    }
    
    .product-card .card-img-top {
        max-height: 200px;
        height: auto;
        object-fit: contain;
        width: auto;
        margin: 0 auto;
        display: block;
    }
    
    .chart-container {
        padding: 1rem;
    }
    
    .navbar-brand img {
        height: 34px;
    }
}

/* Carousel Styles */
.carousel-section {
    width: 100%;
    position: relative;
    margin-bottom: 2rem;
}

.carousel {
    width: 100%;
    margin-bottom: 0;
}

.carousel-inner {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: 500px;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
}

.carousel {
    position: relative;
}

.carousel-item {
    transition: transform 0.6s ease-in-out;
    height: 100%;
    width: 100%;
}

.carousel-image-container {
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.carousel-image-container img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    max-width: none;
    object-position: center;
    display: block;
    margin: 0 auto;
}

.carousel-control-prev,
.carousel-control-next {
    width: 8%;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    height: 100%;
    top: 0;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: rgba(51, 51, 51, 0.7);
    border-radius: 50%;
    background-size: 50%;
    background-position: center;
}

.carousel-indicators {
    bottom: 1rem !important;
    top: auto !important;
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    justify-content: center !important;
    z-index: 10 !important;
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(0, 0, 0, 0.3);
    margin: 0 5px;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: var(--gold-primary);
    border-color: var(--gold-primary);
    width: 12px;
    height: 12px;
}

/* Product Card in Carousel */
.carousel .product-card {
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: auto;
    margin: 0 auto;
    max-width: 100%;
}

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

.carousel .product-card img {
    transition: all 0.3s ease;
    margin: 0 auto;
    width: auto;
    height: auto;
    max-height: 300px;
    object-fit: contain;
}

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

/* Lazy Loading */
.lazyload {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazyload.loaded {
    opacity: 1;
}

/* Top Metal Prices Bar - Mobile */
@media (max-width: 768px) {
    .top-prices-bar {
        padding: 0.5rem 0 !important;
    }
    
    .top-prices-bar .metal-prices-container {
        font-size: 0.85rem !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .top-prices-bar .metal-prices-container .d-flex {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
    }
    
    .top-prices-bar .metal-prices-container .d-flex.align-items-center {
        margin-right: 0 !important;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .top-prices-bar {
        padding: 0.375rem 0 !important;
    }
    
    .top-prices-bar .metal-prices-container {
        font-size: 0.75rem !important;
    }
    
    .top-prices-bar .metal-prices-container .d-flex.align-items-center {
        font-size: 0.7rem;
    }
}

@media (max-width: 400px) {
    .top-prices-bar .metal-prices-container {
        font-size: 0.7rem !important;
    }
}

/* Responsive Carousel */
@media (max-width: 1200px) {
    .carousel-inner {
        height: 400px;
    }
    
    .carousel-image-container {
        height: 400px;
    }
    
    .carousel-image-container img {
        height: 100%;
    }
    
    .hero-banner {
        height: 400px;
    }
}

@media (max-width: 992px) {
    .carousel-inner {
        height: 350px;
    }
    
    .carousel-image-container {
        height: 350px;
    }
    
    .carousel-image-container img {
        height: 100%;
    }
    
    .hero-banner {
        height: 350px;
    }
}

/* Hero Banner Container - 桌面端默认样式 */
.hero-banner-container {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: 500px;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    position: relative;
}

/* Hero Banner Image - 桌面端默认样式 */
.hero-banner {
    object-fit: contain;
    height: 100%;
    width: 100%;
}

/* Carousel Image - 桌面端默认样式 */
.carousel-img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    max-width: none;
    object-position: center;
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .hero-banner-container {
        height: auto;
        min-height: 400px;
    }
    .carousel {
        margin-bottom: 1.5rem;
    }
    
    .carousel-inner {
        height: auto;
        max-height: none;
    }
    
    .carousel-item {
        height: auto;
    }
    
    .carousel-image-container {
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .carousel-image-container img,
    .carousel-img {
        height: auto;
        width: 100%;
        object-fit: contain;
        max-height: none;
        display: block;
    }
    
    .hero-banner {
        height: auto;
        width: 100%;
        object-fit: contain;
        display: block;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 15%;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 2.5rem;
        height: 2.5rem;
        min-width: 44px;
        min-height: 44px;
    }
    
    .carousel .product-card img {
        max-height: 250px;
    }
    
    .carousel-indicators {
        bottom: 1rem !important;
    }
    
    .carousel-indicators [data-bs-target] {
        width: 10px;
        height: 10px;
        margin: 0 4px;
        min-width: 10px;
        min-height: 10px;
    }
    
    .carousel-indicators .active {
        width: 12px;
        height: 12px;
    }
    
    /* Hero Banner - 移动端自适应 */
    .hero-banner {
        height: auto;
        max-height: none;
        object-fit: contain;
    }
}

@media (max-width: 576px) {
    .carousel-section {
        margin-bottom: 1rem;
    }
    
    .carousel-inner {
        height: auto;
        max-height: none;
    }
    
    .carousel-image-container {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .carousel-image-container img,
    .carousel-img {
        max-height: none;
        width: 100%;
        height: auto;
        object-fit: contain;
    }
    
    .hero-banner-container {
        height: auto;
        min-height: 300px;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 2rem;
        height: 2rem;
        min-width: 44px;
        min-height: 44px;
    }
    
    .hero-banner {
        max-height: none;
        width: 100%;
        height: auto;
        object-fit: contain;
    }
}

@media (max-width: 400px) {
    .carousel-inner {
        height: auto;
        max-height: none;
    }
    
    .carousel-image-container {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .carousel-image-container img,
    .carousel-img {
        max-height: none;
        width: 100%;
        height: auto;
        object-fit: contain;
    }
    
    .hero-banner {
        max-height: none;
        width: 100%;
        height: auto;
        object-fit: contain;
    }
}

@media (max-width: 390px) {
    .carousel-inner {
        height: auto;
        max-height: none;
    }
    
    .carousel-image-container img,
    .carousel-img {
        max-height: none;
    }
    
    .hero-banner {
        max-height: none;
    }
}

@media (max-width: 576px) {
    .carousel .product-card img {
        max-height: 200px;
    }
    
    .carousel .card-title {
        font-size: 1.1rem;
    }
    
    .carousel .card-text {
        font-size: 0.9rem;
    }
}

/* Bootstrap Modal z-index fix */
/* 确保模态框及其背景层在所有固定元素之上 */
.modal-backdrop {
    z-index: 1050 !important;
}

.modal {
    z-index: 1055 !important;
    position: fixed !important; /* 确保模态框固定定位，不受父元素影响 */
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* 确保模态框内容不被其他元素遮挡 */
.modal-dialog {
    z-index: 1056 !important;
    position: relative !important;
    will-change: auto !important; /* 防止GPU加速导致的闪烁 */
}

/* 禁用模态框的过渡动画以防止闪烁 */
.modal.fade .modal-dialog {
    transition: none !important;
    transform: none !important;
}

.modal.fade {
    transition: none !important;
}

/* 确保模态框立即显示，无淡入效果 */
.modal.show .modal-dialog {
    transform: none !important;
}

/* 防止鼠标悬停时模态框容器受到父元素transform影响 */
.modal-dialog, .modal-content {
    backface-visibility: hidden !important; /* 防止3D transform导致的闪烁 */
    -webkit-backface-visibility: hidden !important;
}

/* 确保表格行hover时不影响嵌套的模态框 */
.table-hover tbody tr:hover .modal {
    transform: none !important;
}

/* 确保按钮hover时不触发额外的重排 */
.btn-outline-danger:hover + .modal {
    display: none; /* 模态框只在触发时显示，悬停时保持隐藏 */
}

/* 禁用表格内小按钮的hover transform效果，防止触发模态框闪烁 */
.table .btn-sm:hover {
    transform: none !important;
}

/* 确保表格单元格内的按钮hover时不会影响布局 */
table td .btn:hover {
    transform: none !important;
}

/* Utilities */
.bg-gold-light {
    background-color: rgba(255, 209, 0, 0.1);
}

.bg-dark-light {
    background-color: rgba(51, 51, 51, 0.1);
}

.shadow-lg {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Button focus styles */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--gold-primary);
}

/* Loading spinner */
.spinner-border {
    border-color: var(--gold-primary);
    border-right-color: transparent;
}

/* Badge styles */
.badge {
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.badge.bg-warning {
    background-color: var(--gold-primary);
    color: var(--dark-primary);
}

.badge.bg-secondary {
    background-color: #6c757d !important;
    color: #fff !important;
}

.badge.bg-info {
    background-color: #E5E4E2 !important;
    color: #333333 !important;
}

/* Logo styles */
img[src*="logo.png"] {
    max-height: 60px;
    width: auto;
    transition: all 0.3s ease;
}

img[src*="logo.png"]:hover {
    transform: scale(1.05);
}

/* Fix for language dropdown menu being covered by footer and carousel */
.dropdown-menu {
    z-index: 1100 !important; /* 高于导航栏的z-index */
    position: absolute !important;
    top: 100% !important;
    left: auto !important;
    right: 0 !important; /* 右对齐，与语言切换按钮对齐 */
    width: auto !important;
    min-width: 180px !important;
    margin-top: 0.125rem !important;
    background-color: white !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Ensure dropdown parent has relative positioning */
.dropdown {
    position: relative !important;
}

/* Adjust dropdown button styles */
.btn-link.nav-link.dropdown-toggle {
    color: var(--dark-primary) !important;
    padding: 0.5rem 0.75rem !important;
    margin: 0 !important;
}

.btn-link.nav-link.dropdown-toggle:hover {
    color: var(--gold-primary) !important;
    text-decoration: none !important;
}

/* Hide product weight information */
.product-card .text-muted.d-block.mb-2 {
    display: none !important;
}

.price-card .text-muted.small.mb-1 {
    display: none !important;
}

/* Mobile Product Cards Optimization */
@media (max-width: 768px) {
    /* Product cards in mobile grid */
    .col-6 .price-card,
    .col-6 .product-card {
        padding: 0.75rem;
    }
    
    .col-6 .price-card img,
    .col-6 .product-card img {
        max-height: 240px !important;
        width: 100%;
        object-fit: contain;
    }
    
    .col-6 .price-card .card-title,
    .col-6 .product-card .card-title {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .col-6 .price-card h6,
    .col-6 .product-card h6 {
        font-size: 0.85rem;
    }
    
    .col-6 .product-price {
        font-size: 1.1rem;
    }
    
    /* 首页产品卡图片 - 覆盖内联样式 */
    .col-6 .price-card .text-center img {
        width: 100% !important;
        max-width: 100% !important;
        max-height: none !important;
        min-height: 150px !important;
        object-fit: contain !important;
    }
    
    /* Hot badge positioning for mobile - 改为文档流布局，不遮挡图片 */
    .price-card.hot {
        display: flex;
        flex-direction: column;
    }
    
    .col-6 .hot-badge {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        align-self: flex-end;
        margin-bottom: 0.25rem;
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
        border-radius: 0 0 0 8px;
    }
    
    /* Featured product buttons */
    .mb-6 .col-sm-6 img {
        max-height: 120px !important;
    }
    
    /* Section headings */
    .mb-6 h2 {
        font-size: 1.5rem;
    }
    
    .mb-6 h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .col-6 .price-card,
    .col-6 .product-card {
        padding: 0.5rem;
    }
    
    .col-6 .price-card img,
    .col-6 .product-card img {
        max-height: 200px !important;
        width: 100%;
        object-fit: contain;
    }
    
    .col-6 .price-card .card-title,
    .col-6 .product-card .card-title {
        font-size: 0.85rem;
    }
    
    .col-6 .price-card h6,
    .col-6 .product-card h6 {
        font-size: 0.8rem;
    }
    
    .col-6 .product-price {
        font-size: 1rem;
    }
    
    /* 首页产品卡图片 - 覆盖内联样式 */
    .col-6 .price-card .text-center img {
        max-height: none !important;
        min-height: 130px !important;
    }
    
    .col-6 .hot-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
}

@media (max-width: 400px) {
    .col-6 .price-card,
    .col-6 .product-card {
        padding: 0.4rem;
    }
    
    .col-6 .price-card img,
    .col-6 .product-card img {
        max-height: 180px !important;
        width: 100%;
        object-fit: contain;
    }
    
    .col-6 .price-card .card-title,
    .col-6 .product-card .card-title {
        font-size: 0.8rem;
    }
    
    .col-6 .product-price {
        font-size: 0.95rem;
    }
    
    /* 首页产品卡图片 - 覆盖内联样式 */
    .col-6 .price-card .text-center img {
        max-height: none !important;
        min-height: 120px !important;
    }
}

@media (max-width: 390px) {
    .col-6 .price-card,
    .col-6 .product-card {
        padding: 0.35rem;
    }
    
    .col-6 .price-card img,
    .col-6 .product-card img {
        max-height: 170px !important;
        width: 100%;
        object-fit: contain;
    }
    
    .col-6 .price-card .card-title,
    .col-6 .product-card .card-title {
        font-size: 0.75rem;
    }
    
    .col-6 .product-price {
        font-size: 0.9rem;
    }
    
    /* 首页产品卡图片 - 覆盖内联样式 */
    .col-6 .price-card .text-center img {
        max-height: none !important;
        min-height: 110px !important;
    }
}

/* Live Metal Prices Section - Mobile */
@media (max-width: 768px) {
    .row.mb-4 .col-md-4 {
        margin-bottom: 1rem;
    }
    
    .row.mb-4 .col-md-4:last-child {
        margin-bottom: 0;
    }
    
    .price-card {
        padding: 1rem;
    }
    
    .price-header {
        padding: 1rem 0.75rem;
        min-height: 100px;
    }
    
    .price-header .price-value {
        font-size: 1.8rem;
    }
    
    .metal-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}

@media (max-width: 576px) {
    .price-card {
        padding: 0.875rem;
    }
    
    .price-header {
        padding: 0.875rem 0.5rem;
        min-height: 90px;
    }
    
    .price-header .price-value {
        font-size: 1.6rem;
    }
    
    .metal-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .price-card .row.text-center .col-6 {
        font-size: 0.85rem;
    }
    
    .price-card .row.text-center .col-6 strong {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .price-header .price-value {
        font-size: 1.5rem;
    }
    
    .metal-badge {
        font-size: 0.65rem;
    }
}

@media (max-width: 390px) {
    .price-header .price-value {
        font-size: 1.4rem;
    }
    
    .price-card .row.text-center .col-6 {
        font-size: 0.8rem;
    }
}

/* Price Trends Chart - Mobile Optimization */
@media (max-width: 768px) {
    .chart-container {
        padding: 1rem 0.75rem;
    }
    
    .chart-container .card-header {
        padding: 0.75rem;
    }
    
    .chart-container .card-header h5 {
        font-size: 1.1rem;
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    .chart-controls {
        width: 100%;
        justify-content: flex-start;
    }
    
    .chart-controls .btn-group {
        flex-wrap: wrap;
    }
    
    .chart-controls .btn-group .btn {
        font-size: 0.8rem;
        padding: 0.375rem 0.75rem;
    }
    
    #priceChart {
        max-height: 300px !important;
    }
}

@media (max-width: 576px) {
    .chart-container {
        padding: 0.75rem 0.5rem;
    }
    
    .chart-container .card-header h5 {
        font-size: 1rem;
    }
    
    .chart-controls {
        gap: 0.5rem !important;
    }
    
    .chart-controls .btn-group .btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    #priceChart {
        max-height: 250px !important;
    }
    
    #chartLoading,
    #chartNoData {
        padding: 2rem 0 !important;
    }
    
    #chartLoading .spinner-border {
        width: 2rem;
        height: 2rem;
    }
}

@media (max-width: 400px) {
    .chart-controls .btn-group {
        width: 100%;
    }
    
    .chart-controls .btn-group .btn {
        flex: 1;
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    #priceChart {
        max-height: 220px !important;
    }
}

@media (max-width: 390px) {
    #priceChart {
        max-height: 200px !important;
    }
}

/* Products Page - Mobile Optimization */
@media (max-width: 768px) {
    /* Sidebar cards */
    .col-12.col-md-3 .card {
        margin-bottom: 1rem;
    }
    
    .col-12.col-md-3 .card-header h5 {
        font-size: 1rem;
    }
    
    .col-12.col-md-3 .list-group-item {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Live prices mini card */
    .col-12.col-md-3 .price-card.gold {
        margin-bottom: 1rem;
    }
    
    .col-12.col-md-3 .price-card .card-header h5 {
        font-size: 0.95rem;
    }
    
    /* Search section */
    #searchForm .input-group-lg .form-control {
        font-size: 1rem;
        min-height: 44px;
    }
    
    #searchForm .input-group-lg .btn {
        padding: 0.5rem 1rem;
        min-height: 44px;
    }
    
    /* Search suggestions */
    #searchSuggestions {
        width: 100% !important;
        position: relative !important;
    }
    
    /* Products grid */
    .col-6.col-md-4 .product-card .card-title {
        font-size: 0.9rem;
    }
    
    .col-6.col-md-4 .product-card .product-price {
        font-size: 1.1rem;
    }
    
    .col-6.col-md-4 .product-card .card-footer .btn {
        font-size: 0.85rem;
        padding: 0.5rem;
        min-height: 40px;
    }
    
    /* Loading and status messages */
    #loading-indicator .spinner-border {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    #loading-indicator p,
    #no-more-data p,
    #error-message p {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .col-12.col-md-3 .card-header h5 {
        font-size: 0.95rem;
    }
    
    .col-12.col-md-3 .list-group-item {
        padding: 0.625rem 0.875rem;
        font-size: 0.85rem;
    }
    
    #searchForm .input-group {
        flex-wrap: wrap;
    }
    
    #searchForm .input-group .form-control {
        width: 100%;
        margin-bottom: 0.5rem;
        border-radius: 0.375rem !important;
    }
    
    #searchForm .input-group .btn {
        width: auto;
        flex: 1;
        border-radius: 0.375rem !important;
        min-height: 44px;
    }
    
    .col-6.col-md-4 .product-card .card-title {
        font-size: 0.85rem;
    }
    
    .col-6.col-md-4 .product-card .product-price {
        font-size: 1rem;
    }
    
    .col-6.col-md-4 .product-card .badge {
        font-size: 0.75rem;
    }
}

@media (max-width: 400px) {
    .col-6.col-md-4 .product-card .card-title {
        font-size: 0.8rem;
    }
    
    .col-6.col-md-4 .product-card .product-price {
        font-size: 0.95rem;
    }
    
    .col-6.col-md-4 .product-card .card-footer .btn {
        font-size: 0.8rem;
    }
}

@media (max-width: 390px) {
    .col-6.col-md-4 .product-card .card-title {
        font-size: 0.75rem;
    }
    
    .col-6.col-md-4 .product-card .product-price {
        font-size: 0.9rem;
    }
}

/* ============================================
   Arrow Breadcrumb (Ribbon/Tag Style)
   ============================================ */
.breadcrumb {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0;
    margin-bottom: 1rem;
    list-style: none;
    background: transparent;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.breadcrumb::-webkit-scrollbar {
    display: none;
}

.breadcrumb-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 8px 16px 8px 24px;
    background: #f0f0f0;
    color: #666;
    font-size: 0.85rem;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.5;
}

.breadcrumb-item + .breadcrumb-item {
    padding-left: 24px;
    margin-left: 0;
}

.breadcrumb-item:first-child {
    padding-left: 16px;
    border-radius: 4px 0 0 4px;
}

/* Arrow point - right chevron using CSS border trick */
.breadcrumb-item::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 12px solid #f0f0f0;
    z-index: 2;
}

/* Arrow indentation - white triangle cut into left side (items after first) */
.breadcrumb-item + .breadcrumb-item::before {
    content: '' !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 12px solid #fff;
    z-index: 2;
    float: none;
    padding: 0;
    margin-right: 0;
    color: transparent;
}

/* Active item (current page) - gold gradient */
.breadcrumb-item.active {
    background: linear-gradient(135deg, #b8860b, #daa520);
    color: #fff;
    font-weight: 600;
    border-radius: 0 4px 4px 0;
}

.breadcrumb-item.active::after {
    display: none;
}

/* Link styles */
.breadcrumb-item a {
    color: #666;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #b8860b;
}

/* Product Details Page - Mobile Optimization */
@media (max-width: 768px) {
    /* Product title */
    .col-12.col-md-6 h1.h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    /* Product badges */
    .col-12.col-md-6 .badge.fs-6 {
        font-size: 0.8rem !important;
    }
    
    /* Main image */
    #mainImage {
        max-height: 350px;
        object-fit: contain;
    }
    
    /* Thumbnail images */
    .thumbnail-selector {
        height: 60px !important;
    }
    
    /* Price card */
    .col-12.col-md-6 .price-card.gold {
        padding: 1rem;
    }
    
    .col-12.col-md-6 .product-price {
        font-size: 2rem;
    }
    
    /* Volume pricing table */
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 0.5rem;
    }
    
    /* Order button */
    .d-grid.gap-2 .btn-lg {
        font-size: 1rem;
        padding: 0.75rem;
        min-height: 48px;
    }
    
    /* Recommended products */
    .col-6.col-md-3 .price-card {
        padding: 0.75rem;
    }
    
    .col-6.col-md-3 .price-card img {
        max-height: 100px !important;
    }
    
    .col-6.col-md-3 .price-card .card-title {
        font-size: 0.85rem;
    }
    
    .col-6.col-md-3 .price-card h6 {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    /* Breadcrumb - mobile adjustments for arrow style */
    .breadcrumb-item {
        padding: 6px 12px 6px 20px;
        font-size: 0.78rem;
    }

    .breadcrumb-item:first-child {
        padding-left: 12px;
    }

    .breadcrumb-item + .breadcrumb-item {
        padding-left: 20px;
    }

    .breadcrumb-item::after {
        right: -10px;
        border-top: 15px solid transparent;
        border-bottom: 15px solid transparent;
        border-left: 10px solid #f0f0f0;
    }

    .breadcrumb-item + .breadcrumb-item::before {
        border-top: 15px solid transparent;
        border-bottom: 15px solid transparent;
        border-left: 10px solid #fff;
    }

    .col-12.col-md-6 h1.h3 {
        font-size: 1.25rem;
    }
    
    .col-12.col-md-6 .badge.fs-6 {
        font-size: 0.75rem !important;
    }
    
    #mainImage {
        max-height: 280px;
    }
    
    .thumbnail-selector {
        height: 50px !important;
    }
    
    .col-12.col-md-6 .product-price {
        font-size: 1.75rem;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .col-6.col-md-3 .price-card {
        padding: 0.5rem;
    }
    
    .col-6.col-md-3 .price-card img {
        max-height: 80px !important;
    }
    
    .col-6.col-md-3 .price-card .card-title {
        font-size: 0.8rem;
    }
    
    .col-6.col-md-3 .price-card h6 {
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    #mainImage {
        max-height: 240px;
    }
    
    .thumbnail-selector {
        height: 45px !important;
    }
    
    .col-12.col-md-6 .product-price {
        font-size: 1.5rem;
    }
    
    .col-6.col-md-3 .price-card img {
        max-height: 70px !important;
    }
}

@media (max-width: 390px) {
    #mainImage {
        max-height: 220px;
    }
    
    .thumbnail-selector {
        height: 40px !important;
    }
    
    .col-12.col-md-6 .product-price {
        font-size: 1.4rem;
    }
    
    .col-6.col-md-3 .price-card .card-title {
        font-size: 0.75rem;
    }
    
    .col-6.col-md-3 .price-card h6 {
        font-size: 0.8rem;
    }
}

/* Contact Page - Mobile Optimization */
@media (max-width: 768px) {
    /* Hero image - 使用 .hero-banner 类控制 */
    
    /* Contact info card */
    .col-12.col-md-4 .card-header h3 {
        font-size: 1.1rem;
    }
    
    .col-12.col-md-4 .card-body {
        padding: 1rem;
    }
    
    .col-12.col-md-4 .list-unstyled li {
        margin-bottom: 1rem !important;
        font-size: 0.9rem;
    }
    
    /* WeChat QR Code */
    .col-12.col-md-4 .bg-white.rounded {
        max-width: 250px !important;
        padding: 1rem !important;
    }
    
    /* Map section */
    .col-12.col-md-8 .card-header h3 {
        font-size: 1.1rem;
    }
    
    .map-container {
        height: 250px !important;
    }
    
    /* Store selector */
    #storeLocationSelect {
        min-height: 44px;
        font-size: 0.9rem;
    }
    
    /* Store locations card */
    .card .card-header h3 {
        font-size: 1.1rem;
    }
    
    .card .card-body h4 {
        font-size: 1rem;
    }
    
    /* Contact form */
    #contactForm .form-label {
        font-size: 0.9rem;
    }
    
    #contactForm .form-control,
    #contactForm .form-select {
        min-height: 44px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    #contactForm textarea.form-control {
        min-height: 120px;
    }
    
    #contactForm .btn {
        min-height: 44px;
        padding: 0.5rem 1.5rem;
    }
    
    #contactForm .form-check-input {
        width: 1.2rem;
        height: 1.2rem;
        min-width: 1.2rem;
        min-height: 1.2rem;
    }
}

@media (max-width: 576px) {
    /* Hero image - 使用 .hero-banner 类控制 */
    
    .col-12.col-md-4 .card-header h3,
    .col-12.col-md-8 .card-header h3,
    .card .card-header h3 {
        font-size: 1rem;
    }
    
    .map-container {
        height: 200px !important;
    }
    
    .col-12.col-md-4 .bg-white.rounded {
        max-width: 200px !important;
        padding: 0.75rem !important;
    }
    
    .col-12.col-md-4 .bg-white.rounded p {
        font-size: 0.8rem;
    }
    
    #contactForm .row .col-12.col-md-6 {
        margin-bottom: 0.75rem;
    }
    
    #contactForm textarea.form-control {
        min-height: 100px;
    }
}

@media (max-width: 400px) {
    /* Hero image - 使用 .hero-banner 类控制 */
    
    .map-container {
        height: 180px !important;
    }
}

@media (max-width: 390px) {
    /* Hero image - 使用 .hero-banner 类控制 */
    
    .map-container {
        height: 170px !important;
    }
}

/* About Us Page - Mobile Optimization */
@media (max-width: 768px) {
    /* Hero image - 使用 .hero-banner 类控制 */
    
    /* Section cards */
    .container .card .card-header h3 {
        font-size: 1.1rem;
    }
    
    .container .card .card-body {
        padding: 1rem;
    }
    
    .container .card .card-body h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .container .card .card-body p {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    /* News section links */
    .container .card .list-unstyled li {
        margin-bottom: 0.75rem !important;
    }
    
    .container .card .list-unstyled li a {
        font-size: 0.9rem;
        display: inline-block;
        max-width: calc(100% - 30px);
        vertical-align: top;
    }
    
    .container .card .list-unstyled li i {
        vertical-align: top;
        margin-top: 0.2rem;
    }
}

@media (max-width: 576px) {
    /* Hero image - 使用 .hero-banner 类控制 */
    
    .container .card .card-header h3 {
        font-size: 1rem;
    }
    
    .container .card .card-body {
        padding: 0.875rem;
    }
    
    .container .card .card-body h4 {
        font-size: 0.95rem;
    }
    
    .container .card .card-body p {
        font-size: 0.85rem;
    }
    
    .container .card .list-unstyled li a {
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    /* Hero image - 使用 .hero-banner 类控制 */
}

@media (max-width: 390px) {
    /* Hero image - 使用 .hero-banner 类控制 */
}

/* ===== 产品列表筛选区域折叠样式 ===== */

/* 桌面端：筛选区域始终展开，隐藏箭头，标题不可点击 */
@media (min-width: 769px) {
    #categoryCollapse,
    #metalCollapse {
        display: block !important;
    }

    .filter-chevron {
        display: none !important;
    }

    .filter-header {
        cursor: default !important;
        pointer-events: none !important;
    }
}

/* 移动端：折叠箭头动画与交互 */
@media (max-width: 768px) {
    .filter-header {
        cursor: pointer;
        user-select: none;
    }

    .filter-chevron {
        transition: transform 0.3s ease;
    }

    .filter-header[aria-expanded="true"] .filter-chevron {
        transform: rotate(180deg);
    }

    .filter-section .card-header {
        padding: 0.75rem 1rem;
    }

    .filter-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}