/* ===============================================================
   DJING ดีจริง — djinginter.com
   Dejing Inter Import Export Co., Ltd.
   =============================================================== */

:root {
  --gold:       #F5B301;  /* เหลืองทองเนื้อทุเรียน — สีหลัก */
  --gold-dark:  #d99a00;
  --cream:      #FFF6E0;  /* ครีมอ่อน — พื้นหลัง */
  --green:      #4A6B2A;  /* เขียวเปลือกทุเรียน — navbar/footer/หัวข้อ */
  --green-dark: #2F4A1C;  /* เขียวเข้มใบไม้ — ตัวอักษร */
  --brick:      #C0392B;  /* แดงอิฐ — badge/accent */
  --blue:       #1B4FA0;  /* น้ำเงินโลโก้ */
  --white:      #ffffff;
  --gray:       #6b6b6b;

  --radius:     16px;
  --radius-sm:  10px;
  --shadow:     0 6px 24px rgba(47, 74, 28, 0.10);
  --shadow-hover: 0 14px 36px rgba(47, 74, 28, 0.18);
  --maxw:       1180px;
  --nav-h:      68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: 'Prompt', 'Noto Sans Thai', -apple-system, sans-serif;
  color: var(--green-dark);
  background: var(--cream);
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--green); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.section { padding: 84px 0; }
.section-title {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  text-align: center;
  margin-bottom: 10px;
}
.section-sub {
  text-align: center;
  color: var(--gray);
  max-width: 640px;
  margin: 0 auto 48px;
  font-size: 1.02rem;
}
.section-title::after {
  content: "";
  display: block;
  width: 64px; height: 4px;
  background: var(--gold);
  border-radius: 4px;
  margin: 14px auto 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-primary { background: var(--gold); color: var(--green-dark); box-shadow: 0 6px 18px rgba(245,179,1,.35); }
.btn-primary:hover { background: var(--gold-dark); transform: translateY(-3px); box-shadow: 0 12px 26px rgba(245,179,1,.45); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.85); }
.btn-outline:hover { background: rgba(255,255,255,.15); transform: translateY(-3px); }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-dark); transform: translateY(-3px); }

/* ===============================================================
   NAVBAR
   =============================================================== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  background: var(--green);
  box-shadow: 0 2px 14px rgba(0,0,0,.18);
  transition: background .3s ease;
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; height: 100%;
  padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 46px; height: 46px; border-radius: 50%;
  object-fit: cover;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,.28);
  flex-shrink: 0;
}
.brand-text { color: var(--white); font-weight: 700; font-size: 1.2rem; letter-spacing: .3px; }
.brand-text small { display: block; font-size: .68rem; font-weight: 400; opacity: .8; letter-spacing: .5px; }

.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-menu a {
  color: rgba(255,255,255,.9);
  padding: 8px 13px;
  border-radius: 8px;
  font-size: .95rem; font-weight: 500;
  transition: background .18s, color .18s;
}
.nav-menu a:hover { background: rgba(255,255,255,.12); color: var(--white); }

.lang-toggle {
  margin-left: 8px;
  background: var(--gold); color: var(--green-dark);
  border: none; border-radius: 999px;
  padding: 7px 16px; font-family: inherit; font-weight: 600;
  cursor: pointer; font-size: .9rem;
  transition: background .18s, transform .18s;
}
.lang-toggle:hover { background: var(--gold-dark); transform: translateY(-1px); }

.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; padding: 8px;
}
.hamburger span {
  display: block; height: 3px; background: var(--white);
  border-radius: 3px; margin: 4px 0; transition: .3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===============================================================
   HERO
   =============================================================== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative;
  padding-top: var(--nav-h);
  background: linear-gradient(rgba(47,74,28,.72), rgba(47,74,28,.55)),
              url('../images/durian-harvest-pile.jpg') center/cover no-repeat;
  color: var(--white);
  text-align: center;
}
.hero-content { max-width: 860px; margin: 0 auto; padding: 40px 20px; }
.hero .eyebrow {
  display: inline-block;
  background: rgba(245,179,1,.95); color: var(--green-dark);
  font-weight: 600; font-size: .9rem;
  padding: 6px 18px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(2.1rem, 6vw, 4rem);
  text-shadow: 0 3px 18px rgba(0,0,0,.4);
  margin-bottom: 18px;
}
.hero h1 .accent { color: var(--gold); }
.hero p {
  font-size: clamp(1.02rem, 2.3vw, 1.3rem);
  max-width: 640px; margin: 0 auto 34px;
  text-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.8); font-size: 1.6rem;
  animation: bounce 2s infinite;
}
@keyframes bounce { 0%,100%{transform:translate(-50%,0)} 50%{transform:translate(-50%,10px)} }

/* ===============================================================
   TRUST BAR
   =============================================================== */
