@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700&display=swap'); :root {
    --navy: #112e4a;
    --red: #d71920;
    --muted: #5f6f7e;
    --soft: #f1f5f8
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px
}

body {
    margin: 0;
    color: var(--navy);
    font-family: 'Noto Sans Thai',Tahoma,sans-serif;
    font-size: 16px;
    line-height: 1.8
}

a {
    color: inherit;
    text-decoration: none
}

button {
    font: inherit;
    cursor: pointer
}

img {
    max-width: 100%;
    display: block
}

.wrap {
    max-width: 1200px;
    margin: auto;
    padding: 80px 30px
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 48%) minmax(0, 52%);
    min-height: 630px;
    background: linear-gradient(115deg,#f1f6fb,#fff);
    overflow: hidden
}

.hero-copy {
    padding: 80px 55px 65px max(30px,calc((100vw - 1140px)/2));
    position: relative;
    z-index: 1
}

.eyebrow {
    font-size: 13px;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--red);
    display: block;
    margin-bottom: 18px
}

h1 {
    font-size: clamp(58px,7vw,100px);
    line-height: 1;
    letter-spacing: -3px;
    margin: 12px 0 24px
}

h1 span {
    display: block;
    font-size: clamp(26px,2.7vw,38px);
    line-height: 1.55;
    letter-spacing: 0;
    margin-top: 24px
}

h2 {
    font-size: clamp(28px,3.2vw,42px);
    line-height: 1.5;
    margin: 0 0 34px;
    font-weight: 700
}

h3 {
    font-size: 21px;
    line-height: 1.55;
    margin: 0 0 14px
}

p {
    color: var(--muted);
    margin: 0 0 20px
}

.hero-copy p {
    max-width: 420px
}

.button {
    display: inline-block;
    background: var(--red);
    color: white;
    padding: 13px 24px;
    border-radius: 4px;
    font-weight: 600
}

.textlink {
    display: inline-block;
    margin: 20px
}

.hero-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 0 28px 20px;
    min-width: 0;
    overflow: hidden
}

.hero-image img {
    width: 100%;
    max-width: 100%;
    height: 570px;
    object-fit: cover;
    object-position: center
}

.image-label {
    position: absolute;
    bottom: 38px;
    right: 40px;
    letter-spacing: 2px;
    font-size: 12px;
    color: #778898
}

.pillars {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    max-width: 1140px;
    margin: 0 auto;
    border-bottom: 1px solid #dbe3eb;
    padding: 30px 0
}

.pillars a {
    display: flex;
    gap: 22px;
    padding: 0 30px;
    border-right: 1px solid #dbe3eb
}

.pillars a:last-child {
    border: 0
}

.pillars b {
    color: var(--red);
    font-size: 30px
}

.pillars strong {
    display: block;
    font-size: 20px
}

.pillars span {
    font-size: 14px;
    color: var(--muted)
}

.structure {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center
}

.structure img {
    max-height: 410px;
    margin: auto;
    object-fit: contain
}

.dark {
    background: var(--navy);
    color: white
}

.dark .eyebrow {
    color: #ff9398
}

.dark p,.dark small {
    color: #cedae4
}

.test {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 36px;
    align-items: center;
    border-top: 1px solid #ffffff25;
    border-bottom: 1px solid #ffffff25;
    padding: 28px 0;
    margin-bottom: 36px
}

.big {
    font-size: 100px;
    font-weight: 700;
    line-height: 1
}

.big span {
    font-size: 50px;
    color: #ff6269
}

.grid3 {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 24px
}

.grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px
}

.card {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 35px #112e4a08
}

.card img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    background: #e9f0f5
}

.card>div {
    padding: 26px
}

.card p {
    font-size: 16px;
    margin: 0
}

.dark .card {
    background: #1c3d59
}

.dark h3 {
    color: white
}

.soft {
    background: var(--soft)
}

.layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 55px;
    align-items: center;
    margin-bottom: 40px
}

.layout img {
    height: 460px;
    width: 100%;
    object-fit: cover;
    border-radius: 6px
}

.layout li {
    padding: 5px 0
}

.spec-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 45px;
    align-items: start
}

