* {
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f3f8f4;
  --text: #11261b;
  --muted: #365947;
  --brand: #fa0d01;
  --brand-deep: #f70d01;
  --brand-green: #085231;
  --brand-green-deep: #286043;
  --border: #d0dfd6;
  --success: #286043;
  --error: #fa0d01;
  --shadow: 0 18px 45px rgba(8, 82, 49, 0.12);
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(circle at top left, #fff4f2, #f5faf6 45%, #ffffff 100%);
  color: var(--text);
  font-family: 'Noto Sans Thai', sans-serif;
  line-height: 1.65;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-deep);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6rem;
  font-family: 'Barlow', 'Noto Sans Thai', sans-serif;
  line-height: 1.2;
}

p {
  margin: 0 0 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(208, 223, 214, 0.9);
  background: rgba(255, 255, 255, 0.92);
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--brand);
}

.brand img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.brand-name-lines {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name-en,
.brand-name-th {
  color: var(--brand);
}

.brand-name-en {
  font-family: 'Merriweather', 'Noto Sans Thai', serif;
  font-size: 1.16rem;
  font-weight: 700;
}

.brand-name-th {
  font-family: 'Noto Sans Thai', sans-serif;
  font-size: 0.94rem;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.lang-switch a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.42rem 0.86rem;
  color: var(--brand-green);
  font-size: 0.92rem;
  font-weight: 600;
}

.lang-switch a.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--brand-green);
  border-radius: 8px;
  font-weight: 700;
  padding: 0.5rem 0.88rem;
  cursor: pointer;
}

.main-nav {
  border-top: 1px solid var(--border);
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 1.35rem;
}

.menu-item {
  position: relative;
}

.menu-item > a {
  display: inline-block;
  padding: 1rem 0;
  font-weight: 700;
  color: var(--brand-green);
  font-family: 'Barlow', sans-serif;
  font-size: 1.03rem;
}

.menu-item > a:hover {
  color: var(--brand);
}

.dropdown-panel,
.mega-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  pointer-events: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 25;
}

.dropdown-panel {
  min-width: 280px;
  padding: 0.6rem;
}

.dropdown-panel a {
  display: block;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  color: var(--brand-green);
  font-size: 0.92rem;
}

.dropdown-panel a:hover {
  background: #f3f8f4;
}

.mega-panel {
  min-width: 520px;
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.mega-panel h4 {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
  color: var(--brand-green);
}

.mega-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.mega-panel a {
  color: var(--brand-green);
}

.has-dropdown:hover .dropdown-panel,
.has-mega:hover .mega-panel,
.has-dropdown.is-open .dropdown-panel,
.has-mega.is-open .mega-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.site-main {
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  min-height: 52vh;
}

.flash {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
  background: #fff;
}

.flash.success {
  border-color: #b4e3ca;
  color: var(--success);
  background: #f0fff7;
}

.flash.error {
  border-color: #f3c3be;
  color: var(--error);
  background: #fff4f2;
}

.hero-slider {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  touch-action: pan-y;
}

.slides-track {
  display: flex;
  transition: transform 0.6s ease;
}

.slide-item {
  min-width: 100%;
  min-height: 470px;
  padding: 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.slide-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.75);
}

.slide-content {
  position: relative;
  z-index: 1;
  min-height: 470px;
  padding: 3.5rem 3.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 720px;
}

.slide-item h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.85rem);
  margin-bottom: 0.75rem;
}

.slide-item p {
  color: #ffffff;
  max-width: 630px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.btn,
button.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  padding: 0.64rem 1rem;
  cursor: pointer;
}

.btn:hover,
button.btn:hover {
  background: var(--brand-deep);
  color: #fff;
}

.btn.alt {
  background: #fff;
  color: var(--brand-green);
}

.slider-nav {
  position: absolute;
  inset-inline: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  z-index: 4;
}

.slider-nav button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-green);
  font-size: 1rem;
  cursor: pointer;
}

.slider-dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0.9rem;
  z-index: 4;
  display: flex;
  gap: 0.45rem;
}

.slider-dots button {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
}

.slider-dots button.active {
  width: 24px;
  background: #fff;
}

.product-photo-carousel {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 1rem;
  touch-action: pan-y;
}

.product-photo-slide {
  min-width: 100%;
  background: #fff;
}

.product-photo-slide img {
  width: 100%;
  height: clamp(240px, 34vw, 520px);
  object-fit: contain;
  display: block;
  background: #fff;
}

.intro-panel,
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.section-head {
  margin: 2rem 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.section-head h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
}

