/* Shared Base Styles */
body {
    margin: 0;
    font-family: 'Open Sans', Arial, sans-serif;
    line-height: 1.6;
    color: #343a40;
    background-color: #f8f9fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}
a:hover {
    color: #0056b3;
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: #212529;
    margin-top: 0;
    margin-bottom: 0.5em;
}

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

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mt-3 { margin-top: 1rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }

/* Buttons */
button, .btn {
    display: inline-block;
    font-weight: 400;
    color: #212529;
    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;
    cursor: pointer;
}
.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}
.btn-primary:hover {
    color: #fff;
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Forms */
input[type="text"], input[type="email"], input[type="password"], input[type="search"], textarea {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    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;
    box-sizing: border-box;
}
input:focus, textarea:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Font Awesome Integration (assumed to be loaded via CDN or other means) */
.fa, .fab, .fas {
    /* Font Awesome styles are typically loaded via an external stylesheet. */
    /* These are placeholder styles to ensure basic display if FA is missing. */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900; /* For solid icons */
    margin-right: 5px;
}
.fab { font-weight: 400; /* For brand icons */ }

/* Responsive adjustments for general elements */
@media (max-width: 992px) {
    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    .main-navigation ul li a {
        padding: 10px 12px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    h1 { font-size: 2em; }
    h2 { font-size: 1.5em; }
    .header-topbar .container, .footer-bottom .container {
        flex-direction: column;
        text-align: center;
    }
    .topbar-left, .topbar-right {
        margin-bottom: 10px;
    }
    .topbar-right a {
        margin: 0 8px;
    }
    .footer-bottom .legal-links {
        margin-top: 10px;
    }
    .footer-bottom .legal-links a {
        margin: 0 8px;
    }
}

@media (max-width: 576px) {
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 10px;
    }
    .search-box {
        width: 100%;
        margin-bottom: 10px;
    }
    .search-box input {
        width: calc(100% - 20px);
    }
    .cart-icon {
        margin-right: 0;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
