/* ===== ROOT VARIABLES ===== */
:root {
  --red: #c0152a;
  --red-dark: #a01020;
  --red-light: #e31c39;
  --dark: #1a1a2e;
  --dark2: #222235;
  --gray: #f5f5f5;
  --gray2: #e8e8e8;
  --text: #333333;
  --text-light: #666666;
  --white: #ffffff;
  --font-th: 'Prompt', sans-serif;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-th); font-weight: 300; color: var(--text); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== UTILITY ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-title { text-align: center; font-size: 1.8rem; font-weight: 500; margin-bottom: 10px; }
.section-subtitle { text-align: center; color: var(--text-light); margin-bottom: 40px; font-size: 1rem; }
.btn { display: inline-block; padding: 12px 28px; border-radius: 4px; font-size: 0.95rem; font-weight: 400; cursor: pointer; transition: all 0.3s ease; border: none; }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(192,21,42,0.4); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-outline:hover { background: var(--white); color: var(--red); }
.section-link { display: flex; align-items: center; gap: 6px; color: var(--red); font-weight: 400; font-size: 0.95rem; transition: gap 0.2s; }
.section-link:hover { gap: 10px; }
.section-link i { font-size: 0.85rem; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 35px; }
.section-header .section-title { margin-bottom: 0; text-align: left; }
.title-line { width: 60px; height: 4px; background: var(--red); border-radius: 2px; margin: 8px 0 0 0; }

/* ===== TOP BAR ===== */
.topbar { background: var(--dark); color: rgba(255,255,255,0.8); font-size: 0.82rem; padding: 7px 0; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 18px; }
.topbar a:hover { color: var(--white); }
.topbar i { margin-right: 5px; color: var(--red); }

/* ===== NAVBAR ===== */
.navbar { background: var(--white); box-shadow: 0 2px 15px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 1000; }
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-img { height: 42px; width: auto; object-fit: contain; }
.logo-text { line-height: 1.35; border-left: 1.5px solid var(--gray2); padding-left: 10px; }
.logo-name-th { font-size: 0.78rem; font-weight: 500; color: var(--dark); }
.logo-name-en { font-size: 0.62rem; font-weight: 300; color: var(--text-light); letter-spacing: 0.8px; text-transform: uppercase; }
.nav-menu { display: flex; align-items: center; gap: 6px; }
.nav-menu a { padding: 8px 14px; border-radius: 4px; font-size: 0.9rem; font-weight: 300; color: var(--text); text-transform: uppercase; transition: all 0.2s; position: relative; }
.nav-menu a:hover, .nav-menu a.active { color: var(--red); }
.nav-menu a.active::after { content: ''; position: absolute; bottom: 0; left: 14px; right: 14px; height: 2px; background: var(--red); border-radius: 1px; }
.nav-phone { display: flex; align-items: center; gap: 8px; background: var(--red); color: white; padding: 9px 18px; border-radius: 25px; font-size: 0.88rem; font-weight: 400; }
.nav-phone i { font-size: 0.9rem; }
.nav-phone:hover { background: var(--red-dark); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 5px; }
.hamburger span { width: 25px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ===== HERO ===== */
.hero { background: #ffffff; min-height: 560px; display: flex; align-items: center; position: relative; overflow: hidden; border-bottom: 1px solid var(--gray2); }
.hero::before { display: none; }
.hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; position: relative; z-index: 1; padding: 0 20px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(192,21,42,0.08); border: 1px solid rgba(192,21,42,0.25); color: var(--red); padding: 6px 14px; border-radius: 20px; font-size: 0.82rem; margin-bottom: 18px; }
.hero-badge i { font-size: 0.75rem; }
.hero-title { font-size: 2.2rem; font-weight: 400; color: var(--text); line-height: 1.4; margin-bottom: 6px; }
.hero-title-bold { font-size: 2.6rem; font-weight: 600; color: var(--red); line-height: 1.2; margin-bottom: 20px; }
.hero-desc { color: var(--text-light); font-size: 1rem; line-height: 1.9; margin-bottom: 35px; max-width: 480px; }
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-outline { background: transparent; color: var(--red); border: 2px solid var(--red); }
.btn-outline:hover { background: var(--red); color: var(--white); }
.hero-visual { display: flex; align-items: center; justify-content: center; }
.hero-product-img { width: 100%; max-width: 780px; object-fit: contain; }

/* ===== FEATURES STRIP ===== */
.features-strip { background: var(--white); padding: 40px 0; border-bottom: 1px solid var(--gray2); }
.features-strip .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.feature-item { display: flex; align-items: flex-start; gap: 15px; }
.feature-icon { width: 50px; height: 50px; min-width: 50px; background: rgba(192,21,42,0.08); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--red); font-size: 1.3rem; }
.feature-text h4 { font-size: 0.95rem; font-weight: 500; margin-bottom: 4px; color: var(--dark); }
.feature-text p { font-size: 0.82rem; color: var(--text-light); line-height: 1.5; }

