/* General Body and Typography */
body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

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

/* Header Styles */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top-bar {
    background-color: #f2f2f2;
    padding: 8px 0;
    font-size: 0.85em;
    color: #666;
}

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

.welcome-message {
    margin: 0;
}

.utility-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.utility-nav li {
    margin-left: 20px;
}

.utility-nav a {
    text-decoration: none;
    color: #666;
    transition: color 0.3s ease;
}

.utility-nav a:hover {
    color: #007bff;
}

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

.navbar-brand {
    display: flex;
    align-items: center;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    color: #333;
    font-size: 1.8em;
    font-weight: bold;
}

.logo {
    height: 40px;
    margin-right: 10px;
}

.site-name {
    color: #007bff;
}

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

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

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

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

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

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #ffffff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    min-width: 160px;
    z-index: 1;
    border-top: 2px solid #007bff;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 0;
    border-radius: 4px;
}

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

.dropdown-menu a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: #f1f1f1;
    color: #007bff;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
    color: #333;
}

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

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

.search-box {
    position: relative;
    margin-right: 20px;
}

.search-input {
    border: 1px solid #ccc;
    padding: 8px 12px;
    border-radius: 20px;
    outline: none;
    width: 200px;
    transition: width 0.3s ease;
}

.search-input:focus {
    width: 250px;
    border-color: #007bff;
}

.search-button {
    background: none;
    border: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
}

.user-area {
    display: flex;
    align-items: center;
}

.btn {
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    margin-left: 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-login {
    background-color: #e9ecef;
    color: #333;
}

.btn-login:hover {
    background-color: #dee2e6;
}

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

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

.cart-icon {
    position: relative;
    margin-left: 20px;
    color: #333;
    font-size: 1.4em;
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545;
    color: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7em;
    min-width: 18px;
    text-align: center;
}

/* Footer Styles */
.site-footer {
    background-color: #343a40;
    color: #f8f9fa;
    padding: 40px 0 20px;
    font-size: 0.9em;
}

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

.footer-heading {
    color: #ffffff;
    font-size: 1.2em;
    margin-bottom: 20px;
    position: relative;
}

.footer-heading::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: #007bff;
    margin-top: 8px;
}

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

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

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

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

.footer-col p {
    margin-bottom: 10px;
    color: #b0b0b0;
}

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

.social-links li {
    margin-right: 15px;
}

.social-links a {
    font-size: 1.5em;
    color: #cccccc;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #007bff;
}

.footer-col .fas, .footer-col .fab {
    margin-right: 8px;
    color: #007bff;
}

.newsletter-signup {
    margin-top: 25px;
}

.footer-subheading {
    color: #ffffff;
    font-size: 1em;
    margin-bottom: 15px;
}

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

.newsletter-signup input[type="email"] {
    border: 1px solid #555;
    padding: 10px 15px;
    border-radius: 5px 0 0 5px;
    background-color: #444;
    color: #fff;
    flex-grow: 1;
    outline: none;
}

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

.btn-subscribe {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

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

.payment-icon {
    height: 25px;
    margin-right: 10px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.payment-icon:hover {
    opacity: 1;
}

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

.copyright {
    margin-bottom: 5px;
    color: #b0b0b0;
}

.company-address {
    color: #999;
    font-size: 0.85em;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .nav-menu {
        display: none; /* Hide main nav by default on smaller screens */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #ffffff;
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        border-top: 1px solid #e0e0e0;
        z-index: 999;
    }

    .nav-menu.active {
        display: flex; /* Show when active */
    }

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

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

    .nav-link {
        padding: 15px 20px;
        text-align: left;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border-top: none;
        width: 100%;
        padding-left: 20px;
        background-color: #f8f8f8;
        transform: translateX(0);
    }

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

    .menu-toggle {
        display: block; /* Show hamburger menu */
    }

    .header-main {
        flex-wrap: wrap;
        justify-content: center;
    }

    .navbar-brand, .header-actions {
        flex-basis: 100%;
        justify-content: center;
        margin-bottom: 15px;
    }

    .header-actions {
        margin-top: 10px;
    }

    .search-box {
        margin-right: 10px;
    }

    .user-area {
        margin-left: 10px;
    }

    .top-bar-content {
        flex-direction: column;
        text-align: center;
    }

    .utility-nav {
        margin-top: 10px;
    }

    .utility-nav li {
        margin: 0 10px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col ul {
        display: inline-block; /* For better centering of list items */
        text-align: left;
    }

    .footer-heading::after {
        margin: 8px auto 0; /* Center the underline */
    }

    .social-links {
        justify-content: center;
    }

    .newsletter-signup form {
        flex-direction: column;
        align-items: center;
    }

    .newsletter-signup input[type="email"] {
        width: 80%;
        border-radius: 5px;
        margin-bottom: 10px;
        text-align: center;
    }

    .btn-subscribe {
        width: 80%;
        border-radius: 5px;
    }
}

@media (max-width: 768px) {
    .site-name {
        display: none; /* Hide site name on very small screens */
    }
    .search-input {
        width: 150px;
    }
    .search-input:focus {
        width: 180px;
    }
    .btn {
        padding: 6px 12px;
        font-size: 0.9em;
    }
    .cart-icon {
        font-size: 1.2em;
    }
    .footer-grid {
        padding: 0 20px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
