/* ===== รีเซ็ตพื้นฐาน ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'IBM Plex Sans Thai', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
    overflow-y: scroll;
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #f8fafc;
}

body {
    color: #1a1a1a;
    line-height: 1.6;
}

/* ===== ตัวแปรสี ===== */
:root {
    --font-thai: 'IBM Plex Sans Thai', sans-serif;
    --color-dark: #1a1a1a;
    --color-gray: #666666;
    --color-light-gray: #e5e5e5;
    --color-white: #ffffff;
    --color-accent: #e53e3e;
}

/* ===== ส่วนหัว ===== */
header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* คงเดิม */
    padding: 1rem 5%;
    border-bottom: 1px solid #eee;
    background-color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo img {
    height: 50px;
    object-fit: contain;
    display: block;
    margin-top: 4px;
}

/* ปรับเมนูรองรับมือถือ */
.menu {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.menu a {
    font-weight: 600;
    text-decoration: none;
    color: #4a5568;
    font-size: 1rem;
    transition: color 0.2s;
}
.menu a:hover,
.menu a.active {
    color: #000;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.search-icon {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.search-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
}

.lang-switch {
    display: flex;
}

.lang-btn {
    padding: 0.3rem 0.8rem;
    border: 1px solid #ddd;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    font-weight: 700;
}

.lang-btn.en {
    background-color: #fff;
    color: #333;
    border-radius: 4px 0 0 4px;
}

.lang-btn.en.active,
.lang-btn.th.active {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.lang-btn.th {
    background-color: #fff;
    color: #333;
    border-radius: 0 4px 4px 0;
}

/* ===== ปุ่มเมนูมือถือ ===== */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  z-index: 200;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #1a1a1a;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* เปลี่ยนเป็นกากบาทเมื่อเปิด */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ===== ส่วนหน้าแรก ===== */
main {
    padding: 2rem 5%;
    min-height: calc(100vh - 90px);
    display: flex;
    align-items: center;
    background-color: #f8fafc;
}

.content-inner {
    width: 100%;
}

main h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 1.5rem;
    color: #1a202c;
}

main p {
    color: #666;
    line-height: 2;
    font-size: 1rem;
}

/* ===== ส่วนบริการ ===== */
.services-section {
    padding: 5rem 5%;
    background-color: #ffffff;
}

.services-container {
    max-width: 1200px;
    margin: 0 auto;
}

.services-container h2 {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 3rem;
    color: #1a202c;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: #f8fafc;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #1a202c;
}

.service-card p {
    color: #666;
    line-height: 1.6;
}

/* ===== เกี่ยวกับเรา ===== */
.about-section {
    padding: 5rem 5%;
    background-color: #f8fafc;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 2rem;
    color: var(--color-accent);
    position: relative;
}

.about-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 60px;
    height: 3px;
    background-color: var(--color-accent);
}

.about-content p {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

.about-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    background-color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 120px;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    object-fit: cover;
}

/* ===== วิสัยทัศน์ & พันธกิจ ===== */
.vision-section {
    padding: 5rem 5%;
    background-color: #ffffff;
}

.vision-container {
    max-width: 1200px;
    margin: 0 auto;
}

.vision-main-title {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 3rem;
    color: #1a202c;
}

.vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.vision-card,
.mission-card {
    background-color: #f8fafc;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 3px solid var(--color-accent);
    transition: transform 0.3s ease;
}

.vision-card:hover,
.mission-card:hover {
    transform: translateY(-5px);
}

.card-title {
    font-size: 1.375rem;
    margin-bottom: 1.5rem;
    color: #1a202c;
}

.vision-card p {
    color: #4a5568;
    line-height: 1.8;
}

.mission-card ul {
    list-style: none;
    padding: 0;
}

.mission-card li {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 0.8rem;
    padding-left: 1.2rem;
    position: relative;
}

.mission-card li::before {
    content: "•";
    color: var(--color-accent);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* ===== ผลงาน ===== */
.portfolio-section {
    padding: 5rem 5%;
    background-color: #F8FAFC;
}

.portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
}

.portfolio-title {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 0.5rem;
    color: #1a202c;
}