/* ===== PRODUCTS ===== */
.products-section { padding: 70px 0; background: var(--gray); }
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 3px 15px rgba(0,0,0,0.07); transition: all 0.3s; }
.product-card:hover { transform: translateY(-6px); box-shadow: 0 12px 35px rgba(0,0,0,0.13); }
.product-img { aspect-ratio: 4/3; overflow: hidden; background: #f0f0f0; display: flex; align-items: center; justify-content: center; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.product-card:hover .product-img img { transform: scale(1.05); }
.product-img-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #aaa; font-size: 2.5rem; }
.product-body { padding: 18px; }
.product-body h3 { font-size: 0.95rem; font-weight: 500; color: var(--dark); margin-bottom: 8px; line-height: 1.4; }
.product-body p { font-size: 0.82rem; color: var(--text-light); line-height: 1.6; margin-bottom: 14px; }
.product-link { display: inline-flex; align-items: center; gap: 6px; color: var(--red); font-size: 0.85rem; font-weight: 400; transition: gap 0.2s; }
.product-link:hover { gap: 10px; }

/* ===== BRANDS ===== */
.brands-section { padding: 60px 0; background: var(--white); }
.brands-track-wrapper { position: relative; }
.brands-track { display: flex; gap: 30px; align-items: center; overflow: hidden; }
.brands-slider { display: flex; gap: 30px; align-items: center; }
.brand-logo { min-width: 150px; height: 70px; background: var(--gray); border: 1px solid var(--gray2); border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 12px 22px; transition: all 0.3s; filter: grayscale(100%); opacity: 0.65; }
.brand-logo:hover { filter: grayscale(0%); opacity: 1; box-shadow: 0 5px 20px rgba(0,0,0,0.1); transform: translateY(-3px); }
.brand-logo img { max-height: 38px; object-fit: contain; }
.brand-logo-text { font-size: 1.1rem; font-weight: 800; color: var(--text); letter-spacing: 0.5px; text-align: center; }
.brands-nav { display: flex; justify-content: center; gap: 12px; margin-top: 30px; }
.brand-btn { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--gray2); background: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); font-size: 0.9rem; transition: all 0.2s; }
.brand-btn:hover { border-color: var(--red); color: var(--red); }
.brands-carousel { display: flex; gap: 25px; align-items: center; flex-wrap: nowrap; overflow: hidden; }

/* ===== PORTFOLIO ===== */
.portfolio-section { padding: 70px 0; background: var(--white); }
.portfolio-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }
.portfolio-card { border-radius: 12px; overflow: hidden; position: relative; aspect-ratio: 4/3; cursor: pointer; }
.portfolio-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.portfolio-card:hover img { transform: scale(1.08); }
.portfolio-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%); opacity: 0; transition: opacity 0.3s; display: flex; align-items: flex-end; padding: 18px; }
.portfolio-card:hover .portfolio-overlay { opacity: 1; }
.portfolio-overlay p { color: white; font-size: 0.85rem; line-height: 1.5; }
.portfolio-img-placeholder { width: 100%; height: 100%; background: #ddd; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #999; font-size: 2rem; }
.portfolio-dots { display: flex; justify-content: center; gap: 8px; }
.portfolio-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gray2); cursor: pointer; transition: background 0.2s; }
.portfolio-dot.active { background: var(--red); }