.spec-layout img {
    max-height: 660px;
    width: 100%;
    object-fit: contain
}

.spec-layout small {
    display: block;
    color: var(--muted);
    margin-top: 18px
}

small {
    font-size: 14px
}

dl {
    margin: 0;
    display: grid;
    grid-template-columns: 38% 62%
}

dt,dd {
    margin: 0;
    border-bottom: 1px solid #e2e8ee;
    padding: 15px 10px;
    font-size: 15px
}

dt {
    font-weight: 600
}

dd {
    color: var(--muted)
}

.equipment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 45px;
    padding: 32px;
    background: var(--soft);
    border-left: 4px solid var(--red)
}

.tag {
    display: inline-block;
    color: var(--red);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px
}

.gallery-tools {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    flex-wrap: wrap
}

.gallery-tools button {
    border: 1px solid #ced8e2;
    border-radius: 30px;
    padding: 8px 20px;
    color: var(--navy);
    background: white
}

.gallery-tools .active {
    background: var(--navy);
    color: white;
    border-color: var(--navy)
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 22px
}

.photo {
    padding: 0;
    background: white;
    border: 0;
    text-align: left;
    border-radius: 5px;
    overflow: hidden;
    color: var(--navy)
}

.photo img {
    height: 230px;
    width: 100%;
    object-fit: cover;
    transition: transform .3s
}

.photo:hover img {
    transform: scale(1.035)
}

.photo span {
    display: flex;
    justify-content: space-between;
    padding: 18px
}

.photo[hidden] {
    display: none
}

.standards {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 24px;
    margin: 40px 0
}

.standards div {
    border-top: 3px solid var(--red);
    padding: 25px;
    background: var(--soft)
}

.standards strong {
    display: block;
    font-size: 28px
}

.standards span {
    font-size: 15px
}

.service {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 55px;
    padding-top: 30px;
    border-top: 1px solid #dce4eb
}

.contact {
    background: var(--navy);
    color: white
}

.contact .wrap {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 90px
}

.contact p {
    color: #ccdae6
}

.contact .eyebrow {
    color: #ff9398
}

.phone {
    font-size: clamp(30px,4vw,49px);
    font-weight: 600;
    display: block;
    margin: 20px 0
}

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

.white {
    background: white;
    color: var(--navy)
}

address {
    font-style: normal;
    border-left: 1px solid #ffffff30;
    padding-left: 50px
}

address a {
    text-decoration: underline;
    text-underline-offset: 5px
}

footer {
    display: flex;
    justify-content: space-between;
    padding: 25px 5vw;
    font-size: 13px
}

dialog {
    border: 0;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    max-width: 90vw;
    max-height: 92vh;
    width: 1000px
}

dialog::backdrop {
    background: #061421db
}

dialog img {
    max-height: 75vh;
    margin: auto;
    object-fit: contain
}

dialog p {
    text-align: center;
    margin: 15px 0 0
}

.close {
    position: absolute;
    right: 10px;
    top: 5px;
    background: white;
    border: 0;
    border-radius: 50%;
    font-size: 32px;
    width: 40px;
    height: 40px;
    line-height: 1
}

a:focus-visible,button:focus-visible {
    outline: 3px solid #36a2ff;
    outline-offset: 4px
}


.hero-copy {
    min-width: 0;
    z-index: 2;
}
.hero-copy h1,
.hero-copy .eyebrow,
.hero-copy p,
.hero-copy .button,
.hero-copy .textlink {
    position: relative;
    z-index: 3;
}
@media(min-width:761px){
    .hero-copy { padding-right: 55px; }
}

@media(max-width: 1000px) {
    .hero-copy {
        padding-left: 30px
    }

    .grid3 {
        gap: 16px
    }

    .card>div {
        padding: 20px
    }
}