.portfolio-subtitle {
    text-align: center;
    font-size: 1rem;
    color: #666;
    margin-bottom: 3rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.portfolio-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-img img {
    transform: scale(1.05);
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-info h3 {
    font-size: 1.15rem;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.portfolio-info p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== หน้าผลิตภัณฑ์ ===== */
.products-page main {
    background-color: transparent;
    min-height: calc(100vh - 90px);
    padding: 3rem 5%;
    display: block;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 2.5rem;
}

.breadcrumb a {
    color: #4a5568;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--color-accent);
}

.breadcrumb span {
    margin: 0 0.5rem;
}

.breadcrumb .current {
    color: #1a202c;
}

.page-heading {
    text-align: center;
    margin-bottom: 3rem;
    margin-top: 1rem;
}

.page-heading h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    color: #1a202c;
    margin-bottom: 0.3rem;
}

.page-heading p {
    color: #666;
    font-size: 1rem;
    margin-top: 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.category-card {
    display: block;
    text-decoration: none;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.category-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.category-info {
    padding: 1.5rem;
    text-align: center;
}

.category-info h3 {
    font-size: 1.15rem;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.category-info p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.view-more {
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
    color: var(--color-accent);
    font-weight: 500;
    transition: gap 0.2s ease;
}

.view-more .arrow {
    margin-left: 0.4rem;
    transition: transform 0.2s ease;
}

.category-card:hover .view-more .arrow {
    transform: translateX(3px);
}

/* ===== รายการสินค้า ===== */
.products-list-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 5%;
}

.products-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.filter-box {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.filter-box label {
    font-size: 0.95rem;
    color: #4a5568;
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    background-color: #fff;
    cursor: pointer;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    transition: opacity 0.2s ease;
}

.product-card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.product-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

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

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

.product-info {
    padding: 1.2rem;
}

.product-info h3 {
    font-size: 1rem;
    color: #1a202c;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.product-code {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 0.6rem;
}

.product-detail-btn {
    display: block;
    text-align: center;
    padding: 0.6rem;
    background-color: transparent;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.product-detail-btn:hover {
    background-color: var(--color-accent);
    color: #ffffff;
}

/* ===== รายละเอียดสินค้า ===== */
.product-detail-section {
    display: none;
    margin-top: 4rem;
    width: 100%;
}

.back-to-list {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s;
}

.back-to-list:hover {
    color: #c53030;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.detail-large-img img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
}

.detail-text h2 {
    font-size: 1.625rem;
    color: #1a202c;
    margin-bottom: 0.8rem;
}

.detail-text p#detailCode {
    color: #888;
    margin-bottom: 1rem;
}

.detail-text p#detailPrice {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 2rem;
}

#detailFullDesc {
    color: #4a5568;
    line-height: 2;
}

/* ===== หน้าติดต่อเรา ===== */
.contact-page {
    padding: 3rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    width: 100%;
}

.contact-info {
    width: 100%;
}

.contact-info h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 2rem;
}

.info-block {
    margin-bottom: 1.8rem;
    width: 100%;
}

.info-block .label {
    font-weight: 600;
    color: #505F76;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    display: block;
}

.info-block p {
    font-weight: 700;
    color: #111C2D;
    font-size: 1rem;
    line-height: 1.8;
}

.map-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-top: 0.5rem;
    display: block;
}

.contact-form {
    width: 100%;
    min-width: 420px;
    flex-shrink: 0;
}

.form-group {
    margin-bottom: 1.2rem;
    width: 100%;
}

.form-group label {
    display: block;
    color: var(--color-gray);
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--color-light-gray);
    border-radius: 4px;
    font-family: var(--font-thai);
    font-size: 1rem;
    background-color: var(--color-white);
    min-height: 48px;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--color-dark);
    font-weight: 600;
    color: var(--color-white);
    border: none;
    border-radius: 4px;
    font-family: var(--font-thai);
    font-size: 1rem;
    cursor: pointer;
    margin-top: 0.5rem;
    min-height: 50px;
}

.submit-btn:hover {
    opacity: 0.9;
}

