/* ==========================================================
   เชือก.com - Main Stylesheet
   Brand: Orange #F47920 / Blue #29ABE2
   ========================================================== */

:root {
  --brand-orange: #FE6600;
  --brand-blue: #29ABE2;
  --brand-orange-dark: #d96a1a;
  --brand-blue-dark: #1e8fbf;
  --text-dark: #1a1a1a;
  --text-body: #333;
  --text-muted: #666;
  --bg-light: #f8f9fa;
  --bg-white: #fff;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --header-height: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans Thai', 'Sarabun', sans-serif;
  color: var(--text-body);
  line-height: 1.7;
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--brand-blue-dark); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================
   Header & Navigation
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
}

.site-logo .orange { color: var(--brand-orange); }
.site-logo .blue { color: var(--brand-blue); }

.main-nav { display: flex; gap: 8px; align-items: center; }

.main-nav a {
  padding: 8px 16px;
  color: var(--text-body);
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s;
  font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--bg-light);
  color: var(--brand-orange);
}

.nav-cta {
  background: var(--brand-orange) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 8px 20px !important;
}

.nav-cta:hover {
  background: var(--brand-orange-dark) !important;
  color: #fff !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  margin: 5px 0;
  transition: 0.3s;
}

/* ==========================================================
   Hero Section
   ========================================================== */
.hero {
  background: linear-gradient(135deg, #fff5eb 0%, #ebf8ff 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(244,121,32,0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: var(--brand-orange);
  color: #fff;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-image img {
  max-width: 480px;
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* ==========================================================
   Buttons
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-orange);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-orange-dark); color: #fff; }

.btn-secondary {
  background: var(--bg-white);
  color: var(--text-body);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--brand-blue); color: var(--brand-blue); }

.btn-line {
  background: #06C755;
  color: #fff;
}
.btn-line:hover { background: #05b04c; color: #fff; }

.btn-lg { padding: 14px 36px; font-size: 1.1rem; }

/* ==========================================================
   Sections
   ========================================================== */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-light);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.section-header .accent-bar {
  width: 48px;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-blue));
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ==========================================================
   Product Cards
   ========================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.product-card-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-light);
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-card-image img {
  transform: scale(1.05);
}

.product-card-body {
  padding: 24px;
}

.product-card-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.product-card-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.product-card-body .tag {
  display: inline-block;
  background: #fff5eb;
  color: var(--brand-orange);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ==========================================================
   Features / USP
   ========================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}

.feature-item {
  text-align: center;
  padding: 32px 24px;
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #fff5eb, #ebf8ff);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
}

.feature-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.feature-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================
   CTA Banner (LINE)
   ========================================================== */
.cta-banner {
  background: linear-gradient(135deg, var(--brand-orange) 0%, #f59e42 100%);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  color: #fff;
  margin: 40px 0;
}

.cta-banner h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 24px;
}

/* ==========================================================
   About / Factory
   ========================================================== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-content img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.stat-item {
  text-align: center;
  padding: 16px;
  background: var(--bg-light);
  border-radius: var(--radius);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-orange);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================
   Blog / Posts
   ========================================================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.post-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s;
}

.post-card:hover {
  box-shadow: var(--shadow-md);
}

.post-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-light);
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-body {
  padding: 24px;
}

.post-card-body .date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.post-card-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.post-card-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================
   Contact
   ========================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  background: var(--bg-light);
  border-radius: var(--radius);
}

.contact-item-icon {
  width: 44px;
  height: 44px;
  background: var(--brand-orange);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-item h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.contact-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.map-container iframe {
  width: 100%;
  height: 400px;
  border: none;
}

/* ==========================================================
   Footer
   ========================================================== */
.site-footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}

.footer-brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.footer-brand .orange { color: var(--brand-orange); }

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,0.6);
  padding: 4px 0;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--brand-orange); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
}

/* ==========================================================
   Single Product Page
   ========================================================== */
.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  padding: 48px 0;
}

.product-gallery img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.product-info h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.product-info .description {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 24px;
  line-height: 1.8;
}

.product-specs {
  margin-top: 24px;
}

.product-specs table {
  width: 100%;
  border-collapse: collapse;
}

.product-specs th,
.product-specs td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.95rem;
}

.product-specs th {
  font-weight: 600;
  color: var(--text-dark);
  width: 40%;
  background: var(--bg-light);
}

/* Single Blog Post */
.post-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 0;
}

.post-content h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.post-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.post-body {
  font-size: 1.05rem;
  line-height: 1.9;
}

.post-body h2 { font-size: 1.5rem; margin: 32px 0 16px; color: var(--text-dark); }
.post-body h3 { font-size: 1.2rem; margin: 24px 0 12px; color: var(--text-dark); }
.post-body p { margin-bottom: 16px; }
.post-body img { border-radius: var(--radius); margin: 24px 0; }
.post-body ul, .post-body ol { margin: 16px 0; padding-left: 24px; }
.post-body li { margin-bottom: 8px; }

/* ==========================================================
   LINE Floating Button
   ========================================================== */
.line-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
}

.line-float a {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #06C755;
  color: #fff;
  padding: 12px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 4px 16px rgba(6,199,85,0.4);
  transition: all 0.3s;
}

.line-float a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6,199,85,0.5);
  color: #fff;
}

.line-float svg {
  width: 24px;
  height: 24px;
}

/* ==========================================================
   Breadcrumb
   ========================================================== */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--brand-orange); }
.breadcrumb span { margin: 0 6px; }

/* ==========================================================
   Page Header
   ========================================================== */
.page-header {
  background: linear-gradient(135deg, #fff5eb 0%, #ebf8ff 100%);
  padding: 48px 0;
  text-align: center;
}

.page-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
}

.post-body th {
  background: var(--brand-orange);
  color: #fff;
  padding: 12px 16px;
  text-align: center;
  font-weight: 700;
}

.post-body td {
  padding: 10px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.post-body tbody tr:nth-child(even) {
  background: var(--bg-light);
}

.post-body tbody tr:hover {
  background: #fff5eb;
}

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }

  .main-nav.open { display: flex; }

  .hero { padding: 48px 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 2rem; }
  .hero-image { order: -1; }
  .hero-image img { max-width: 320px; }

  .about-content { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .product-hero { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }

  .products-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(3, 1fr); }

  .cta-banner { padding: 32px 24px; }
  .cta-banner h2 { font-size: 1.4rem; }

  .section { padding: 48px 0; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
  .hero-actions { flex-direction: column; }
  .about-stats { grid-template-columns: 1fr; }
