/* ============================================
   Huaiyun Machinery - Main Stylesheet
   ============================================ */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px; line-height: 1.6; color: #333; background: #fff;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 {
    font-size: 32px; font-weight: 700; color: #1a1a2e;
    margin-bottom: 12px; letter-spacing: 1px;
}
.section-header p { font-size: 16px; color: #666; }

/* === Buttons === */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 30px; font-size: 14px; font-weight: 600;
    border: 2px solid transparent; cursor: pointer;
    transition: all 0.3s ease; text-transform: uppercase;
    letter-spacing: 1px; border-radius: 4px;
}
.btn-primary { background: #c8a45a; color: #fff; border-color: #c8a45a; }
.btn-primary:hover { background: #b8943a; border-color: #b8943a; }
.btn-outline { background: transparent; color: #c8a45a; border-color: #c8a45a; }
.btn-outline:hover { background: #c8a45a; color: #fff; }
.btn-whatsapp {
    background: #25D366; color: #fff; border-color: #25D366;
    padding: 12px 24px; letter-spacing: 0.5px;
}
.btn-whatsapp:hover { background: #1da851; border-color: #1da851; }

/* ========== HEADER ========== */
#header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; }

/* Top Bar */
.top-bar { background: #1a1a2e; padding: 6px 0; }
.top-bar-inner { display: flex; justify-content: flex-end; gap: 24px; }
.top-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: #aaa; font-size: 13px; transition: color 0.2s;
}
.top-link:hover { color: #c8a45a; }
.top-link svg { flex-shrink: 0; }

/* Navigation Bar */
.nav-bar { background: rgba(255,255,255,0.98); box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.nav-inner { display: flex; align-items: center; height: 72px; gap: 20px; }

/* Logo */
.logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 20px; font-weight: 800; color: #1a1a2e;
    flex-shrink: 0;
}
.logo img { height: 40px; width: auto; }
.logo-text {
    letter-spacing: 2px; line-height: 1.2; text-align: center;
    font-size: 15px;
}

/* Navigation */
.main-nav { flex: 1; }
.nav-list { display: flex; justify-content: center; gap: 4px; }
.nav-list a {
    display: block; padding: 10px 18px;
    font-size: 14px; font-weight: 600; letter-spacing: 1px;
    color: #333; transition: color 0.2s; border-radius: 4px;
}
.nav-list a:hover, .nav-list a.active { color: #c8a45a; }

/* Right Actions */
.nav-actions { display: flex; align-items: center; gap: 12px; }
.search-toggle {
    background: none; border: none; cursor: pointer;
    color: #333; padding: 6px; border-radius: 4px;
    transition: color 0.2s; display: flex;
}
.search-toggle:hover { color: #c8a45a; }

/* Language Switcher */
.lang-switcher { position: relative; }
.lang-toggle {
    display: flex; align-items: center; gap: 4px;
    background: none; border: 1px solid #ddd; border-radius: 4px;
    padding: 6px 10px; cursor: pointer; font-size: 13px;
    font-weight: 600; color: #333; transition: all 0.2s;
}
.lang-toggle:hover { border-color: #c8a45a; color: #c8a45a; }
.lang-dropdown {
    position: absolute; top: 100%; right: 0; margin-top: 4px;
    background: #fff; border: 1px solid #eee; border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12); min-width: 180px;
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: all 0.2s; z-index: 100; overflow: hidden;
}
.lang-switcher:hover .lang-dropdown {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.lang-dropdown a {
    display: block; padding: 10px 16px; font-size: 13px;
    color: #333; transition: background 0.2s;
}
.lang-dropdown a:hover { background: #f5f5f5; color: #c8a45a; }

/* Mobile Menu Toggle */
.menu-toggle { display: none; flex-direction: column; gap: 4px; cursor: pointer; background: none; border: none; padding: 8px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: #333; transition: all 0.3s; border-radius: 1px; }

/* ========== HERO BANNER ========== */
.hero-banner { margin-top: 108px; position: relative; }
.hero-banner .swiper { height: 600px; }
.hero-banner .swiper-slide { position: relative; overflow: hidden; }
.slide-bg {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    transform: scale(1.05); transition: transform 6s ease;
}
.hero-banner .swiper-slide-active .slide-bg { transform: scale(1); }
.slide-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.3) 100%);
}
.slide-content {
    position: relative; z-index: 2; height: 100%;
    display: flex; flex-direction: column; justify-content: center;
    padding-top: 80px;
}
.slide-title {
    font-size: 48px; font-weight: 800; color: #fff;
    margin-bottom: 16px; letter-spacing: 2px;
}
.slide-desc {
    font-size: 18px; color: rgba(255,255,255,0.85);
    max-width: 600px; margin-bottom: 30px; line-height: 1.7;
}
.slide-btns { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-banner .swiper-pagination { bottom: 30px !important; }
.hero-banner .swiper-pagination-bullet {
    width: 12px; height: 12px; background: rgba(255,255,255,0.5);
    opacity: 1;
}
.hero-banner .swiper-pagination-bullet-active { background: #c8a45a; }
.hero-banner .swiper-button-next,
.hero-banner .swiper-button-prev { color: #fff; }

/* ========== PRODUCT CATEGORIES ========== */
.category-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.category-card {
    background: #f8f8f8; border-radius: 10px; overflow: hidden;
    text-align: center; transition: all 0.3s; cursor: pointer;
    border: 1px solid #eee;
}
.category-card:hover {
    transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #c8a45a;
}
.category-card .cat-img {
    aspect-ratio: 4/3; background: #f0f0f0; display: flex;
    align-items: center; justify-content: center; overflow: hidden;
    padding: 16px;
}
.category-card .cat-img img { width: 100%; height: 100%; object-fit: contain; }
.category-card .cat-info { padding: 20px; }
.category-card .cat-info h3 {
    font-size: 16px; font-weight: 700; color: #1a1a2e;
    margin-bottom: 6px;
}
.category-card .cat-info p { font-size: 13px; color: #999; }

/* ========== ABOUT SECTION ========== */
.about-section { background: #f8f9fa; }
.about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-image { border-radius: 10px; overflow: hidden; }
.about-image img { width: 100%; height: 400px; object-fit: cover; }
.about-content h2 {
    font-size: 32px; font-weight: 700; color: #1a1a2e;
    margin-bottom: 20px; letter-spacing: 1px;
}
.about-content p { color: #555; margin-bottom: 16px; line-height: 1.8; }
.about-btns { display: flex; gap: 16px; margin-top: 24px; }

/* ========== GALLERY SECTIONS ========== */
.gallery-section { background: #fff; }
.gallery-section .swiper { padding: 0 0 50px; }
.gallery-section .swiper-slide { width: 550px; }
.gallery-section .swiper-slide img {
    width: 100%; height: 300px; object-fit: cover; border-radius: 8px;
}
.gallery-section .swiper-pagination-bullet-active { background: #c8a45a; }
.shipping-section { background: #f8f9fa; }

/* ========== FOOTER ========== */
.footer { background: #1a1a2e; color: #ccc; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.footer-col h4 {
    font-size: 16px; font-weight: 700; color: #fff;
    margin-bottom: 20px; letter-spacing: 1px;
}
.footer-col p { font-size: 14px; line-height: 1.8; }
.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.footer-social a {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.1); display: flex;
    align-items: center; justify-content: center;
    transition: background 0.2s;
}
.footer-social a:hover { background: #c8a45a; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    font-size: 14px; color: #999; transition: color 0.2s;
}
.footer-links a:hover { color: #c8a45a; }
.footer-contact li {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 14px; font-size: 14px; color: #999;
}
.footer-contact svg { flex-shrink: 0; color: #c8a45a; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0; margin-top: 40px; text-align: center;
}
.footer-bottom p { font-size: 13px; color: #666; }

/* ========== SEARCH OVERLAY ========== */
.search-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.9); display: flex;
    align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: all 0.3s;
}
.search-overlay.active { opacity: 1; visibility: visible; }
.search-overlay-content { width: 600px; max-width: 90%; position: relative; }
.search-close {
    position: absolute; top: -60px; right: 0;
    background: none; border: none; color: #fff; cursor: pointer;
    padding: 8px; transition: color 0.2s;
}
.search-close:hover { color: #c8a45a; }
.search-box { display: flex; border-bottom: 2px solid #c8a45a; }
.search-box input {
    flex: 1; background: none; border: none; padding: 16px 0;
    font-size: 24px; color: #fff; outline: none;
}
.search-box input::placeholder { color: #666; }
.search-box button {
    background: none; border: none; color: #c8a45a;
    cursor: pointer; padding: 16px; transition: color 0.2s;
}
.search-box button:hover { color: #fff; }

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .hero-banner .swiper { height: 450px; }
    .slide-title { font-size: 36px; }
    .slide-desc { font-size: 16px; }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .about-layout { grid-template-columns: 1fr; gap: 40px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .section { padding: 60px 0; }
}

@media (max-width: 768px) {
    .top-bar { display: none; }
    .hero-banner { margin-top: 72px; }
    .hero-banner .swiper { height: 350px; }
    .slide-title { font-size: 28px; }
    .slide-desc { font-size: 15px; }
    .slide-content { padding-top: 40px; text-align: center; }
    .slide-desc { max-width: 100%; }
    .slide-btns { justify-content: center; }

    /* Mobile Nav - logo left, actions right */
    .nav-inner { gap: 8px; }
    .logo img { height: 32px; }
    .logo-text { font-size: 13px; letter-spacing: 1px; }
    .main-nav {
        position: fixed; top: 72px; left: 0; width: 100%;
        background: #fff; box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        max-height: 0; overflow: hidden; transition: max-height 0.3s;
    }
    .main-nav.open { max-height: 360px; }
    .nav-list { flex-direction: column; padding: 10px 0; }
    .nav-list a { padding: 14px 20px; border-radius: 0; }
    .menu-toggle { display: flex; }
    .nav-actions { gap: 6px; }
    .lang-toggle { padding: 4px 8px; font-size: 12px; }
    .lang-toggle span { min-width: 20px; }
    .lang-dropdown { right: -10px; min-width: 150px; }

    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .category-card .cat-img { padding: 10px; }

    .about-layout { gap: 30px; }
    .about-image img { height: 250px; }
    .about-content h2 { font-size: 26px; }

    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .gallery-section .swiper-slide { width: 300px; }
    .gallery-section .swiper-slide img { height: 200px; }

    .search-box input { font-size: 18px; }
    .section { padding: 40px 0; }
    .section-header h2 { font-size: 26px; }
}

@media (max-width: 480px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .hero-banner .swiper { height: 300px; }
    .slide-title { font-size: 22px; }
    .btn { padding: 10px 20px; font-size: 13px; }
}