.trust {
  background: var(--green-dark);
  padding: 46px 0;
}
.trust-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  text-align: center;
}
.trust-item .num {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700; color: var(--gold);
  line-height: 1.1;
}
.trust-item .label { color: rgba(255,255,255,.88); font-size: .95rem; margin-top: 6px; }

/* ===============================================================
   ABOUT / TIMELINE
   =============================================================== */
.about { background: var(--white); }
.timeline {
  position: relative;
  max-width: 720px; margin: 0 auto 60px;
  padding-left: 40px;
}
.timeline::before {
  content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px;
  width: 3px; background: linear-gradient(var(--gold), var(--green));
  border-radius: 3px;
}
.tl-item { position: relative; padding-bottom: 34px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -34px; top: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold); border: 4px solid var(--white);
  box-shadow: 0 0 0 3px var(--gold);
}
.tl-year { font-size: 1.3rem; font-weight: 700; color: var(--brick); }
.tl-item h4 { margin: 2px 0 6px; font-size: 1.12rem; }
.tl-item p { color: var(--gray); }

.vmv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.vmv-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
  transition: transform .2s, box-shadow .2s;
}
.vmv-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.vmv-card .ico { font-size: 2.4rem; margin-bottom: 12px; }
.vmv-card h4 { font-size: 1.2rem; margin-bottom: 8px; }
.vmv-card p { color: var(--green-dark); font-size: .97rem; }

/* ===============================================================
   PRODUCTS
   =============================================================== */
.products { background: var(--cream); }
.tabs { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.tab-btn {
  background: var(--white); color: var(--green);
  border: 2px solid var(--green);
  border-radius: 999px; padding: 10px 24px;
  font-family: inherit; font-weight: 600; font-size: .98rem; cursor: pointer;
  transition: all .2s;
}
.tab-btn:hover { background: rgba(74,107,42,.08); }
.tab-btn.active { background: var(--green); color: var(--white); }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn .4s ease; }
@keyframes fadeIn { from{opacity:0; transform:translateY(10px)} to{opacity:1; transform:none} }

.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 18px 14px 16px; text-align: center;
  box-shadow: 0 3px 12px rgba(47,74,28,.07);
  transition: transform .18s, box-shadow .18s;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
/* photo/emoji "balloon" */
.pc-media {
  position: relative;
  width: 96px; height: 96px; margin: 0 auto 10px;
  border-radius: 50%; overflow: hidden;
  background: var(--cream);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 3px var(--gold), 0 4px 12px rgba(47,74,28,.12);
}
.pc-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pc-media .emoji { font-size: 2.6rem; line-height: 1; }
.product-card .th { font-weight: 600; color: var(--green-dark); font-size: .98rem; }
.product-card .en { font-size: .8rem; color: var(--gray); }

/* ===============================================================
   LAVA DURIAN (GI HIGHLIGHT)
   =============================================================== */
