/* Global Styles */
body {
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #222;
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Header Styles */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1020;
}

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

.logo img {
    height: 45px;
    vertical-align: middle;
}

.main-navigation {
    flex-grow: 1;
    text-align: center;
}

.main-navigation .nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.nav-item {
    position: relative;
    margin: 0 15px;
}

.nav-link {
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    padding: 10px 0;
    display: block;
    white-space: nowrap;
}

.nav-item:hover > .nav-link, .nav-item.active > .nav-link {
    color: #007bff;
}

.submenu, .grandchild-menu {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    min-width: 220px;
    z-index: 1010;
    display: none;
    top: 100%;
    left: 0;
    border-radius: 5px;
    animation: fadeIn 0.2s ease-out;
}

.grandchild-menu {
    left: 100%;
    top: 0;
}

.nav-item.has-submenu:hover > .submenu,
.has-grandchild:hover > .grandchild-menu {
    display: block;
}

.submenu li a, .grandchild-menu li a {
    padding: 10px 20px;
    display: block;
    color: #343a40;
    text-decoration: none;
    white-space: nowrap;
}

.submenu li a:hover, .grandchild-menu li a:hover {
    background-color: #e9ecef;
    color: #007bff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-form {
    display: flex;
}

.search-input {
    border: 1px solid #ced4da;
    padding: 8px 12px;
    border-radius: 5px 0 0 5px;
    outline: none;
    font-size: 0.9rem;
}

.search-button {
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
    padding: 8px 12px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.search-button:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #343a40;
    line-height: 1;
    padding: 0;
}

.mobile-menu-container {
    display: none;
    background-color: #fff;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    padding: 15px 0;
    z-index: 1000;
}

.mobile-menu-container.active {
    display: block;
}

.mobile-nav {
    display: block;
    text-align: left;
}

.mobile-nav .nav-list {
    flex-direction: column;
    align-items: flex-start;
}

.mobile-nav .nav-item {
    width: 100%;
    margin: 0;
    border-bottom: 1px solid #eee;
}

.mobile-nav .nav-item:last-child {
    border-bottom: none;
}

.mobile-nav .nav-link {
    padding: 12px 20px;
    width: calc(100% - 40px);
}

.mobile-nav .submenu, .mobile-nav .grandchild-menu {
    position: static;
    box-shadow: none;
    min-width: unset;
    width: 100%;
    padding: 0 0 0 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    border-radius: 0;
    display: none; /* Controlled by JS */
}

.mobile-nav .nav-item.open > .submenu, .mobile-nav .has-grandchild.open > .grandchild-menu {
    display: block;
}

.mobile-nav .submenu li a, .mobile-nav .grandchild-menu li a {
    padding: 10px 30px;
}

/* Footer Styles */
.site-footer {
    background-color: #212529;
    color: #adb5bd;
    padding: 50px 0;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-heading {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: #007bff;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: #007bff;
    text-decoration: underline;
}

.social-media {
    margin-top: 20px;
}

.social-media a {
    display: inline-block;
    margin-right: 15px;
    font-size: 22px;
    color: #adb5bd;
    transition: transform 0.3s ease;
}

.social-media a:hover {
    color: #007bff;
    transform: translateY(-3px);
}

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #495057;
    border-radius: 5px 0 0 5px;
    background-color: #343a40;
    color: #fff;
    outline: none;
    font-size: 0.9rem;
}

.newsletter-form input[type="email"]::placeholder {
    color: #adb5bd;
}

.newsletter-form button {
    padding: 10px 18px;
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.newsletter-form button:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.newsletter-disclaimer {
    font-size: 0.8rem;
    margin-top: 10px;
    color: #999;
}

.payment-methods {
    margin-top: 20px;
}

.payment-methods .small-heading {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 10px;
}

.payment-methods img {
    margin-right: 8px;
    height: 25px; /* Adjust as needed */
    filter: grayscale(100%);
    opacity: 0.8;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.payment-methods img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #343a40;
    padding-top: 25px;
    margin-top: 30px;
}

/* Keyframe Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-navigation {
        display: none; /* Hide main nav on tablet/mobile */
    }
    .menu-toggle {
        display: block;
    }
    .header-main {
        justify-content: space-between;
        gap: 15px;
    }
    .header-actions {
        flex-grow: 1;
        justify-content: flex-end;
    }
    .search-form {
        flex-grow: 1;
        max-width: 300px;
    }
    .site-header .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .header-main {
        flex-wrap: wrap;
        justify-content: center;
    }
    .logo {
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
    }
    .header-actions {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    .search-form {
        max-width: none;
        width: 100%;
    }
    .search-input, .search-button {
        font-size: 1rem;
        padding: 10px 15px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-col ul {
        display: inline-block;
        text-align: left;
    }
    .social-media {
        margin-top: 15px;
    }
    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }
    .newsletter-form input[type="email"] {
        border-radius: 5px;
        margin-bottom: 10px;
        width: calc(100% - 30px);
        max-width: 300px;
    }
    .newsletter-form button {
        border-radius: 5px;
        width: calc(100% - 30px);
        max-width: 300px;
    }
}

/* Icon Placeholders (replace with actual font icons or SVGs for production) */
.icon-search::before { content: "\1F50D"; /* Magnifying Glass */ }
.icon-menu::before { content: "\2630"; /* Hamburger Menu */ }
.icon-facebook::before { content: "\1F4D8"; /* Blue Book */ }
.icon-twitter::before { content: "\1F426"; /* Bird */ }
.icon-linkedin::before { content: "\1F4BC"; /* Briefcase */ }
.icon-instagram::before { content: "\1F4F8"; /* Camera */ }
.icon-youtube::before { content: "\1F3A5"; /* Movie Camera */ }
.icon-github::before { content: "\1F438"; /* Frog Face */ }
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