@media(max-width: 760px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: 0
    }

    .hero-copy {
        padding: 45px 24px 10px
    }

    .hero-image {
        padding: 20px 0 50px;
        overflow: visible
    }

    .hero-image img {
        max-width: 100%;
        width: 100%;
        height: auto;
        object-fit: contain
    }

    .image-label {
        bottom: 20px;
        right: 24px;
        font-size: 10px
    }

    .pillars {
        grid-template-columns: 1fr;
        padding: 15px 24px
    }

    .pillars a {
        padding: 16px 0;
        border-right: 0;
        border-bottom: 1px solid #dbe3eb
    }

    .wrap {
        padding: 55px 24px
    }

    .structure,.layout,.spec-layout,.contact .wrap,.service {
        grid-template-columns: 1fr;
        gap: 28px
    }

    .structure img {
        max-height: 300px
    }

    .grid3,.grid2,.equipment {
        grid-template-columns: 1fr
    }

    .test {
        grid-template-columns: 1fr;
        gap: 22px
    }

    .big {
        font-size: 78px
    }

    .card img {
        height: 260px
    }

    .layout img {
        height: 380px
    }

    .gallery {
        grid-template-columns: 1fr 1fr;
        gap: 12px
    }

    .photo img {
        height: 160px
    }

    .photo span {
        padding: 12px;
        font-size: 14px
    }

    .standards {
        grid-template-columns: 1fr;
        gap: 12px
    }

    .standards div {
        padding: 18px
    }

    .equipment {
        gap: 25px;
        padding: 24px
    }

    address {
        padding: 25px 0 0;
        border-left: 0;
        border-top: 1px solid #ffffff30
    }

    footer {
        flex-direction: column;
        gap: 8px
    }

    h2 br {
        display: none
    }
}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto
    }

    .photo img {
        transition: none
    }
}


/* ===== FOOTER BROCHURE COLUMN ===== */
.contact .wrap {
    display: grid;
    grid-template-columns: 1.05fr .75fr .9fr;
    gap: 55px;
}

.brochure-download {
    min-width: 0;
}

.brochure-download .eyebrow {
    color: #ff9398;
    margin-bottom: 12px;
}

.brochure-card {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 12px;
    background: #173b59;
    border: 1px solid #ffffff22;
    border-radius: 5px;
}

.brochure-card img {
    width: 72px;
    height: 96px;
    flex: 0 0 72px;
    object-fit: cover;
    border-radius: 3px;
    background: #fff;
}

.brochure-info h3 {
    color: #fff;
    font-size: 14px;
    line-height: 1.35;
    margin: 0 0 5px;
}

.brochure-info p {
    color: #cbd9e4;
    font-size: 11px;
    line-height: 1.55;
    margin: 0 0 9px;
}

.brochure-btn {
    display: inline-block;
    background: var(--red);
    color: #fff;
    padding: 7px 10px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
}

.brochure-btn:hover {
    filter: brightness(1.08);
}

@media(max-width:760px) {
    .contact .wrap {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .brochure-card {
        max-width: 430px;
    }
}


/* ===== HERO FADE SLIDER ===== */
.hero-slider {
    position: relative;
    height: 570px;
    min-width: 0;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s ease-in-out;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.hero-dots {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    padding: 6px 9px;
    border-radius: 20px;
    background: rgba(16,45,74,.28);
    backdrop-filter: blur(4px);
}

.hero-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.55);
    cursor: pointer;
    transition: .25s ease;
}

.hero-dot.active {
    width: 22px;
    border-radius: 8px;
    background: #fff;
}

@media(max-width:760px) {
    .hero-slider {
        height: auto;
        aspect-ratio: 16 / 10;
        min-height: 260px;
    }
    .hero-slide img {
        object-fit: cover;
    }
}


/* ===== FINAL UI UPDATE ===== */