.section-head p {
  color: var(--muted);
  margin: 0;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.highlight-card {
  background: linear-gradient(135deg, #fff2f1, #f3f8f4);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
}

.highlight-card h3 {
  font-size: 1.08rem;
}

.highlight-card p {
  color: var(--muted);
  margin: 0;
}

.product-card img,
.news-card img {
  width: 100%;
  height: 220px;
  border-radius: 10px;
  object-fit: cover;
  margin-bottom: 0.8rem;
}

.product-card small,
.news-card small {
  color: var(--muted);
}

.rich-content {
  color: var(--text);
}

.rich-content p,
.rich-content li {
  color: var(--text);
}

.filter-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-row a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.34rem 0.8rem;
  font-size: 0.86rem;
  color: var(--brand-green);
}

.filter-row a.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.product-view {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.2rem;
}

.product-gallery {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.product-gallery .gallery-main {
  position: relative;
  overflow: hidden;
}

.product-gallery .gallery-main-track {
  display: flex;
  transition: transform 0.45s ease;
}

.product-gallery .gallery-main-track img {
  min-width: 100%;
  height: 450px;
  object-fit: cover;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.55rem;
  background: #f3f8f4;
}

.gallery-thumbs button {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 0;
  cursor: pointer;
}

.gallery-thumbs button img {
  width: 100%;
  height: 64px;
  object-fit: cover;
  display: block;
  border-radius: 7px;
}

.gallery-thumbs button.active {
  border-color: var(--brand);
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 0.8rem 1rem;
  font-weight: 700;
  list-style: none;
}

.faq-item .answer {
  padding: 0 1rem 1rem;
  color: var(--text);
}

.about-visual-stack {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.about-visual-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #f7fcf8);
  padding: 1rem;
}

.about-visual-item.reverse .about-visual-media {
  order: 2;
}

.about-visual-item.reverse .about-visual-copy {
  order: 1;
}

.about-visual-media img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 12px;
}

.about-visual-copy h3 {
  font-size: 1.35rem;
}

.about-visual-caption {
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.about-gallery-block {
  margin-top: 1.4rem;
}

.about-gallery-grid {
  columns: 3;
  column-gap: 0.9rem;
  margin-top: 0.8rem;
}

.about-gallery-item {
  break-inside: avoid;
  margin: 0 0 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.about-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

.about-gallery-item figcaption {
  padding: 0.55rem 0.65rem 0.7rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.legal-document {
  padding: 1.35rem;
}

.legal-precedence-notice {
  border: 1px solid #f3c3be;
  background: #fff4f2;
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  margin: 0.8rem 0 1rem;
}

.legal-precedence-notice p {
  margin: 0.2rem 0;
  font-weight: 600;
  color: #8f1f17;
}

.legal-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fcf9;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
}

.legal-meta-grid p {
  margin: 0;
}

.legal-reference-link {
  margin: 0.3rem 0 1rem;
  font-weight: 700;
}

.legal-reference-link a {
  text-decoration: underline;
}

.legal-document-body h2,
.legal-document-body h3 {
  margin-top: 1.15rem;
}

.legal-document-body h2 {
  font-size: 1.22rem;
  color: var(--brand-green);
}

.legal-document-body h3 {
  font-size: 1.06rem;
}

.legal-document-body ul,
.legal-document-body ol {
  margin: 0.45rem 0 1rem 1.2rem;
}

.resource-hub-intro {
  margin-bottom: 1rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.resource-card {
  padding: 0;
  overflow: hidden;
}

.resource-card-media {
  display: block;
}

.resource-card-media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.resource-card-body {
  padding: 1rem;
}

.resource-meta {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.resource-card h2,
.resource-card h3 {
  margin-bottom: 0.45rem;
}

.resource-post {
  padding: 0;
  overflow: hidden;
}

.resource-post-hero {
  width: 100%;
  height: clamp(220px, 36vw, 420px);
  object-fit: cover;
  display: block;
}

.resource-post-head,
.resource-post-body {
  padding: 1.1rem 1.2rem;
}

.resource-post-head {
  border-bottom: 1px solid var(--border);
}

.resource-post-body {
  font-size: 1.02rem;
  line-height: 1.75;
}

.contact-page {
  width: 100%;
}

.form-type-selector {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
  padding: 0.3rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f3f8f4;
  max-width: 100%;
}

.form-type-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  border-radius: 9px;
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.form-type-option:hover {
  color: var(--brand-green);
}

.form-type-option.is-active {
  color: var(--brand-green);
  background: #fff;
  border-color: var(--border);
}

.form-container {
  width: 100%;
}

.contact-grid {
  display: flex;
  align-items: stretch;
  gap: 1rem;
}

.contact-grid > .card {
  flex: 1 1 0;
  min-width: 0;
}

.contact-company-name {
  font-weight: 700;
  margin: 0 0 1.1rem;
}

.contact-detail-line {
  margin: 0 0 0.8rem;
}

.form-row {
  margin-bottom: 0.85rem;
}

.form-label {
  display: block;
  margin: 0 0 0.35rem;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 0.62rem 0.72rem;
  font: inherit;
}

textarea {
  resize: vertical;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.table th,
.table td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.62rem;
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

.table th {
  background: #f3f8f4;
}

.map-card {
  display: flex;
  flex-direction: column;
}

.map-wrapper {
  flex: 1;
  min-height: 420px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.map-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.catalogue-pdf-viewer {
  margin-top: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.catalogue-pdf-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem;
  border-bottom: 1px solid var(--border);
  background: #f3f8f4;
}

.catalogue-pdf-toolbar .btn.alt {
  min-height: 36px;
  padding: 0.45rem 0.72rem;
}

.catalogue-pdf-toolbar [data-pdf-page-info],
.catalogue-pdf-toolbar [data-pdfjs-page-info] {
  min-width: 68px;
  text-align: center;
  font-weight: 700;
  color: var(--brand-green);
}

.catalogue-preview-frame {
  width: 100%;
  min-height: 640px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0.8rem;
  overflow: auto;
  background: #fff;
}

.catalogue-preview-frame canvas {
  display: block;
  max-width: none;
  border: 1px solid #e6efe9;
  box-shadow: 0 8px 20px rgba(8, 82, 49, 0.08);
}

.catalogue-pdf-viewer [data-pdf-status],
.catalogue-pdf-viewer [data-pdfjs-status] {
  margin: 0;
  padding: 0.45rem 0.8rem 0.7rem;
}

.catalogue-legal-notice {
  margin: 0.85rem 0 0.25rem;
  padding: 0.55rem 0.7rem;
  border-left: 4px solid var(--brand-green);
  background: #f3f8f4;
  border-radius: 8px;
  color: var(--muted);
}

.catalogue-legal-notice a {
  font-weight: 700;
}

.brand-strip {
  --brand-strip-height-desktop: 70px;
  --brand-strip-height-mobile: 50px;
  margin-top: 2rem;
  margin-bottom: 1.2rem;
  overflow: hidden;
  padding: 0.2rem 0;
  background: #fff;
}

.brand-strip-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: brandStripLoop 34s linear infinite;
  will-change: transform;
}

.brand-strip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand-item {
  flex: 0 0 auto;
  height: var(--brand-strip-height-desktop);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
}

.brand-item img {
  display: block;
  width: auto;
  height: 100%;
  object-fit: contain;
  filter: none;
  transition: transform 220ms ease;
}

.brand-item:hover img {
  transform: translateY(-1px);
}

@keyframes brandStripLoop {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.site-footer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  column-gap: 48px;
  row-gap: 1.2rem;
  padding-top: 1.5rem;
  padding-bottom: 2.3rem;
}

.site-footer > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: start;
  gap: 0.45rem;
  padding: 0.1rem 0;
}

.site-footer h4 {
  margin: 0 0 0.3rem;
  min-height: 1.25rem;
}

.site-footer a {
  display: block;
  margin: 0;
  line-height: 1.45;
}

.site-footer p {
  margin: 0;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.52rem;
  margin-top: 0.1rem;
}

.social-links a {
  min-width: 36px;
  min-height: 36px;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3f8f4;
  border: 1px solid var(--border);
}

.social-links a span {
  color: var(--brand-green);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
}

.social-links img,
.footer-social img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.footer-legal {
  border-top: 1px solid var(--border);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  padding: 0.9rem 0 2rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-legal p {
  margin: 0.2rem 0;
}

.consent-row label {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.45rem;
  line-height: 1.5;
}

.consent-row input[type='checkbox'] {
  width: auto;
  margin-top: 0.18rem;
}

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: min(980px, calc(100vw - 1.5rem));
  z-index: 90;
  display: none;
}

.cookie-banner.is-visible {
  display: block;
}

.cookie-banner-inner {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 20px 45px rgba(8, 82, 49, 0.18);
  padding: 1rem;
}

.cookie-banner-inner h4 {
  margin-bottom: 0.45rem;
}

.cookie-banner-inner p {
  margin-bottom: 0.65rem;
  color: var(--muted);
}

.cookie-category-list {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
}

.cookie-category-list li {
  margin-bottom: 0.4rem;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.cookie-policy-link {
  font-weight: 700;
}

.cookie-customize-panel {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.45rem;
}

.cookie-customize-panel label {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.cookie-customize-panel input[type='checkbox'] {
  width: auto;
  margin-top: 0.2rem;
}

/* CMS */
.admin-shell {
  width: min(1280px, 96vw);
  margin: 1.5rem auto;
}

.admin-topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}

.admin-brand-block h1 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
}

.admin-brand-block .muted {
  margin: 0.3rem 0 0;
}

.admin-user-panel {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-left: auto;
}

.admin-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #fff;
  flex: 0 0 auto;
}

.admin-user-meta {
  min-width: 0;
}

.admin-user-name {
  margin: 0;
  font-weight: 700;
  color: var(--brand-green);
}

.admin-user-email {
  margin: 0.08rem 0 0;
  font-size: 0.86rem;
  color: var(--muted);
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-logout-form {
  margin: 0;
}

.admin-logout-btn {
  min-height: 38px;
  padding: 0.52rem 0.95rem;
}

.admin-users-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.admin-users-toolbar h2 {
  margin: 0;
}

.admin-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.8rem 0;
}

.admin-menu a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  font-size: 0.84rem;
  color: var(--brand-green);
}

.admin-menu a.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.muted {
  color: var(--muted);
}

.avatar-editor {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  background: #f3f8f4;
}

#avatar-crop-canvas {
  width: 280px;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: move;
  display: block;
}

@media (max-width: 1120px) {
  .site-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .header-main {
    align-items: flex-start;
    padding: 0.85rem 0;
  }

  .brand img {
    width: 58px;
    height: 58px;
  }

  .brand-name-en {
    font-size: 1rem;
  }

  .brand-name-th {
    font-size: 0.82rem;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
  }

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

  .menu-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.6rem 0.8rem 1rem;
  }

  .menu-item > a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.72rem 0.9rem;
    border-radius: 10px;
  }

  .menu-item > a:hover {
    background: #f3f8f4;
  }

  .dropdown-panel,
  .mega-panel {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    box-shadow: none;
    border: 1px solid var(--border);
    margin-bottom: 0.7rem;
    display: none;
  }

  .has-dropdown.is-open .dropdown-panel,
  .has-mega.is-open .mega-panel {
    display: block;
  }

  .mega-panel {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .dropdown-panel a,
  .mega-panel a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.68rem 0.78rem;
  }

  .grid.three,
  .product-view,
  .legal-meta-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .admin-topbar {
    align-items: flex-start;
  }

  .admin-user-panel {
    width: 100%;
    margin-left: 0;
  }

  .admin-user-email {
    max-width: 100%;
    white-space: normal;
  }

  .admin-users-toolbar {
    align-items: flex-start;
  }

  .slide-item {
    min-height: 390px;
  }

  .slide-content {
    min-height: 390px;
    padding: 2.6rem 1.5rem;
  }

  .gallery-thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .about-visual-item,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .about-gallery-grid {
    columns: 2;
  }

  .about-visual-item.reverse .about-visual-media,
  .about-visual-item.reverse .about-visual-copy {
    order: initial;
  }
}

