/* ============================================
   HZXTrading Co. LTD - Corporate Website
   Style Sheet
   ============================================ */

/* CSS Variables */
:root {
    --primary: #C41E3A;
    --primary-dark: #9E1831;
    --primary-light: #E85D72;
    --dark: #1A1A1A;
    --dark-gray: #333333;
    --medium-gray: #666666;
    --light-gray: #F5F5F5;
    --white: #FFFFFF;
    --border: #E0E0E0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --container: 1200px;
    --radius: 8px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Common */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dark);
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--medium-gray);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 32px;
    width: auto;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark);
}

.nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark-gray);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--dark);
    transition: var(--transition);
}

/* Hero */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--white);
    text-align: center;
    background-color: var(--dark);
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: heroFade 12s infinite;
}

.hero-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55));
}

.hero-slide:nth-child(1) {
    animation-delay: 0s;
}

.hero-slide:nth-child(2) {
    animation-delay: 6s;
}

@keyframes heroFade {
    0% { opacity: 0; }
    8% { opacity: 1; }
    42% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 0; }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.95;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator svg {
    width: 32px;
    height: 32px;
    opacity: 0.7;
}

/* Features Section */
.features {
    background-color: var(--light-gray);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    background-color: rgba(196, 30, 58, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 30px;
    height: 30px;
    color: var(--primary);
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.feature-text {
    font-size: 0.95rem;
    color: var(--medium-gray);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-text h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 20px;
    line-height: 1.3;
}

.about-text p {
    margin-bottom: 16px;
    color: var(--medium-gray);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--medium-gray);
    margin-top: 4px;
}

/* Products Section */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    background-color: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    width: 100%;
    height: 260px;
    overflow: hidden;
    background-color: var(--light-gray);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 24px;
}

.product-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.product-desc {
    font-size: 0.95rem;
    color: var(--medium-gray);
    margin-bottom: 16px;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-tag {
    font-size: 0.8rem;
    padding: 4px 12px;
    background-color: var(--light-gray);
    color: var(--medium-gray);
    border-radius: 20px;
}

.product-code {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--primary);
    background-color: rgba(196, 30, 58, 0.08);
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-family: "SF Mono", "Consolas", "Monaco", monospace;
}

/* Product color options */
.product-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.color-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.color-dot:hover {
    transform: scale(1.18);
}

.color-dot.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(196, 30, 58, 0.3);
    transform: scale(1.1);
}

.color-label {
    font-size: 0.82rem;
    color: var(--medium-gray);
    margin-bottom: 12px;
}

.color-label span {
    font-weight: 600;
    color: var(--dark-gray);
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
    padding: 100px 0;
}

.cta-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.cta-text {
    font-size: 1.1rem;
    margin-bottom: 32px;
    opacity: 0.95;
}

.cta .btn {
    background-color: var(--white);
    color: var(--primary);
}

