/* General Resets & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.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;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

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

.btn-primary:hover {
  background-color: #0056b3;
  text-decoration: none;
}

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

.btn-secondary:hover {
  background-color: #5a6268;
  text-decoration: none;
}

/* Header Styles */
.site-header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-topbar {
  background-color: #2c3e50;
  color: #ecf0f1;
  font-size: 0.85em;
  padding: 8px 0;
}

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

.topbar-content .contact-info span {
  margin-right: 20px;
}

.topbar-content .contact-info i {
  margin-right: 5px;
  color: #3498db;
}

.topbar-content .social-links a {
  color: #ecf0f1;
  margin-left: 15px;
  transition: color 0.3s ease;
}

.topbar-content .social-links a:hover {
  color: #3498db;
  text-decoration: none;
}

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

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

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

.navbar-brand .logo-text {
  font-size: 1.8em;
  font-weight: 700;
  color: #333;
}

.main-navigation ul {
  display: flex;
}

.main-navigation .menu-item {
  position: relative;
  margin-left: 30px;
}

.main-navigation .menu-item a {
  display: block;
  padding: 10px 0;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

.main-navigation .menu-item a:hover,
.main-navigation .menu-item.current-menu-item > a {
  color: #007bff;
  text-decoration: none;
}

.main-navigation .menu-item-has-children > a i {
  margin-left: 5px;
  font-size: 0.7em;
  vertical-align: middle;
}

.main-navigation .sub-menu {
  display: none;
  position: absolute;
  background-color: #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  z-index: 100;
  padding: 10px 0;
  border-radius: 5px;
}

.main-navigation .sub-menu .menu-item {
  margin: 0;
}

.main-navigation .sub-menu .menu-item a {
  padding: 10px 20px;
  white-space: nowrap;
  color: #555;
}

.main-navigation .sub-menu .menu-item a:hover {
  background-color: #f0f0f0;
  color: #007bff;
}

.main-navigation .menu-item-has-children:hover > .sub-menu {
  display: block;
}

.main-navigation .nested-sub-menu {
  left: 100%;
  top: 0;
  margin-top: -10px; /* Adjust for alignment */
}

.main-navigation .menu-item-has-children .nested-sub-menu .menu-item-has-children > a i {
  float: right;
  margin-right: 0;
  margin-top: 5px;
}

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

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

.search-box input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  outline: none;
  width: 180px;
  transition: width 0.3s ease;
}

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

.search-box button {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  background: transparent;
  border: none;
  color: #555;
  padding: 0 10px;
  cursor: pointer;
}

.search-box button:hover {
  color: #007bff;
}

.menu-toggle {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001;
}

.hamburger {
  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: #2c3e50;
  color: #ecf0f1;
  padding: 50px 0 20px;
  font-size: 0.95em;
}

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

.footer-widget {
  width: calc(25% - 20px);
  margin-bottom: 30px;
}

.footer-widget:nth-child(even) {
  padding-left: 20px;
}

.footer-widget:nth-child(odd) {
  padding-right: 20px;
}

.footer-widget .widget-title {
  color: #3498db;
  font-size: 1.3em;
  margin-bottom: 20px;
  position: relative;
}

.footer-widget .widget-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background-color: #3498db;
  margin-top: 10px;
}

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

.footer-widget .contact-details i {
  margin-right: 10px;
  color: #3498db;
  width: 15px; /* Align icons */
}

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

.footer-widget ul li a {
  color: #ecf0f1;
  transition: color 0.3s ease;
}

.footer-widget ul li a:hover {
  color: #3498db;
  text-decoration: none;
}

.newsletter-form input[type="email"] {
  width: calc(100% - 100px);
  padding: 10px;
  border: none;
  border-radius: 5px 0 0 5px;
  outline: none;
  background-color: #34495e;
  color: #ecf0f1;
}

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

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

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

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

.social-media-footer a:hover {
  color: #3498db;
  text-decoration: none;
}

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

.footer-bottom p {
  margin: 0;
}

.payment-methods img {
  height: 25px;
  margin-left: 10px;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease;
}

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

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

  .main-navigation .menu-list {
    display: none;
    flex-direction: column;
    background-color: #fff;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%; /* Position below header */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    z-index: 999;
  }

  .main-navigation.active .menu-list {
    display: flex;
  }

  .main-navigation .menu-item {
    margin: 0;
    border-bottom: 1px solid #eee;
  }

  .main-navigation .menu-item:last-child {
    border-bottom: none;
  }

  .main-navigation .menu-item a {
    padding: 12px 20px;
  }

  .main-navigation .sub-menu {
    position: static;
    box-shadow: none;
    background-color: #f8f8f8;
    padding-left: 20px;
    border-top: 1px solid #eee;
  }

  .main-navigation .sub-menu .menu-item a {
    padding: 8px 20px;
  }

  .main-navigation .nested-sub-menu {
    left: auto;
    top: auto;
    margin-top: 0;
    padding-left: 15px;
    border-top: 1px solid #eee;
  }

  .menu-toggle {
    display: block;
  }

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

  .navbar-brand {
    flex-grow: 1;
  }

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

  .header-topbar .topbar-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-topbar .contact-info span {
    margin-bottom: 5px;
  }

  .footer-widget {
    width: calc(50% - 20px);
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .footer-widget:nth-child(2n) {
    margin-left: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

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

@media (max-width: 768px) {
  .header-topbar {
    display: none;
  }

  .search-box {
    display: none;
  }

  .btn-login {
    margin-left: 15px;
  }

  .footer-widget {
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .footer-widget:nth-child(even) {
    padding-left: 0 !important;
  }

  .footer-widget:nth-child(odd) {
    padding-right: 0 !important;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