@media (max-width: 768px) {
  .form-type-selector {
    width: 100%;
    flex-wrap: wrap;
  }

  .form-type-option {
    flex: 1 1 0;
    min-width: 0;
  }

  .contact-grid {
    flex-direction: column;
  }

  .map-wrapper {
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  .form-type-selector {
    display: grid;
    grid-template-columns: 1fr;
  }

  .form-type-option {
    width: 100%;
  }

  .header-main {
    gap: 0.55rem;
  }

  .brand img {
    width: 52px;
    height: 52px;
  }

  .brand-name-en {
    font-size: 0.88rem;
  }

  .brand-name-th {
    font-size: 0.75rem;
  }

  .lang-switch a {
    padding: 0.36rem 0.7rem;
    font-size: 0.84rem;
  }

  .slide-item {
    min-height: 360px;
  }

  .slide-content {
    min-height: 360px;
    padding: 2.2rem 1.1rem;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .about-gallery-grid {
    columns: 1;
  }

  .brand-strip-track {
    animation-duration: 26s;
  }

  .brand-item {
    height: var(--brand-strip-height-mobile);
    padding: 0 0.7rem;
  }

  .catalogue-preview-frame {
    min-height: 420px;
    padding: 0.55rem;
  }

  .catalogue-pdf-toolbar {
    padding: 0.5rem;
  }

  .catalogue-pdf-toolbar [data-pdf-page-info] {
    min-width: 56px;
  }

  .cookie-banner {
    width: calc(100vw - 1rem);
    left: 0.5rem;
    right: 0.5rem;
    transform: none;
    bottom: 0.5rem;
  }

  .cookie-banner-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner-actions .btn,
  .cookie-banner-actions .cookie-policy-link {
    width: 100%;
    text-align: center;
  }

  .gallery-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* Remove leftover canvas boxes from PDF preview area when using PDFObject */
[data-pdf-viewer] #pdf-container canvas { display: none !important; }