/* Placeholder */
::placeholder { color: #b8b8b8 !important; opacity: 1 !important; }
::-webkit-input-placeholder { color: #b8b8b8 !important; }
::-moz-placeholder { color: #b8b8b8 !important; opacity: 1; }
:-ms-input-placeholder { color: #b8b8b8 !important; }

/* ===== ส่วนท้ายเว็บไซต์ ===== */
footer {
    background-color: #ffffff;
    border-top: 1px solid #eee;
    padding: 3rem 5% 1.5rem;
    color: #666;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 2rem;
}

/* ===== ส่วนท้ายเว็บไซต์ ===== */
footer {
    background-color: #ffffff;
    border-top: 1px solid #eee;
    padding: 3rem 0 1.5rem; /* เอา padding ซ้าย-ขวาออกไปไว้ที่ลูก */
    color: #666;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0%; /* ใช้ระยะเดียวกับส่วนอื่น */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 2rem;
}

/* คอลัมน์โลโก้ ชิดซ้ายตรงกับส่วนล่าง */
.footer-logo-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* ชิดซ้ายสุด */
}

.footer-logo-col img {
    height: 50px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.footer-col h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.2rem;
}

.footer-col:nth-child(2) h3 {
    margin-left: -8rem;
}

.footer-col:nth-child(3) h3 {
    margin-left: -16rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col:nth-child(2) ul {
    margin-left: -8rem;
}
.footer-col:nth-child(3) ul {
    margin-left: -16rem;
}

.footer-col li {
    margin-bottom: 1.4rem;
}

.footer-col a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

/* เส้นคั่นและส่วนล่าง — ใช้ padding เท่ากับด้านบนเป๊ะๆ */
.footer-bottom {
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 0%;   /* ตรงกับ .footer-container */
    padding-right: 0%;
    text-align: left;
    font-size: 0.85rem;
    color: #888;
}

/* ----- ลายน้ำรูปสินค้าแบบใช้รูปภาพ ----- */
.detail-large-img {
  position: relative;
  display: inline-block;
  width: 100%; /* ให้ครอบคลุมเต็มพื้นที่รูป */
}

.detail-large-img img {
  width: 100%;
  height: auto;
}

.detail-large-img::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('photo/ลายน้ำ.png') no-repeat center center;
  background-size: 100%; /* ปรับขนาดโลโก้ */
  pointer-events: none; /* ไม่รับการคลิก */
  user-select: none; /* ไม่สามารถเลือกได้ */
}

/* ===== กล่องค้นหา ซ่อน-แสดง ===== */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

/* ช่องพิมพ์ — เริ่มต้นซ่อน */
.search-input {
  position: absolute;
  right: 35px; /* เว้นระยะห่างจากไอคอน */
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  width: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  background: #fff;
  z-index: 10;
}

/* เมื่อเปิดใช้งาน */
.search-box.active .search-input {
  width: 220px;
  opacity: 1;
  visibility: visible;
}

.search-input:focus {
  outline: none;
  border-color: #666;
}

/* ปุ่มไอคอน */
.search-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11;
}

.search-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* แถบแจ้งเตือน มุมขวาบน */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.4s ease;
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}
.toast.success {
    background: #10b981;
}
.toast.error {
    background: #ef4444;
}

.btn-products {
  display: inline-flex;
  align-items: baseline; /* จัดให้เส้นฐานตรงกันเป๊ะ */
  justify-content: center;
  margin-top: 2rem;
  padding: 0.8rem 2rem;
  background-color: #ef4444;
  color: #ffffff;
  font-family: "IBM Plex Sans Thai", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0;
  gap: 0.15em; /* ระยะห่างชิดพอดี */
}

.btn-products:hover {
  background-color: #eb3232;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(235, 37, 37, 0.3);
}

/* ปรับลูกศรให้ตรงแนวตั้งพอดี */
.btn-products .arrow {
  display: inline-block;
  margin-left: 0;
  transform: translateY(0.05em); /* เลื่อนขึ้นลงนิดหน่อย ถ้ายังไม่ตรง ปรับค่านี้ */
}

/* === ส่วนการตกแต่งแถบคุกกี้ === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  padding: 1.2rem 2rem;
  z-index: 9999;
  display: none;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  box-sizing: border-box;
  font-family: 'IBM Plex Sans Thai', sans-serif;
}

.cookie-banner.active {
  display: flex;
}

.cookie-text {
  flex: 1;
  min-width: 280px;
  color: #333333;
  font-size: 14px;
  line-height: 1.5;
}

.cookie-text p {
  color: #ef4444;
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 0.8rem;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  font-family: inherit;
}

.cookie-btn-reject {
  background-color: #e5e7eb;
  color: #374151;
}

.cookie-btn-reject:hover {
  background-color: #d1d5db;
}

.cookie-btn-accept {
  background-color: #ef4444;
  color: #ffffff;
}

.cookie-btn-accept:hover {
  background-color: #eb3232;
}

/* ==================================================
   📱 MEDIA QUERY — เรียงตามลำดับจากใหญ่ไปเล็ก
   ================================================== */

@media (max-width: 767px) {
  /* ส่วนหัว */
  header {
    padding: 1rem 4%;
  }

  .menu-toggle {
    display: flex; /* แสดงปุ่มกดเมนู */
  }

  .menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    transform: none;
    flex-direction: column;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 1.5rem 4%;
    gap: 1.2rem;
    display: none; /* ซ่อนก่อนกด */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }

  .menu.open {
    display: flex; /* แสดงเมนูเมื่อกด */
  }

  .header-right {
    gap: 0.8rem;
  }

  .lang-btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
  }

  /* ส่วนเนื้อหา */
  main {
    padding: 2rem 4%;
    min-height: calc(100vh - 70px);
  }

  main h1 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  /* ส่วนบริการ, เกี่ยวกับ, วิสัยทัศน์, ผลงาน */
  .services-section,
  .about-section,
  .vision-section,
  .portfolio-section {
    padding: 3rem 4%;
  }

  .services-grid,
  .portfolio-grid,
  .categories-grid,
  .products-grid {
    grid-template-columns: 1fr; /* แสดง 1 คอลัมน์ */
    gap: 1.5rem;
  }

  /* เกี่ยวกับเรา */
  .about-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-stats {
    flex-wrap: wrap;
    gap: 1rem;
  }

  /* รายละเอียดสินค้า */
  .detail-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
  }

  /* ติดต่อเรา */
  .contact-page {
    padding: 2rem 4%;
  }

  .contact-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-form {
    min-width: 100%;
  }

  /* ส่วนท้ายเว็บ */
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 4%;
  }

  .footer-col:nth-child(2) h3,
  .footer-col:nth-child(3) h3,
  .footer-col:nth-child(2) ul,
  .footer-col:nth-child(3) ul {
    margin-left: 0; /* ยกเลิกการเลื่อนซ้าย */
  }

  .footer-logo-col {
    align-items: center;
    text-align: center;
  }

  .footer-bottom {
    padding: 1.5rem 4%;
    text-align: center;
  }

  /* กล่องค้นหา */
  .search-box.active .search-input {
    position: fixed;
    right: 4%;
    top: 70px;
    width: calc(100% - 8%);
  }

  /* แถบคุกกี้ */
  .cookie-banner {
    padding: 1rem 4%;
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-buttons {
    display: flex;
    gap: 0.8rem;
    flex-shrink: 0;
    justify-content: flex-start;
  }
}