/* Footer */
.footer-grid {
    display: grid !important;
    grid-template-columns: 1.1fr .95fr .85fr;
    gap: 55px;
    align-items: start;
}
.footer-contact h2 {
    color: #fff;
    font-size: 32px;
    line-height: 1.1;
    margin: 12px 0 25px;
}
.footer-contact p,
.footer-company p {
    color: #d7e1e8;
    font-size: 11px;
    line-height: 1.75;
}
.footer-email {
    margin: -8px 0 4px !important;
    color: #fff !important;
}
.footer-company {
    border-left: 1px solid #31506b;
    padding-left: 42px;
}
.footer-company h3 {
    color: #fff;
    font-size: 16px;
    margin: 0 0 14px;
}
.route-link {
    color: #fff;
    text-decoration: underline;
    font-size: 11px;
}
.footer-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}
.footer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 20px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
}
.footer-btn.red {
    background: var(--red);
    color: #fff;
}
.footer-btn.light {
    background: #fff;
    color: var(--navy);
}
.footer-brochure {
    display: flex;
    justify-content: flex-start;
}
.brochure-card {
    width: 100%;
    max-width: 280px;
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 11px;
    background: #173b59;
    border: 1px solid #ffffff22;
    border-radius: 4px;
}
.brochure-card img {
    width: 72px;
    height: 96px;
    object-fit: cover;
    border-radius: 2px;
    background: #fff;
    flex: 0 0 72px;
}
.brochure-info h3 {
    color: #fff;
    font-size: 13px;
    line-height: 1.35;
    margin: 0 0 4px;
}
.brochure-info p {
    color: #cbd9e4;
    font-size: 9px;
    line-height: 1.45;
    margin: 0 0 8px;
}
.brochure-btn {
    display: inline-block;
    padding: 6px 9px;
    background: var(--red);
    color: #fff;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
}

/* Click-to-expand images */
.zoomable {
    cursor: zoom-in;
    position: relative;
}
.photo.zoomable {
    width: 100%;
    border: 0;
    padding: 0;
}
.zoom-icon {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(16,45,74,.75);
    color: #fff;
    font-size: 18px;
    line-height: 1;
}

/* Explore gallery */
.gallery-image {
    width: 100%;
    height: 150px;
    padding: 0;
    border: 0;
    display: block;
    overflow: hidden;
    cursor: zoom-in;
    background: #eef1f3;
}
.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.gallery-image:hover img {
    transform: scale(1.04);
}
.show-more-gallery {
    display: block;
    margin: 20px auto 0;
    padding: 9px 20px;
    background: #fff;
    border: 1px solid #bfcbd3;
    color: var(--navy);
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}
.show-more-gallery:hover {
    border-color: var(--red);
    color: var(--red);
}

/* Lightbox */
.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 35px;
    background: rgba(3,12,20,.88);
}
.image-lightbox.open {
    display: flex;
}
.image-lightbox img {
    max-width: min(92vw, 1200px);
    max-height: 88vh;
    object-fit: contain;
    box-shadow: 0 15px 50px rgba(0,0,0,.4);
}
.lightbox-close {
    position: fixed;
    top: 22px;
    right: 25px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--navy);
    font-size: 27px;
    cursor: pointer;
}

/* Back to top */
#backToTop {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 150;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 4px;
    background: var(--red);
    color: #fff;
    font-size: 21px;
    line-height: 1;
    display: grid;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: .25s ease;
    cursor: pointer;
    box-shadow: 0 5px 18px rgba(0,0,0,.18);
}
#backToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#backToTop:hover {
    background: var(--navy);
}

@media(max-width:760px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 28px;
    }
    .footer-company {
        border-left: 0;
        border-top: 1px solid #31506b;
        padding: 25px 0 0;
    }
    .footer-brochure {
        justify-content: flex-start;
    }
}


/* =========================================================
   ABL-SD FIXED UI OVERRIDES
   These selectors match the actual HTML structure.
   ========================================================= */

/* Footer: Contact | Company | Brochure */
.contact .footer-grid {
  display: grid !important;
  grid-template-columns: minmax(0,1.15fr) minmax(230px,.85fr) minmax(260px,.9fr) !important;
  grid-template-areas: "contact company brochure";
  gap: 55px !important;
  align-items: start;
}
.contact .footer-contact { grid-area: contact; }
.contact .footer-company {
  grid-area: company;
  border-left: 1px solid #ffffff30;
  padding-left: 42px;
}
.contact .footer-brochure { grid-area: brochure; }
.contact .footer-email {
  color: #fff !important;
  font-size: 13px;
  margin: -12px 0 8px !important;
}
.contact .footer-brochure > .eyebrow {
  margin-bottom: 12px;
}
.contact .brochure-card {
  width: 100%;
  max-width: 290px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px;
  background: #173b59;
  border: 1px solid #ffffff22;
  border-radius: 5px;
}
.contact .brochure-card img {
  width: 72px;
  height: 96px;
  flex: 0 0 72px;
  object-fit: cover;
  border-radius: 3px;
}
.contact .brochure-info h3 {
  color: #fff;
  font-size: 13px;
  margin: 0 0 4px;
}
.contact .brochure-info p {
  color: #cbd9e4;
  font-size: 9px;
  line-height: 1.5;
  margin: 0 0 8px;
}
.contact .brochure-btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  padding: 6px 9px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
}