.lava {
  background: linear-gradient(135deg, var(--gold) 0%, #ffcf4d 100%);
  color: var(--green-dark);
}
.lava-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.lava h2 { color: var(--green-dark); font-size: clamp(1.8rem, 4vw, 2.6rem); }
.lava h2::after { background: var(--brick); margin-left: 0; }
.lava-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brick); color: var(--white);
  padding: 8px 18px; border-radius: 999px;
  font-weight: 600; font-size: .92rem; margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(192,57,43,.35);
}
.lava-features { margin: 24px 0; display: grid; gap: 14px; }
.lava-feature { display: flex; gap: 12px; align-items: flex-start; }
.lava-feature .fi { font-size: 1.5rem; flex-shrink: 0; }
.lava-feature b { display: block; }
.lava-feature span { font-size: .95rem; }
.lava-images { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lava-images img {
  border-radius: var(--radius); box-shadow: var(--shadow-hover);
  aspect-ratio: 1/1; object-fit: cover; width: 100%;
}
.lava-images img:first-child { grid-column: 1 / -1; aspect-ratio: 16/10; }

/* ===============================================================
   EXPORT MARKETS
   =============================================================== */
.markets { background: var(--white); }
.flags-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 14px;
  max-width: 900px; margin: 0 auto 40px;
}
.flag-item {
  background: var(--cream); border-radius: var(--radius-sm);
  padding: 16px 10px; text-align: center;
  box-shadow: 0 3px 10px rgba(47,74,28,.06);
  transition: transform .18s;
}
.flag-item:hover { transform: translateY(-4px); }
.flag-item .flag {
  width: 54px; height: 36px; margin: 0 auto;
  object-fit: cover; border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.flag-item .cty { font-weight: 600; margin-top: 8px; font-size: .95rem; }

.partners {
  background: var(--cream); border-radius: var(--radius);
  padding: 30px 34px; max-width: 900px; margin: 0 auto;
  box-shadow: var(--shadow);
}
.partners h4 { margin-bottom: 20px; text-align: center; }
.partner-tags { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; }
/* logo tile — <img> shows if a logo file exists, otherwise JS swaps in a text chip */
.partner-logo {
  height: 62px; width: auto; max-width: 150px;
  object-fit: contain;
  background: var(--white); border-radius: 12px;
  padding: 8px 14px; box-shadow: 0 3px 10px rgba(47,74,28,.1);
  transition: transform .18s;
}
.partner-logo:hover { transform: translateY(-3px); }
.partner-chip {
  display: none;   /* shown by JS only when the logo image is missing */
  background: var(--white); border: 1px solid rgba(74,107,42,.25);
  color: var(--green); padding: 9px 18px; border-radius: 999px;
  font-size: .9rem; font-weight: 500; box-shadow: 0 3px 10px rgba(47,74,28,.08);
}

/* ===============================================================
   EVENTS
   =============================================================== */
.events { background: var(--cream); }
.event-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.event-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.event-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.event-card .thumb { aspect-ratio: 4/3; overflow: hidden; }
.event-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.event-card:hover .thumb img { transform: scale(1.06); }
.event-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.event-body .tag {
  display: inline-block; align-self: flex-start;
  background: var(--gold); color: var(--green-dark);
  font-size: .76rem; font-weight: 600; padding: 3px 12px; border-radius: 999px; margin-bottom: 10px;
}
.event-body h4 { font-size: 1.1rem; margin-bottom: 6px; }
.event-body p { color: var(--gray); font-size: .9rem; flex: 1; }
.event-link {
  margin-top: 14px; align-self: flex-start;
  color: var(--brick); font-weight: 600; font-size: .92rem;
  display: inline-flex; align-items: center; gap: 5px;
}
.event-link:hover { text-decoration: underline; }
.events-cta { text-align: center; margin-top: 46px; }

/* ===============================================================
   CONTACT
   =============================================================== */
.contact { background: var(--white); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info h3 { font-size: 1.3rem; margin-bottom: 6px; }
.contact-block {
  background: var(--cream); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 18px; box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
}
.contact-block h4 { font-size: 1.05rem; margin-bottom: 8px; color: var(--brick); }
.contact-line { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; font-size: .96rem; }
.contact-line .ci { flex-shrink: 0; }
.contact-line a:hover { color: var(--brick); text-decoration: underline; }
.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 340px; }
.map-wrap iframe { width: 100%; height: 100%; min-height: 340px; border: 0; }

.contact-form { display: grid; gap: 14px; margin-top: 20px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid rgba(74,107,42,.25); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .96rem; background: var(--white);
  transition: border .18s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--gold); }
