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

:root {
    --primary-color: #e44d26; /* Warm Red */
    --secondary-color: #f7b32b; /* Warm Gold */
    --text-color: #333;
    --text-color-light: #f0f0f0;
    --bg-color-dark: #1a1a1a;
    --bg-color-light: #ffffff;
    --border-color: #ddd;
    --header-height: 80px;
    --footer-height: auto;
    --font-family-sans: 'Roboto', sans-serif; /* Assumes Roboto is loaded, e.g., via Google Fonts */
    --font-family-serif: 'Merriweather', serif; /* Assumes Merriweather is loaded */
}

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color-light);
    scroll-behavior: smooth;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.text-center { text-align: center; }
.text-right { text-align: right; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.btn-primary:hover {
    background-color: #c0392b; /* Darker red */
    color: var(--text-color-light);
    text-decoration: none;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--bg-color-dark);
}

.btn-secondary:hover {
    background-color: #e6a000; /* Darker gold */
    color: var(--bg-color-dark);
    text-decoration: none;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    text-decoration: none;
}

/* Header */
.main-header {
    background-color: var(--bg-color-dark);
    color: var(--text-color-light);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

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

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8em;
    font-weight: bold;
    color: var(--text-color-light);
    text-decoration: none;
}

.logo img {
    height: 40px; /* Example logo height */
    width: auto;
}

.main-navigation ul {
    display: flex;
    gap: 25px;
}

.main-navigation a {
    color: var(--text-color-light);
    font-weight: bold;
    padding: 5px 0;
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation a.active::after {
    width: 100%;
}

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

.nav-toggle {
    display: none; /* Hidden by default for desktop */
    font-size: 2em;
    background: none;
    border: none;
    color: var(--text-color-light);
    cursor: pointer;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background-color: transparent;
    border: none;
    color: var(--text-color-light);
    font-weight: bold;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.dropdown-toggle:hover {
    background-color: rgba(255,255,255,0.1);
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: var(--bg-color-dark);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.4);
    z-index: 1;
    right: 0;
    top: 100%;
    border-radius: 5px;
    overflow: hidden;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-menu a {
    color: var(--text-color-light);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-menu a:hover {
    background-color: var(--primary-color);
    text-decoration: none;
}

/* Marquee Section */
.marquee-section {
    background-color: var(--secondary-color);
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    color: var(--bg-color-dark);
}

.marquee-container {
    display: flex;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.marquee-icon {
    font-size: 1.5em;
    margin-right: 15px;
    flex-shrink: 0;
}

.marquee-wrapper {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    height: 1.5em; /* Adjust based on content height */
}

.marquee-content {
    display: inline-flex; /* Use inline-flex to allow content to be wider than parent */
    align-items: center;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    /* animation: marquee-scroll linear infinite; */ /* CSS animation disabled by default, JS handles it */
    /* animation-duration: 20s; */ /* Default duration, can be overridden by JS */
}

.marquee-content a {
    color: var(--bg-color-dark);
    text-decoration: none;
    font-weight: bold;
    padding: 0 20px; /* Space between repeated content */
}

.marquee-content a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Keyframe for default CSS marquee (JS will override if enabled) */
/* @keyframes marquee-scroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
} */

/* Footer */
.main-footer {
    background-color: var(--bg-color-dark);
    color: var(--text-color-light);
    padding: 40px 0 20px;
    font-size: 0.9em;
}

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

.footer-col h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.1em;
    text-transform: uppercase;
}

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

.footer-col ul a {
    color: var(--text-color-light);
    transition: color 0.3s ease;
}

.footer-col ul a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

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

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    color: var(--text-color-light);
    font-size: 1.2em;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    text-decoration: none;
}

.payment-methods img {
    height: 30px; /* Example payment icon height */
    margin-right: 10px;
    display: inline-block;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
}

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

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: var(--text-color-light);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-navigation ul {
        gap: 15px;
    }
    .header-content {
        flex-wrap: wrap;
        justify-content: center;
    }
    .logo, .nav-actions {
        flex-basis: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    .main-navigation {
        order: 3; /* Move navigation below logo/actions on smaller screens */
        width: 100%;
        margin-top: 10px;
    }
    .main-navigation ul {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 15px;
    }
    .nav-toggle {
        display: block; /* Show toggle button */
        order: 2; /* Position toggle button */
    }
    .logo {
        order: 1;
        text-align: left;
        flex-grow: 1;
    }
    .nav-actions {
        order: 3;
        flex-basis: auto;
        margin-bottom: 0;
    }
    .main-navigation {
        order: 4;
        width: 100%;
        margin-top: 0;
    }
    .main-navigation ul {
        flex-direction: column;
        width: 100%;
        background-color: var(--bg-color-dark);
        position: absolute;
        left: 0;
        top: var(--header-height); /* Below header */
        padding: 10px 0;
        border-top: 1px solid rgba(255,255,255,0.1);
        display: none; /* Hide by default */
    }
    .main-navigation ul.active {
        display: flex; /* Show when active */
    }
    .main-navigation ul li {
        text-align: center;
        padding: 10px 0;
    }
    .main-navigation a {
        padding: 10px 20px;
        display: block;
    }
    .main-navigation a::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .marquee-icon {
        font-size: 1.2em;
        margin-right: 10px;
    }
    .btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    .logo a {
        font-size: 1.5em;
    }
    .logo img {
        height: 35px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