/* Gallery filter buttons */
.gallery-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: -8px 0 28px;
}
.gallery-filters button {
  border: 1px solid #ced8e2;
  border-radius: 30px;
  padding: 8px 20px;
  color: var(--navy);
  background: #fff;
  font-size: 14px;
}
.gallery-filters button:hover {
  color: var(--red);
  border-color: var(--red);
}
.gallery-filters button.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.gallery figure {
  margin: 0;
  min-width: 0;
}
.gallery-image {
  width: 100%;
  height: 230px;
  padding: 0;
  border: 0;
  display: block;
  overflow: hidden;
  cursor: zoom-in;
  background: #e9f0f5;
}
.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.gallery-image:hover img { transform: scale(1.035); }
.gallery figcaption {
  padding: 13px 4px 0;
  font-size: 14px;
  color: var(--navy);
}
.show-more-gallery {
  display: block;
  margin: 25px auto 0;
  padding: 10px 22px;
  border: 1px solid #cbd6df;
  border-radius: 4px;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}
.show-more-gallery:hover {
  border-color: var(--red);
  color: var(--red);
}

/* Hygiene image zoom */
#clean .card img.zoomable {
  cursor: zoom-in;
  transition: transform .3s ease;
}
#clean .card:hover img.zoomable {
  transform: scale(1.025);
}

/* Lightbox image */
#lightbox {
  border: 0;
  border-radius: 8px;
  padding: 20px;
  width: min(1000px, 92vw);
  max-width: 92vw;
  max-height: 92vh;
}
#lightbox::backdrop { background: rgba(6,20,33,.88); }
#lightbox #large {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  margin: auto;
}
#lightbox .close {
  z-index: 2;
  cursor: pointer;
}
#lightbox #caption {
  text-align: center;
  font-size: 13px;
  margin: 12px 0 0;
}

/* Back-to-top */
#backToTop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-size: 22px;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: .25s ease;
  box-shadow: 0 5px 18px rgba(0,0,0,.2);
}
#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#backToTop:hover { background: var(--navy); }

@media(max-width:760px) {
  .contact .footer-grid {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "contact"
      "company"
      "brochure";
    gap: 28px !important;
  }
  .contact .footer-company {
    border-left: 0;
    border-top: 1px solid #ffffff30;
    padding: 25px 0 0;
  }
  .contact .brochure-card { max-width: 430px; }
  .gallery-image { height: 180px; }
}


/* =========================================================
   FIX: Gallery "ดูเพิ่มเติม" + คลิกขยายทุกภาพ + Footer 3 คอลัมน์
   ========================================================= */
.gallery figure[hidden] { display: none !important; }

main img.zoomable { cursor: zoom-in; }
main img.zoomable:focus-visible {
  outline: 3px solid #36a2ff;
  outline-offset: 3px;
}