.contact-form textarea { resize: vertical; min-height: 110px; }

/* ===============================================================
   FOOTER
   =============================================================== */
.footer { background: var(--green-dark); color: rgba(255,255,255,.85); padding: 54px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; margin-bottom: 30px; }
.footer h4 { color: var(--gold); margin-bottom: 14px; font-size: 1.05rem; }
.footer .brand-text { color: var(--white); }
.footer-about p { font-size: .92rem; margin-top: 12px; }
.footer-links a { display: block; padding: 4px 0; font-size: .94rem; color: rgba(255,255,255,.8); }
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 22px; text-align: center; font-size: .88rem; color: rgba(255,255,255,.7);
}
.footer-bottom .reg { color: var(--gold); }

/* ===============================================================
   REVEAL ANIMATION
   =============================================================== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===============================================================
   GALLERY PAGE
   =============================================================== */
.gallery-hero {
  padding: calc(var(--nav-h) + 70px) 0 60px;
  background: linear-gradient(rgba(47,74,28,.8), rgba(47,74,28,.7)), url('../images/durian-orchard.jpg') center/cover;
  color: var(--white); text-align: center;
}
.gallery-hero h1 { color: var(--white); font-size: clamp(2rem, 5vw, 3rem); }
.gallery-hero p { margin-top: 10px; opacity: .9; }
.filter-bar { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 46px 0 40px; }
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px; padding-bottom: 60px;
}
.gallery-item {
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow); aspect-ratio: 4/3;
  position: relative;
  transition: transform .2s, box-shadow .2s;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .cap {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(transparent, rgba(47,74,28,.85));
  color: #fff; padding: 22px 14px 12px; font-size: .88rem; font-weight: 500;
  opacity: 0; transition: opacity .2s;
}
.gallery-item:hover .cap { opacity: 1; }
.gallery-item.hide { display: none; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(20,28,14,.94);
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 82vh; border-radius: 10px; box-shadow: 0 10px 50px rgba(0,0,0,.6); }
.lb-cap { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; color: #fff; font-size: 1rem; }
.lb-btn {
  position: absolute; background: rgba(255,255,255,.14); border: none;
  color: #fff; width: 52px; height: 52px; border-radius: 50%;
  font-size: 1.6rem; cursor: pointer; display: grid; place-items: center;
  transition: background .18s;
}
.lb-btn:hover { background: rgba(245,179,1,.85); color: var(--green-dark); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }

/* ===============================================================
   RESPONSIVE
   =============================================================== */
@media (max-width: 980px) {
  .lava-grid, .contact-grid { grid-template-columns: 1fr; gap: 30px; }
  .event-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .section { padding: 60px 0; }
  .hamburger { display: block; }
  .nav-menu {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--green); flex-direction: column; align-items: stretch;
    gap: 0; padding: 10px 16px 20px;
    transform: translateY(-130%); transition: transform .32s ease;
    box-shadow: 0 12px 24px rgba(0,0,0,.25);
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-menu a { padding: 13px 12px; border-radius: 8px; }
  .lang-toggle { margin: 10px 12px 0; align-self: flex-start; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 14px; }
  .vmv-grid { grid-template-columns: 1fr; }
  .event-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .lava-images img:first-child { aspect-ratio: 16/9; }
}
@media (max-width: 560px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
  .pc-media { width: 78px; height: 78px; }
  .flags-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .partners { padding: 24px 18px; }
  .lb-prev { left: 10px; } .lb-next { right: 10px; }
  .lb-btn { width: 44px; height: 44px; }
}
@media (max-width: 420px) {
  .brand-text { font-size: 1.05rem; }
  .brand-text small { display: none; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .trust-grid { gap: 24px 10px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .flags-grid { grid-template-columns: repeat(3, 1fr); }
}