/* --- แท็บเล็ต ขนาด 768px – 1023px --- */
@media (min-width: 768px) and (max-width: 1023px) {
  header {
    padding: 1rem 4%;
  }

  .menu {
    gap: 1.2rem;
  }

  main {
    padding: 2.5rem 4%;
  }

  .services-section,
  .about-section,
  .vision-section,
  .portfolio-section {
    padding: 4rem 4%;
  }

  .services-grid,
  .portfolio-grid,
  .categories-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 คอลัมน์ */
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-container {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .detail-content {
    gap: 2rem;
  }

  .contact-container {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .footer-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 0 4%;
  }

  .footer-col:nth-child(2) h3 {
    margin-left: -4rem;
  }
  .footer-col:nth-child(3) h3 {
    margin-left: -8rem;
  }
  .footer-col:nth-child(2) ul {
    margin-left: -4rem;
  }
  .footer-col:nth-child(3) ul {
    margin-left: -8rem;
  }
}

/* --- จอคอมพิวเตอร์ขนาดเล็ก 1024px – 1279px --- */
@media (min-width: 1024px) and (max-width: 1279px) {
  header {
    padding: 1rem 4%;
  }

  .menu {
    gap: 1.5rem;
  }

  .footer-container {
    padding: 0 4%;
    gap: 2rem;
  }

  .footer-col:nth-child(2) h3 {
    margin-left: -5rem;
  }
  .footer-col:nth-child(3) h3 {
    margin-left: -10rem;
  }
  .footer-col:nth-child(2) ul {
    margin-left: -5rem;
  }
  .footer-col:nth-child(3) ul {
    margin-left: -10rem;
  }
}

/* --- ปรับแต่งเพิ่มเติมเมื่อจอใหญ่มาก --- */
@media (min-width: 1280px) {
  .footer-container {
    padding: 0 5%;
  }
}