/* Footer text (กันตัวหนังสือเล็กเกินจาก rule เก่า) */
.contact .footer-contact p,
.contact .footer-company p {
  font-size: 14px;
  line-height: 1.8;
  color: #ccdae6;
}
.contact .footer-contact .phone { margin: 20px 0 4px; }
.contact .footer-email {
  display: inline-block;
  margin: 0 0 22px !important;
  font-size: 16px;
  font-weight: 600;
  color: #fff !important;
}
.contact .footer-email:hover { text-decoration: underline; text-underline-offset: 5px; }
.contact .footer-company { font-style: normal; }
.contact .footer-company a { color: #fff; }
.contact .footer-brochure { display: block; }

/* ฟอนต์อังกฤษ */
html[lang="en"] body {
  font-family: 'Noto Sans', 'Noto Sans Thai', Tahoma, sans-serif;
}
html[lang="en"] h1 span,
html[lang="en"] h2 { line-height: 1.3; }


/* =========================================================
   SITE HEADER — ชั้น 1 เมนูหลัก + ชั้น 2 เมนูประจำรุ่น
   ========================================================= */
:root { --header-h: 76px; --subnav-h: 52px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 4px;
}
.skip-link:focus { top: 12px; }

/* ---- แถบบนสุด ---- */
.topbar { background: var(--navy); color: #d7e1e8; font-size: 12px; }
.topbar-in {
  max-width: 1280px; margin: auto; padding: 0 4vw;
  height: 36px; display: flex; align-items: center; justify-content: flex-end; gap: 22px;
}
.topbar a:hover { color: #fff; }
.topbar .lang-switch { border-color: #ffffff40; }
.topbar .lang-switch button { background: transparent; color: #d7e1e8; }
.topbar .lang-switch button + button { border-left-color: #ffffff40; }
.topbar .lang-switch button[aria-pressed="true"] { background: #fff; color: var(--navy); }

/* ---- Lang switch ---- */
.lang-switch { display: flex; border: 1px solid #ced8e2; border-radius: 4px; overflow: hidden; flex: 0 0 auto; }
.lang-switch button {
  border: 0; background: #fff; color: var(--navy);
  font-size: 11px; font-weight: 700; letter-spacing: .5px; padding: 5px 9px; line-height: 1;
}
.lang-switch button + button { border-left: 1px solid #ced8e2; }
.lang-switch button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.lang-mobile { display: none; }

/* ---- Header หลัก ---- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: #fff; border-bottom: 1px solid #e5ebf0;
  transition: transform .3s ease;
}
body.hdr-hidden .site-header { transform: translateY(-100%); }
.sh-in {
  max-width: 1280px; margin: auto; padding: 0 4vw;
  height: var(--header-h); display: flex; align-items: center; gap: 28px;
}
.brand img { width: 165px; max-height: 50px; object-fit: contain; }

.main-nav { flex: 1; display: flex; align-items: center; gap: 20px; }
.mn-list { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; align-items: center; gap: 4px; }
.mn-item { position: relative; }
.mn-item.has-mega { position: static; }

.mn-trigger, .mn-link {
  display: flex; align-items: center; gap: 6px;
  height: var(--header-h); padding: 0 12px;
  border: 0; background: none; color: var(--navy);
  font-size: 15px; font-weight: 600; white-space: nowrap;
}
.mn-trigger::after {
  content: ""; width: 6px; height: 6px; margin-top: -3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform .2s ease;
}
.mn-trigger[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 3px; }
.mn-trigger:hover, .mn-link:hover, .mn-trigger[aria-expanded="true"] { color: var(--red); }
.mn-trigger.is-current { box-shadow: inset 0 -3px 0 var(--red); }

.mn-cta {
  background: var(--red); color: #fff; padding: 10px 18px; border-radius: 4px;
  font-size: 14px; font-weight: 700; white-space: nowrap;
}
.mn-cta:hover { background: #b9151b; }
.mn-mobile-extra { display: none; }

/* ---- Dropdown เล็ก ---- */
.drop {
  display: none; position: absolute; top: 100%; left: 0; min-width: 250px;
  background: #fff; border: 1px solid #e5ebf0; border-top: 3px solid var(--red);
  border-radius: 0 0 6px 6px; padding: 8px; box-shadow: 0 18px 40px #112e4a1f;
}
.mn-trigger[aria-expanded="true"] + .drop { display: block; }
.drop a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 4px; font-size: 14px;
}
.drop a:hover { background: var(--soft); color: var(--red); }
.drop small, .mega small { font-size: 11px; color: var(--muted); font-weight: 500; }

/* ---- Mega menu ---- */
.mega {
  display: none; position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-top: 1px solid #e5ebf0;
  box-shadow: 0 24px 50px #112e4a24;
}
.mn-trigger[aria-expanded="true"] + .mega { display: block; }
.mega-in {
  max-width: 1280px; margin: auto; padding: 30px 4vw 26px;
  display: grid; grid-template-columns: 250px repeat(3, minmax(0, 1fr)); gap: 40px;
}
.mega-col h3 {
  font-size: 13px; color: var(--muted); font-weight: 600;
  margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px solid #e5ebf0;
}
.mega-col ul { list-style: none; margin: 0; padding: 0; }
.mega-col a {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px;
  padding: 6px 0; font-size: 15px; font-weight: 500;
}
.mega-col a:hover { color: var(--red); }
.mega-col a[aria-current="page"] { color: var(--red); font-weight: 700; }
.mega em, .mf-tag {
  font-style: normal; font-size: 11px; font-weight: 700; color: var(--red);
  background: #fdecec; padding: 1px 7px; border-radius: 3px; line-height: 1.6;
}
.mega-col small { flex-basis: 100%; line-height: 1.3; }

.mega-feature {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  background: var(--soft); border-radius: 6px; padding: 12px 12px 16px;
}
.mega-feature img { width: 100%; height: 130px; object-fit: cover; border-radius: 4px; margin-bottom: 8px; }
.mega-feature strong { font-size: 22px; line-height: 1.2; }
.mf-desc { font-size: 13px; color: var(--muted); }
.mf-here { font-size: 12px; font-weight: 600; color: var(--red); margin-top: 4px; }

.mega-foot {
  max-width: 1280px; margin: auto; padding: 14px 4vw 18px;
  display: flex; gap: 28px; border-top: 1px solid #e5ebf0; font-size: 14px; font-weight: 600;
}
.mega-foot a { color: var(--navy); }
.mega-foot a:hover { color: var(--red); }

/* ---- ชั้น 2: Sub-nav ---- */
.subnav {
  position: sticky; top: var(--header-h); z-index: 50;
  background: #f7f9fbf2; backdrop-filter: blur(10px);
  border-bottom: 1px solid #e5ebf0; transition: top .3s ease;
}
body.hdr-hidden .subnav { top: 0; }
.subnav-in {
  max-width: 1280px; margin: auto; padding: 0 4vw;
  height: var(--subnav-h); display: flex; align-items: center; gap: 24px;
}
.subnav-model { font-weight: 700; font-size: 17px; color: var(--navy); white-space: nowrap; }
.subnav-links {
  display: flex; gap: 22px; flex: 1; overflow-x: auto; scrollbar-width: none;
  font-size: 14px; font-weight: 500; color: var(--muted);
}
.subnav-links::-webkit-scrollbar { display: none; }
.subnav-links a { white-space: nowrap; padding: 14px 0; box-shadow: inset 0 -2px 0 transparent; }
.subnav-links a:hover { color: var(--navy); }
.subnav-links a.active { color: var(--red); box-shadow: inset 0 -2px 0 var(--red); }
.subnav-cta {
  background: var(--red); color: #fff; padding: 7px 14px; border-radius: 4px;
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.subnav-cta:hover { background: #b9151b; }

html { scroll-padding-top: calc(var(--subnav-h) + 16px); }

/* ---- Hamburger ---- */
.mn-toggle {
  display: none; width: 42px; height: 42px; border: 0; background: none; padding: 9px;
  flex-direction: column; justify-content: space-between;
}
.mn-toggle span { display: block; height: 2px; background: var(--navy); border-radius: 2px; transition: .25s ease; }
.site-header.nav-open .mn-toggle span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.site-header.nav-open .mn-toggle span:nth-child(2) { opacity: 0; }
.site-header.nav-open .mn-toggle span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* ---- แถบติดต่อด่วนมือถือ ---- */
.mobile-actions { display: none; }

/* ---- จอเล็กกว่า 1100px: เมนูหลักแบบลิ้นชัก ---- */
@media (max-width: 1100px) {
  :root { --header-h: 66px; }
  .topbar { display: none; }
  .lang-mobile { display: flex; margin-left: auto; }
  .mn-toggle { display: flex; }
  .brand img { width: 140px; }

  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
    overflow-y: auto; background: #fff;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 32px;
    border-top: 1px solid #e5ebf0;
  }
  .site-header.nav-open .main-nav { display: flex; }
  .mn-list { flex-direction: column; align-items: stretch; margin: 0; gap: 0; }
  .mn-item, .mn-item.has-mega { position: static; border-bottom: 1px solid #e5ebf0; }
  .mn-trigger, .mn-link { width: 100%; height: 56px; padding: 0; justify-content: space-between; font-size: 17px; }
  .mn-trigger.is-current { box-shadow: none; color: var(--red); }

  .drop, .mega {
    position: static; box-shadow: none; border: 0; border-radius: 0; padding: 0 0 14px; min-width: 0;
  }
  .drop a { padding: 10px 12px; }
  .mega-in { grid-template-columns: 1fr; gap: 18px; padding: 0; }
  .mega-feature { display: none; }
  .mega-col h3 { margin-bottom: 4px; }
  .mega-col ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); column-gap: 18px; }
  .mega-foot { flex-direction: column; gap: 10px; padding: 14px 0 0; }

  .mn-cta { margin-top: 22px; text-align: center; padding: 14px; font-size: 16px; }
  .mn-mobile-extra {
    display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px;
    font-size: 14px; font-weight: 600; color: var(--muted);
  }
  body.nav-locked { overflow: hidden; }
}

@media (max-width: 760px) {
  :root { --subnav-h: 46px; }
  .subnav-in { gap: 14px; padding: 0 16px; }
  .subnav-model { font-size: 15px; }
  .subnav-links { gap: 18px; font-size: 13px; }
  .main-nav { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }

  .mobile-actions {
    display: grid; grid-template-columns: 1fr 1fr 1.6fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: #fff; border-top: 1px solid #e5ebf0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); gap: 8px;
  }
  .mobile-actions a {
    display: flex; align-items: center; justify-content: center; height: 44px;
    border: 1px solid #ced8e2; border-radius: 4px; font-size: 14px; font-weight: 700; color: var(--navy);
  }
  .mobile-actions .ma-cta { background: var(--red); border-color: var(--red); color: #fff; }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
  #backToTop { bottom: calc(74px + env(safe-area-inset-bottom, 0px)); right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header, .subnav, .mn-toggle span { transition: none; }
}

/* ===== Sub-nav: พื้นกรมท่าเข้ม ตัวหนังสือขาว ===== */
.subnav {
  background: #0f2940;
  backdrop-filter: none;
  border-bottom: 0;
}
.subnav-model { color: #fff; }
.subnav-links { color: #ffffffb3; }
.subnav-links a:hover { color: #fff; }
.subnav-links a.active {
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--red);
}
/* ปุ่มโบรชัวร์: ขอบขาว ขนาดเล็ก */
.subnav-cta {
  background: transparent;
  color: #fff;
  border: 1px solid #ffffffcc;
  padding: 5px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  transition: background .2s ease, color .2s ease;
}
.subnav-cta:hover { background: #fff; color: #0f2940; }
.subnav a:focus-visible { outline-color: #fff; }

@media (max-width: 760px) {
  .subnav-cta { display: inline-flex; padding: 4px 10px; font-size: 12px; }
}


/* =========================================================
   EXPLORE ABL-SD — มุมมอง 360
   ========================================================= */
.gallery[hidden] { display: none !important; }

.gallery-filters .filter-360 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-color: var(--red);
  color: var(--red);
  font-weight: 600;
}
.badge-360 {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 20px;
  background: var(--red);
  color: #fff;
}
.gallery-filters .filter-360:hover { background: #fdecec; }
.gallery-filters .filter-360.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.gallery-filters .filter-360.active .badge-360 { background: #fff; color: var(--red); }

.view-360[hidden] { display: none; }
.view-360-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 78vh;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  background: #0f2940;
}
.view-360-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.view-360-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 14px;
}
.view-360-bar p { margin: 0; color: var(--muted); }
.view-360-bar a { font-weight: 600; color: var(--navy); white-space: nowrap; }
.view-360-bar a:hover { color: var(--red); }

@media (max-width: 760px) {
  .view-360-frame { aspect-ratio: 4 / 5; max-height: 70vh; }
}
