/* General Body Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.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: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top-bar {
    background-color: #333;
    color: #eee;
    padding: 8px 0;
    font-size: 0.9em;
}

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

.top-bar-links a {
    color: #eee;
    margin-left: 15px;
    text-decoration: none;
}

.top-bar-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.header-main-area {
    padding: 15px 0;
}

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

.site-branding .site-logo {
    height: 40px;
    vertical-align: middle;
    margin-right: 10px;
}

.site-branding .site-title {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    vertical-align: middle;
}

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

.main-nav ul li {
    position: relative;
}

.main-nav ul li a {
    display: block;
    padding: 10px 15px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
}

.main-nav ul li a:hover,
.main-nav ul li.current-menu-item > a {
    color: #007bff;
}

.main-nav ul .sub-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    list-style: none;
    padding: 0;
    min-width: 180px;
    z-index: 999;
    top: 100%;
    left: 0;
}

.main-nav ul li:hover > .sub-menu {
    display: block;
}

.main-nav ul .sub-menu li a {
    padding: 10px 20px;
    white-space: nowrap;
}

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

.search-box {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 15px;
}

.search-input {
    border: none;
    padding: 8px 10px;
    outline: none;
    width: 150px;
}

.search-button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
}

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

.cart-icon {
    position: relative;
    color: #555;
    font-size: 1.2em;
    margin-right: 15px;
}

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

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

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

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

.footer-widgets-area {
    padding-bottom: 30px;
}

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

.footer-col .widget-title {
    color: #fff;
    font-size: 1.2em;
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

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

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

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

.footer-col ul li a {
    color: #ccc;
    text-decoration: none;
}

.footer-col ul li a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-col .contact-info p i {
    margin-right: 8px;
    color: #007bff;
}

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

.newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #444;
    background-color: #333;
    color: #eee;
    border-radius: 3px 0 0 3px;
    outline: none;
}

.newsletter-form .subscribe-button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 0 3px 3px 0;
}

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

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

.social-links a {
    color: #fff;
    font-size: 1.5em;
    margin-right: 15px;
    transition: color 0.3s ease;
}

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

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

.copyright-info p {
    margin: 0;
    color: #aaa;
}

.copyright-info a {
    color: #aaa;
}

.copyright-info a:hover {
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .main-nav {
        display: none; /* Hide main nav on smaller screens */
        width: 100%;
        order: 3; /* Push to new line */
    }
    .main-nav.active {
        display: block;
    }
    .main-nav ul {
        flex-direction: column;
        text-align: center;
    }
    .main-nav ul li a {
        padding: 12px 15px;
        border-bottom: 1px solid #eee;
    }
    .main-nav ul .sub-menu {
        position: static;
        box-shadow: none;
        background-color: #f9f9f9;
        width: 100%;
    }
    .main-nav ul li:hover > .sub-menu {
        display: none; /* Controlled by JS for mobile */
    }
    .menu-toggle {
        display: block; /* Show hamburger icon */
    }
    .header-flex-wrapper {
        flex-wrap: wrap;
        justify-content: center;
    }
    .site-branding, .header-actions {
        margin-bottom: 15px;
    }
    .site-branding {
        flex-basis: 100%;
        text-align: center;
    }
    .header-actions {
        flex-basis: 100%;
        justify-content: center;
    }
    .search-box {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-col .widget-title {
        text-align: center;
    }
    .newsletter-form {
        justify-content: center;
    }
    .social-links {
        text-align: center;
    }
    .top-bar-content {
        flex-direction: column;
    }
    .top-bar-links {
        margin-top: 10px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
