/* Basic Reset & Global Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f7f6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header Styles */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding-bottom: 10px; /* Added for visual separation */
}

.header-top-bar {
    background-color: #f8f9fa;
    padding: 8px 0;
    font-size: 0.9em;
    border-bottom: 1px solid #eee;
}

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

.welcome-message {
    margin-right: 20px;
    color: #555;
}

.top-bar-links a, .top-bar-links .separator, .language-selector {
    color: #555;
    margin-left: 15px;
}

.language-selector {
    border: 1px solid #ccc;
    padding: 3px 5px;
    border-radius: 4px;
    background-color: white;
}

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

.logo img {
    height: 40px;
    width: auto;
    vertical-align: middle;
}

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

.nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

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

.nav-link {
    display: block;
    padding: 10px 0;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #007bff;
    text-decoration: none;
}

.has-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #ffffff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    list-style: none;
    min-width: 160px;
    z-index: 1000;
    top: 100%;
    left: 0;
    padding: 10px 0;
    border-radius: 4px;
    border: 1px solid #eee;
}

.dropdown-menu li a {
    color: #333;
    padding: 8px 20px;
    display: block;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background-color: #f5f5f5;
    text-decoration: none;
}

.menu-toggle {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    right: 15px;
    top: 20px; /* Adjust as needed */
}

.menu-toggle .icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}


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

.search-box {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 20px;
    overflow: hidden;
    background-color: #f9f9f9;
}

.search-box input {
    border: none;
    padding: 8px 15px;
    outline: none;
    background: transparent;
    font-size: 0.9em;
}

.search-box button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.cart-icon, .user-icon {
    font-size: 1.2em;
    color: #333;
    position: relative;
    padding: 5px;
}

.cart-count {
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7em;
    position: absolute;
    top: -5px;
    right: -5px;
}

.header-bottom-promo {
    background-color: #e9ecef;
    padding: 10px 0;
    text-align: center;
    font-size: 0.95em;
    color: #333;
}

.promo-link {
    color: #007bff;
    font-weight: bold;
}


/* Footer Styles */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0 20px;
    margin-top: auto; /* Pushes footer to the bottom */
}

.site-footer a {
    color: #bbdefb;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
    color: #ffffff;
}

.footer-widgets {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-widget {
    flex: 1;
    min-width: 280px;
    margin-bottom: 20px;
    padding-right: 20px;
}

.footer-widget:last-child {
    padding-right: 0;
}

.widget-title {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #ffffff;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.footer-widget p {
    font-size: 0.9em;
    line-height: 1.8;
    margin-bottom: 10px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 8px;
}

.footer-widget ul li a {
    display: block;
    padding: 2px 0;
}

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #34495e;
    color: #ecf0f1;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.social-icon:hover {
    background-color: #3498db;
    transform: translateY(-3px);
}

.newsletter-signup {
    margin-top: 25px;
    background-color: #34495e;
    padding: 20px;
    border-radius: 8px;
}

.newsletter-title {
    font-size: 1.1em;
    color: #ffffff;
    margin-bottom: 10px;
}

.newsletter-signup p {
    font-size: 0.85em;
    margin-bottom: 15px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #555;
    border-radius: 5px;
    background-color: #ecf0f1;
    color: #333;
}

.newsletter-form button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.newsletter-form button:hover {
    background-color: #2980b9;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85em;
}

.copyright {
    margin-bottom: 10px;
}

.disclaimer {
    font-size: 0.75em;
    color: #bdc3c7;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-navigation {
        flex-basis: 100%;
        order: 3;
        margin-top: 15px;
    }

    .nav-links {
        display: none; /* Hide by default for mobile */
        flex-direction: column;
        width: 100%;
        text-align: left;
        background-color: #ffffff;
        border-top: 1px solid #eee;
        box-shadow: 0 4px 8px rgba(0,0,0,0.05);
        position: absolute;
        left: 0;
        right: 0;
        z-index: 999;
        padding-bottom: 10px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-item {
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
    }

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

    .nav-link {
        padding: 12px 20px;
    }

    .has-dropdown .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0 0 0 20px;
        background-color: #f8f8f8;
    }

    .dropdown-menu li a {
        padding: 8px 15px;
    }

    .menu-toggle {
        display: block; /* Show on mobile */
        position: static;
        order: 2;
        margin-left: auto;
    }

    .header-main .container {
        flex-wrap: nowrap;
    }

    .header-actions {
        order: 2;
        margin-left: auto;
    }

    .search-box {
        display: none; /* Hide search box on smaller screens, can be toggled via JS */
    }

    .footer-widgets {
        flex-direction: column;
    }

    .footer-widget {
        min-width: unset;
        padding-right: 0;
        margin-bottom: 30px;
    }

    .footer-widget:last-child {
        margin-bottom: 0;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .header-top-bar .container {
        flex-direction: column;
        align-items: flex-start;
    }
    .welcome-message {
        margin-bottom: 10px;
        margin-right: 0;
    }
    .top-bar-links {
        width: 100%;
        display: flex;
        justify-content: space-around;
        margin-left: 0;
    }
    .top-bar-links a, .top-bar-links .separator, .language-selector {
        margin-left: 0;
    }
    .header-main .container {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }
    .logo {
        flex-basis: auto;
    }
    .header-actions {
        flex-basis: auto;
        margin-left: auto;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