/* ===== STATS ===== */
.stats-section { padding: 30px 0; background: var(--white); }
.stats-box { display: flex; align-items: center; background: var(--gray); border: 1px solid #e2e2e2; border-radius: 14px; overflow: hidden; }
.stat-item { display: flex; align-items: center; gap: 14px; flex: 1; padding: 22px 24px; }
.stat-divider { width: 1px; height: 56px; background: #e8e8e8; flex-shrink: 0; }
.stat-icon { width: 48px; height: 48px; min-width: 48px; background: rgba(192,21,42,0.07); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; color: var(--red); }
.stat-body { line-height: 1.3; }
.stat-number { font-size: 1.7rem; font-weight: 600; color: var(--dark); line-height: 1; }
.stat-number-text { font-size: 0.95rem; font-weight: 600; color: var(--dark); }
.stat-label { font-size: 0.77rem; color: var(--text-light); margin-top: 4px; }

/* ===== NEWS ===== */
.news-section { padding: 70px 0; background: var(--white); }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.news-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 3px 15px rgba(0,0,0,0.07); transition: all 0.3s; }
.news-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0,0,0,0.12); }
.news-img { aspect-ratio: 16/9; overflow: hidden; background: #eee; display: flex; align-items: center; justify-content: center; position: relative; }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.news-card:hover .news-img img { transform: scale(1.05); }
.news-img-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #bbb; font-size: 2rem; }
.news-category { position: absolute; top: 12px; left: 12px; background: var(--red); color: white; font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.5px; }
.news-body { padding: 20px; }
.news-date { font-size: 0.78rem; color: var(--text-light); margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
.news-body h3 { font-size: 0.98rem; font-weight: 500; color: var(--dark); line-height: 1.5; margin-bottom: 10px; }
.news-body p { font-size: 0.83rem; color: var(--text-light); line-height: 1.7; margin-bottom: 14px; }
.news-read-more { display: inline-flex; align-items: center; gap: 5px; color: var(--red); font-size: 0.85rem; font-weight: 600; transition: gap 0.2s; }
.news-read-more:hover { gap: 9px; }

/* ===== FOOTER ===== */
.footer { background: var(--white); color: var(--text); padding: 50px 0 0; border-top: 1px solid var(--gray2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.5fr 1.5fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--gray2); }
.footer-brand .footer-logo { margin-bottom: 16px; }
.footer-brand p { font-size: 0.83rem; line-height: 1.9; color: var(--text-light); margin-bottom: 20px; }
.social-links { display: flex; gap: 8px; }
.social-link { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; color: white; transition: opacity 0.2s; }
.social-link:hover { opacity: 0.82; }
.footer-desc { font-size: 0.8rem; color: var(--text-light); line-height: 1.8; margin-bottom: 16px; }
.footer-social { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.footer-social-link { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--text-light); text-decoration: none; transition: color 0.2s; }
.footer-social-link:hover { color: var(--red); }
.footer-social-icon { width: 28px; height: 28px; border-radius: 50%; background: #1877f2; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; color: #fff; flex-shrink: 0; }
.footer-social-label { line-height: 1.3; }
.sl-fb { background: #1877f2; }
.sl-line { background: #06c755; }
.sl-yt { background: #ff0000; }
.sl-li { background: #0a66c2; }
.footer-col h4 { font-size: 0.93rem; font-weight: 500; color: var(--dark); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--red); display: inline-block; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul li a { font-size: 0.82rem; color: var(--text-light); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--red); }
.contact-item { display: flex; gap: 10px; margin-bottom: 12px; }
.contact-item i { color: var(--red); margin-top: 3px; font-size: 0.88rem; min-width: 16px; }
.contact-item p { font-size: 0.82rem; color: var(--text-light); line-height: 1.6; }
.footer-bottom { padding: 16px 0; text-align: center; font-size: 0.78rem; color: var(--text-light); background: var(--gray); border-top: 1px solid var(--gray2); }

/* ===== BACK TO TOP ===== */
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 44px; height: 44px; background: var(--white); color: var(--red); border: 1px solid var(--red); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 1rem; cursor: pointer; opacity: 0; pointer-events: none; transition: all 0.3s; z-index: 999; }
.back-to-top.visible { opacity: 1; pointer-events: all; }
.back-to-top:hover { transform: translateY(-3px); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .navbar .logo-text,
  .navbar .nav-logo-text {
    display: none !important;
  }
  .navbar .logo {
    gap: 0;
  }
  .topbar { display: none; }
  .nav-menu { display: none; position: fixed; top: 70px; left: 0; right: 0; background: white; flex-direction: column; padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
  .nav-menu.open { display: flex; }
  .nav-menu a { width: 100%; padding: 12px 16px; }
  .hamburger { display: flex; }
  .hero .container { grid-template-columns: 1fr; gap: 30px; padding: 50px 20px; }
  .hero-visual { display: flex; justify-content: center; }
  .hero-product-img { max-width: 320px; }
  .hero-title { font-size: 1.8rem; }
  .hero-title-bold { font-size: 2rem; }
  .features-strip .container { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-box { flex-wrap: wrap; border-radius: 10px; }
  .stat-item { flex: 1 1 45%; padding: 16px 18px; }
  .stat-divider { display: none; }
  .news-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .navbar .logo-text,
  .navbar .nav-logo-text {
    display: none !important;
  }
  .navbar .logo {
    gap: 0;
  }
  .features-strip .container { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-buttons { flex-direction: column; }
}