.cta .btn:hover {
    background-color: var(--light-gray);
    color: var(--primary-dark);
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    background-color: rgba(196, 30, 58, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.contact-detail h3 {
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 6px;
}

.contact-detail p {
    font-size: 0.95rem;
    color: var(--medium-gray);
    line-height: 1.6;
}

.contact-detail a {
    color: var(--primary);
}

.contact-detail a:hover {
    text-decoration: underline;
}

.contact-form {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

/* Map placeholder */
.map-container {
    width: 100%;
    height: 400px;
    background-color: var(--light-gray);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 60px;
}

.map-container iframe,
.map-container img {
    width: 100%;
    height: 100%;
    border: none;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--medium-gray);
    gap: 12px;
}

.map-placeholder svg {
    width: 48px;
    height: 48px;
    color: var(--primary);
}

/* Footer */
.footer {
    background-color: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-brand img {
    height: 40px;
    margin-bottom: 20px;
}

.footer-brand p {
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 300px;
}

.footer-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-contact p {
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
    overflow: hidden;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* TikTok official brand color - black */
.social-link.social-tiktok {
    background-color: #000000;
}

/* Instagram official brand gradient */
.social-link.social-instagram {
    background: linear-gradient(45deg, #feda75 0%, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5 100%);
}

/* WhatsApp official brand color - green */
.social-link.social-whatsapp {
    background-color: #25D366;
}

/* Header social links - smaller */
.header-social {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: 30px;
}

.header-social .social-link {
    width: 32px;
    height: 32px;
    margin-top: 0;
}

.header-social .social-link svg {
    width: 17px;
    height: 17px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Page Header (for inner pages) */
.page-header {
    position: relative;
    padding: 160px 0 80px;
    overflow: hidden;
    color: var(--white);
    text-align: center;
    background-color: var(--dark);
}

.page-header-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.page-header-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: heroFade 12s infinite;
}

.page-header-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6));
}

.page-header-slide:nth-child(1) {
    animation-delay: 0s;
}

.page-header-slide:nth-child(2) {
    animation-delay: 6s;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.page-header-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* About Page Specifics */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.value-card {
    padding: 30px;
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.value-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.value-card h3 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 12px;
}

.value-card p {
    font-size: 0.95rem;
    color: var(--medium-gray);
}

.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    left: -34px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-content h3 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 8px;
}

.timeline-content p {
    color: var(--medium-gray);
}

/* Products Page Filters */
.product-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 30px;
    background-color: var(--white);
    color: var(--dark-gray);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ============================================
   移动端样式已移至 css/mobile.css
   桌面端只需保留基础样式，不再使用媒体查询覆盖
   ============================================ */



/* ============================================
   i18n Language Switcher Styles
   ============================================ */
.lang-switcher-wrap {
  position: relative;
  margin-left: 0.5rem;
}

.lang-dropdown {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #f5f5f5;
  border: 1px solid #ddd;
  color: #333;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.25s;
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.lang-btn:hover {
  background: #ebebeb;
  border-color: #ccc;
}

.lang-globe, .lang-arrow {
  flex-shrink: 0;
}

.lang-current {
  font-weight: 500;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  min-width: 200px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 1000;
  list-style: none;
  padding: 0.35rem 0;
}

.lang-menu.open {
  display: block;
}

.lang-menu li a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: #333;
  text-decoration: none;
  font-size: 0.88rem;
  transition: background 0.15s;
}

.lang-menu li a:hover {
  background: #f5f5f5;
}

.lang-menu li a.active {
  background: #e3f2fd;
  color: #1565c0;
  font-weight: 600;
}

.lang-flag {
  font-size: 1.1rem;
  width: 1.5rem;
  text-align: center;
}

/* RTL Support */
html.rtl {
  direction: rtl;
}

html.rtl body {
  text-align: right;
}

html.rtl .nav-links {
  flex-direction: row-reverse;
}

html.rtl .lang-switcher-wrap {
  margin-left: 0;
  margin-right: 0.5rem;
}

html.rtl .lang-menu {
  right: auto;
  left: 0;
}

html.rtl .footer-grid,
html.rtl .features-grid,
html.rtl .products-grid,
html.rtl .values-grid {
  direction: rtl;
}

html.rtl .contact-info-item {
  flex-direction: row-reverse;
}

html.rtl .timeline-item::before {
  left: auto;
  right: -36px;
}

/* CJK Font Support */
html[lang="ja"] body,
html[lang="ko"] body,
html[lang="zh"] body {
  font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans JP', 'Noto Sans KR',
    'Microsoft YaHei', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN',
    'Meiryo', 'Malgun Gothic', sans-serif;
}

/* Arabic Font Support */
html[lang="ar"] body,
html[lang="ur"] body {
  font-family: 'Segoe UI', 'Noto Naskh Arabic', 'Noto Nastaliq Urdu',
    'Traditional Arabic', Tahoma, Arial, sans-serif;
  line-height: 1.7;
}

/* 移动端语言切换器样式见 css/mobile.css */

/* Dark mode lang switcher fix */
@media (prefers-color-scheme: dark) {
  .lang-menu {
    background: #1e1e1e;
    border-color: #333;
  }

  .lang-menu li a {
    color: #e0e0e0;
  }

  .lang-menu li a:hover {
    background: #2a2a2a;
  }

  .lang-menu li a.active {
    background: #1a3a5c;
    color: #64b5f6;
  }
}

/* RTL dark mode override */
html.rtl .lang-switcher-wrap {
  margin-right: 0.5rem;
}
