/* Basic Reset & Global Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #212529;
    --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

body {
    font-family: var(--font-family-sans-serif);
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after {
    box-sizing: border-box;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}
a:hover {
    color: #0056b3;
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.2;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }

/* Utility Classes */
.text-center { text-align: center; }
.text-start { text-align: left; }
.text-end { text-align: right; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.ms-auto { margin-left: auto !important; }
.me-2 { margin-right: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-3 { margin-top: 1rem !important; }
.pt-5 { padding-top: 3rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }
.bg-dark { background-color: var(--dark-color) !important; }
.text-white { color: #fff !important; }
.text-white-50 { color: rgba(255, 255, 255, 0.5) !important; }
.text-decoration-none { text-decoration: none !important; }
.list-unstyled { padding-left: 0; list-style: none; }

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 400;
    color: var(--text-color);
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover {
    color: #fff;
    background-color: #0056b3;
    border-color: #0056b3;
}
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-success {
    color: #fff;
    background-color: var(--success-color);
    border-color: var(--success-color);
}
.btn-success:hover {
    color: #fff;
    background-color: #218838;
    border-color: #218838;
}
.btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    border-radius: 0.3rem;
}

/* Forms */
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}
.input-group > .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

/* Header Specific Styles */
.main-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
}
.header-top-bar {
    background-color: var(--dark-color);
    color: #fff;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}
.header-top-bar .top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-top-bar .contact-info span {
    margin-right: 15px;
}
.header-top-bar .social-links a {
    color: #fff;
    margin-left: 10px;
}
.navbar {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.navbar-brand .logo-img {
    height: 40px; /* Adjust as needed */
    margin-right: 10px;
    vertical-align: middle;
}
.navbar-brand .brand-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-color);
}
.navbar-nav .nav-item .nav-link {
    padding: 0.5rem 1rem;
    font-weight: 500;
    color: var(--text-color);
}
.navbar-nav .nav-item .nav-link.active,
.navbar-nav .nav-item .nav-link:hover {
    color: var(--primary-color);
}
.navbar-nav .nav-item.user-actions .btn {
    margin-left: 10px;
}
.dropdown-menu {
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
}
.dropdown-item:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}
.search-form {
    margin-left: 20px;
}
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/assets/images/hero-bg.jpg') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 100px 0;
    margin-bottom: 2rem;
}
.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}
.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* Footer Specific Styles */
.main-footer {
    background-color: var(--dark-color);
    color: #fff;
    font-size: 0.9rem;
}
.main-footer .footer-heading {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}
.main-footer .list-unstyled li {
    margin-bottom: 0.5rem;
}
.main-footer .list-unstyled a {
    color: rgba(255, 255, 255, 0.7);
}
.main-footer .list-unstyled a:hover {
    color: #fff;
    text-decoration: underline;
}
.main-footer .social-icons a {
    font-size: 1.2rem;
    margin-right: 10px;
}
.main-footer .social-icons a:hover {
    color: var(--primary-color) !important;
}
.main-footer .newsletter-form .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.main-footer .newsletter-form .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.main-footer hr {
    border-color: rgba(255, 255, 255, 0.1);
}
.main-footer .payment-icons {
    max-height: 30px;
    margin-left: 10px;
}
.back-to-top {
    border-radius: 50px;
    padding: 0.5rem 1rem;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #fff;
        position: absolute;
        width: 100%;
        left: 0;
        top: 100%;
        z-index: 1000;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,.08);
    }
    .navbar-nav {
        flex-direction: column;
    }
    .navbar-nav .nav-item.user-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 1rem;
    }
    .navbar-nav .nav-item.user-actions .btn {
        margin-left: 0;
    }
    .search-form {
        margin-left: 0;
        margin-top: 1rem;
    }
    .hero-section {
        padding: 60px 0;
    }
    .hero-section h1 {
        font-size: 2.5rem;
    }
    .hero-section p {
        font-size: 1rem;
    }
    .header-top-bar .top-bar-content {
        flex-direction: column;
        text-align: center;
    }
    .header-top-bar .contact-info {
        margin-bottom: 10px;
    }
}

@media (max-width: 767.98px) {
    .main-footer .col-md-3 {
        text-align: center;
    }
    .main-footer .social-icons {
        justify-content: center;
        display: flex;
    }
    .main-footer .newsletter-form {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    .main-footer .row.align-items-center {
        flex-direction: column;
    }
    .main-footer .col-md-6.text-center.text-md-start,
    .main-footer .col-md-6.text-center.text-md-end {
        text-align: center !important;
    }
    .main-footer .payment-icons {
        margin-top: 1rem;
        margin-bottom: 1rem;
        margin-left: 0;
    }
    .back-to-top {
        margin-top: 1rem;
        margin-left: 0 !important;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@media (max-width: 768px) {
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
