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

body {
    font-family: 'Arial', sans-serif;
    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;
}

ul {
    list-style: none;
}

/* Header Styles */
.main-header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

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

.top-bar-left span, .top-bar-right a, .language-selector select {
    margin-right: 20px;
    color: #666;
}

.top-bar-left span i {
    margin-right: 5px;
}

.language-selector select {
    border: none;
    background: transparent;
    cursor: pointer;
    outline: none;
}

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

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

.logo img {
    vertical-align: middle;
}

.main-navigation ul {
    display: flex;
}

.main-navigation ul li {
    position: relative;
    margin-left: 30px;
}

.main-navigation ul li a {
    display: block;
    padding: 10px 0;
    color: #333;
    font-weight: bold;
}

.main-navigation ul li a:hover {
    color: #007bff;
    text-decoration: none;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 200px;
    padding: 10px 0;
    border-top: 3px solid #007bff;
}

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

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu li a {
    padding: 10px 20px;
    white-space: nowrap;
}

.header-actions button, .header-actions a {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    margin-left: 20px;
    color: #333;
}

.header-actions button:hover, .header-actions a:hover {
    color: #007bff;
}

.cart-btn {
    position: relative;
}

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

.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 1001;
    overflow-y: auto;
}

.mobile-navigation {
    background-color: #fff;
    width: 280px;
    height: 100%;
    position: absolute;
    right: -280px; /* Initially off-screen */
    transition: right 0.3s ease-in-out;
    padding-top: 60px;
}

.mobile-menu-overlay.active .mobile-navigation {
    right: 0;
}

.mobile-navigation ul li a {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    color: #333;
    font-weight: bold;
}

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

.main-footer a {
    color: #fff;
}

.main-footer a:hover {
    color: #007bff;
    text-decoration: none;
}

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

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

.footer-widget h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.2em;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    display: inline-block;
}

.footer-widget p {
    margin-bottom: 15px;
}

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

.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    background-color: #333;
    color: #fff;
    border-radius: 50%;
    margin-right: 10px;
    transition: background-color 0.3s ease;
}

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

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

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

.footer-widget.newsletter input[type="email"] {
    flex-grow: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    outline: none;
}

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

.footer-widget.newsletter button:hover {
    background-color: #0056b3;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-bottom p {
    margin: 0;
}

.footer-nav-bottom ul {
    display: flex;
}

.footer-nav-bottom ul li {
    margin-left: 20px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .main-navigation {
        display: none;
    }
    .header-actions {
        display: flex;
        align-items: center;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .header-main-nav .container {
        justify-content: space-between;
    }
    .footer-widgets {
        flex-direction: column;
    }
    .footer-widget {
        min-width: unset;
        width: 100%;
        padding-right: 0;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-nav-bottom ul {
        margin-top: 15px;
        justify-content: center;
        flex-wrap: wrap;
    }
    .footer-nav-bottom ul li {
        margin: 0 10px;
    }
}

@media (max-width: 768px) {
    .header-top-bar .container {
        flex-direction: column;
        text-align: center;
    }
    .top-bar-left, .top-bar-right {
        margin-bottom: 10px;
    }
    .top-bar-left span, .top-bar-right a, .language-selector select {
        margin: 0 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;
  }
}
