/* ==========================================
   COMMON STYLES (Global)
   ========================================== */
:root {
  --navy-dark: #0d1b2a;
  --navy-light: #1b263b;
  --yellow-brand: #fdb813;
  --yellow-hover: #e5a700;
  --text-gray: #6c757d;
}

body {
  font-family: "Kanit", sans-serif;
  color: var(--navy-dark);
  overflow-x: hidden;
}
.display-4 {
  font-size: 2rem !important;
}
.display-5 {
  font-size: 2rem !important;
}
.display-3 {
  font-size: 2rem !important;
}
.display-6 {
  font-size: 2rem !important;
}
.bg-navy {
  background-color: var(--navy-dark);
}
.bg-navy-light {
  background-color: var(--navy-light);
}
.text-yellow {
  color: var(--yellow-brand);
}
.bg-yellow {
  background-color: var(--yellow-brand);
}
.btn-yellow {
  background-color: var(--yellow-brand);
  color: var(--navy-dark);
  font-weight: 600;
  border: none;
  transition: all 0.3s;
}

.btn-yellow:hover {
  background-color: var(--yellow-hover);
  transform: translateY(-2px);
  color: var(--navy-dark);
}

.navbar {
  background-color: rgba(13, 27, 42, 0.95) !important;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
  padding: 15px 0;
}

.nav-link {
  color: white !important;
  font-weight: 400;
  margin: 0 10px;
}

.nav-link:hover {
  color: var(--yellow-brand) !important;
}

/* Logo Frame Style */
.logo-frame {
  width: 50px;
  height: 50px;
  background: #000;
  border: 3px solid var(--yellow-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--yellow-brand);
  font-size: 28px;
  box-shadow: 0 0 15px rgba(253, 184, 19, 0.3);
  position: relative;
  overflow: hidden;
}

.logo-frame::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

/* Brand Text Scaling */
.navbar .navbar-brand .brand-part-1 {
  font-size: 12px !important;
  line-height: 1.2;
}
.navbar .navbar-brand .brand-part-2 {
  font-size: 21px !important;
  line-height: 1.2;
}

@media (max-width: 991px) {
  .navbar .navbar-brand .brand-part-1 {
    font-size: 14px !important;
  }
  .navbar .navbar-brand .brand-part-2 {
    font-size: 20px !important;
  }
}

footer {
  background-color: #050a0f;
  color: #cbd5e1;
  padding-top: 80px;
}

.footer-link {
  color: #94a3b8;
  text-decoration: none;
  transition: 0.3s;
  display: block;
  margin-bottom: 10px;
}

.footer-link:hover {
  color: var(--yellow-brand);
  padding-left: 5px;
}

.hover-yellow:hover {
  color: var(--yellow-brand) !important;
}

/* ==========================================
   PAGE: HOME (page-home)
   ========================================== */
.page-home .hero-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
}

.page-home .service-card {
  border: none;
  border-bottom: 4px solid transparent;
  transition: all 0.3s;
  height: 100%;
}

.page-home .service-card:hover {
  border-bottom-color: var(--yellow-brand);
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.page-home .brand-card {
  background: white;
  padding: 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  border: 1px solid #eee;
  transition: 0.3s;
  overflow: hidden;
  position: relative;
}

.page-home .brand-card:hover {
  border-color: var(--yellow-brand);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.brand-logo-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: all 0.3s ease;
}

.brand-card:hover .brand-logo-img {
  transform: scale(1.1);
}

.page-home .map-container {
  border-radius: 20px;
  overflow: hidden;
  border: 5px solid white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.page-home .map-container iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 400px;
  border: 0;
}

.page-home .accordion-button:not(.collapsed) {
  background-color: var(--yellow-brand);
  color: var(--navy-dark);
}

.page-home .contact-channel-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 20px;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  display: flex;
  align-items: center;
  color: white;
}

.page-home .contact-channel-item:hover {
  background: #ffc107 !important;
  transform: translateY(-5px);
}
.contact-channel-item:hover h4,
.contact-channel-item:hover p,
.contact-channel-item:hover i {
  color: #0d1b2a !important;
}

.page-home .cta-banner {
  background: linear-gradient(45deg, var(--navy-dark), var(--navy-light));
  border-radius: 30px;
  padding: 60px;
  position: relative;
  overflow: hidden;
}

.page-home .cta-banner::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: var(--yellow-brand);
  opacity: 0.1;
  border-radius: 50%;
}

/* ==========================================
   PAGE: ABOUT (page-about)
   ========================================== */
.page-about .about-hero {
  background:
    linear-gradient(rgba(13, 27, 42, 0.9), rgba(13, 27, 42, 0.9)),
    url("https://images.unsplash.com/photo-1504917595217-d4dc5ebe6122?auto=format&fit=crop&q=80&w=1920");
  background-size: cover;
  background-position: center;
  padding: 120px 0 80px;
  color: white;
  text-align: center;
}

.page-about .vision-card {
  border: none;
  border-left: 5px solid var(--yellow-brand);
  background: #f8f9fa;
  transition: 0.3s;
}

.page-about .vision-card:hover {
  background: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.page-about .stat-box {
  background: var(--navy-dark);
  color: white;
  padding: 40px;
  border-radius: 20px;
  position: relative;
  z-index: 1;
}

.page-about .stat-box::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: var(--yellow-brand);
  opacity: 0.1;
  border-radius: 0 20px 0 100%;
  z-index: -1;
}

/* ==========================================
   PAGE: SERVICES (page-services)
   ========================================== */
.page-services .service-hero {
  background:
    linear-gradient(rgba(13, 27, 42, 0.9), rgba(13, 27, 42, 0.9)),
    url("https://images.unsplash.com/photo-1581094794329-c8112a89af12?auto=format&fit=crop&q=80&w=1920");
  background-size: cover;
  background-position: center;
  padding: 120px 0 80px;
  color: white;
  text-align: center;
}

.page-services .service-detail-card {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  background: white;
  transition: 0.3s;
  height: 100%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.page-services .service-detail-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.page-services .service-icon-box {
  width: 70px;
  height: 70px;
  background: var(--navy-dark);
  color: var(--yellow-brand);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

.page-services .process-step {
  position: relative;
  text-align: center;
}

.page-services .step-number {
  width: 50px;
  height: 50px;
  background: var(--yellow-brand);
  color: var(--navy-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin: 0 auto 20px;
  font-size: 1.2rem;
  border: 4px solid white;
  box-shadow: 0 0 0 2px var(--yellow-brand);
}

/* ==========================================
   PAGE: PRODUCTS (page-products)
   ========================================== */
.page-products .product-hero {
  background-size: cover;
  background-position: center;
  padding: 120px 0 60px;
  color: white;
}

.page-products .category-list .list-group-item {
  border: none;
  padding: 12px 5px;
  margin-bottom: 5px;
  border-radius: 10px !important;
  transition: 0.3s;
  background: transparent;
  color: var(--navy-dark);
}

.page-products .category-list .list-group-item:hover,
.page-products .category-list .list-group-item.active {
  background: var(--navy-dark);
  color: var(--yellow-brand);
  padding-left: 25px;
}

.page-products .product-card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  transition: 0.3s;
  background: white;
  height: 100%;
}

.page-products .product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-img-wrapper {
  position: relative;
  padding-top: 100%; /* Square Aspect Ratio */
  overflow: hidden;
  background: #fff;
}

.product-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.page-products .product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--yellow-brand);
  color: var(--navy-dark);
  font-size: 0.7rem;
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 20px;
  z-index: 2;
}

.page-products .btn-quote {
  background-color: var(--navy-dark);
  color: white;
  border-radius: 8px;
  transition: 0.3s;
}

.page-products .btn-quote:hover {
  background-color: var(--yellow-brand);
  color: var(--navy-dark);
}

/* ==========================================
   PAGE: PRODUCT DETAIL (page-product-detail)
   ========================================== */
.page-product-detail .product-hero {
  background:
    linear-gradient(rgba(13, 27, 42, 0.8), rgba(13, 27, 42, 0.8)),
    url("https://images.unsplash.com/photo-1558494949-ef010cbdcc51?auto=format&fit=crop&q=80&w=1920");
  background-size: cover;
  background-position: center;
  padding: 120px 0 60px;
  color: white;
}

.category-list .list-group-item {
  border: none;
  border-radius: 10px !important;
  margin-bottom: 5px;
  padding: 12px 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: white;
}

.category-list .list-group-item:hover {
  background-color: #f8f9fa;
  color: var(--navy-dark);
  padding-left: 20px;
}

.category-list .list-group-item.active {
  background-color: var(--navy-dark) !important;
  color: var(--yellow-brand) !important;
  box-shadow: 0 4px 15px rgba(13, 27, 42, 0.1);
  padding-left: 20px;
}

.category-list .list-group-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--yellow-brand);
}

.service-sidebar-item {
  display: flex;
  align-items: center;
  padding: 10px 0px;
  border-bottom: 1px solid #f8f8f8;
  text-decoration: none;
  color: var(--navy-dark);
  transition: 0.3s;
  border-radius: 12px;
  margin-bottom: 2px;
}

.service-sidebar-item:last-child {
  border-bottom: none;
}

.service-sidebar-item i {
  width: 30px;
  height: 30px;
  background: #fdfdfd;
  border: 1px solid #eee;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  color: var(--yellow-brand);
  transition: 0.3s;
  flex-shrink: 0;
}

.service-sidebar-item:hover {
  color: var(--yellow-brand);
  background-color: #fcfcfc;
}

.service-sidebar-item:hover i {
  background: var(--yellow-brand);
  color: var(--navy-dark);
  border-color: var(--yellow-brand);
  transform: scale(1.1);
}

.editable-section {
  border: 2px dashed rgba(13, 27, 42, 0.2);
  position: relative;
  transition: all 0.3s ease;
}

.editable-section:hover {
  border-color: var(--navy-dark);
  background-color: rgba(255, 255, 255, 0.05);
}

.editable-section::after {
  content: "คลิกเพื่อแก้ไขส่วนนี้";
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 10px;
  color: var(--navy-dark);
  opacity: 0.5;
  font-weight: bold;
}

.sidebar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
}

.sidebar-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--yellow-brand), transparent);
  margin-left: 12px;
}

.page-product-detail .breadcrumb-section {
  background-color: #f8f9fa;
  padding: 20px 0;
  margin-top: 75px;
}

.page-product-detail .product-main-img {
  border: 1px solid #eee;
  border-radius: 20px;

  background: white;
  transition: 0.3s;
}

.page-product-detail .product-info-badge {
  display: inline-block;
  padding: 5px 15px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 15px;
}

.page-product-detail .spec-table th {
  background-color: #f8f9fa;
  width: 35%;
  font-weight: 600;
}

.page-product-detail .cta-box {
  background: var(--navy-dark);
  color: white;
  padding: 30px;
  border-radius: 20px;
  margin-top: 30px;
}

.page-product-detail .btn-line {
  background-color: #06c755;
  color: white;
  font-weight: 600;
  border: none;
}

.page-product-detail .btn-line:hover {
  background-color: #05b34c;
  color: white;
}

.page-product-detail .related-card {
  border: none;
  transition: 0.3s;
}

.page-product-detail .related-card:hover {
  transform: translateY(-5px);
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Kanit", sans-serif;
  color: var(--navy-dark);
}

.navbar .navbar-brand span {
  font-size: 1.25rem !important;
}
.sy-5 {
  padding: 50px 0 50px !important;
}
@media (min-width: 576px) {
  .navbar .navbar-brand span {
    font-size: 1.75rem !important;
  }
}

/* Fix Bootstrap Row Overflows */
@media (min-width: 992px) {
  .navbar-nav .nav-item {
    border: none !important;
    padding: 0 !important;
  }
}
.row {
  margin-right: 0;
  margin-left: 0;
}
.container,
.container-fluid {
  padding-right: 15px;
  padding-left: 15px;
}

/* ==========================================
   RESPONSIVE DESIGN (Media Queries)
   ========================================== */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: var(--navy-dark);
    margin: 15px -15px -15px;
    padding: 20px;
    border-radius: 0 0 20px 20px;
  }

  .nav-link {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .product-hero {
    padding: 100px 0 40px !important;
  }
  .sy-5 {
    padding: 20px 0 20px !important;
  }
}

@media (max-width: 767.98px) {
  /* Global Adjustments */
  section {
    padding: 150px 0px 50px !important;
  }
  .display-4 {
    font-size: 1.8rem !important;
    line-height: 1.3 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }
  .display-5 {
    font-size: 1.6rem !important;
  }
  .display-6 {
    font-size: 1.4rem !important;
  }

  /* Hero Sections */
  .page-home .hero-section {
    padding-top: 100px !important;
    padding-bottom: 60px !important;
    min-height: auto !important;
    text-align: center;
    background-position: 70% center !important; /* Move background to show icons better */
  }

  .page-home .hero-section h1 br {
    display: none; /* Hide <br> on mobile to let it wrap naturally */
  }

  /* Floating CTA */
  .floating-cta {
    bottom: 15px !important;
    right: 15px !important;
  }
  .floating-cta .btn {
    padding: 8px !important;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Home Page Brand Cards */
  .page-home .brand-card {
    min-height: 70px;
    height: 70px;
    padding: 8px;
  }
  .brandsSwiper {
    height: auto !important;
    padding-bottom: 10px !important;
  }
  .brandsSwiper .swiper-slide {
    height: 70px !important;
    margin-bottom: 8px !important;
  }

  .page-home .cta-banner {
    padding: 30px 15px !important;
    border-radius: 20px;
  }

  .page-home .contact-channel-item {
    padding: 12px;
    flex-direction: column;
    text-align: center;
  }
  .page-home .contact-channel-item .bg-white {
    margin: 0 0 10px 0 !important;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .page-home .contact-channel-item .bi-chevron-right {
    display: none;
  }

  /* About Page */
  .page-about .stat-box {
    padding: 25px 15px;
  }
  .page-about .stat-box .display-5 {
    font-size: 2rem !important;
  }

  /* Product Detail */
  .page-product-detail .spec-table th {
    width: 45%;
    font-size: 0.85rem;
  }

  /* Image responsiveness */
  img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 575.98px) {
  .display-4 {
    font-size: 1.6rem !important;
  }
  .display-1,
  .display-2,
  .display-3 {
    font-size: 2.2rem !important;
  }
  .btn-lg {
    padding: 10px 20px !important;
    font-size: 0.95rem !important;
  }

  .page-home .hero-section {
    padding-top: 110px !important;
  }

  .page-home .hero-section {
    padding-top: 120px !important;
  }

  /* Swiper Grid Tuning */
  .brandsSwiper {
    height: 220px; /* Needed for 2 rows */
  }
}

.swiper-pagination-bullet-active {
  background: var(--navy-dark) !important;
}

/* Fix Offcanvas hiding behind elements */
.offcanvas {
  z-index: 1060 !important;
}
.offcanvas-backdrop {
  z-index: 1050 !important;
}

/* Ensure navbar doesn't create stacking context issues */
.navbar {
  z-index: 1040 !important;
}

/* Hero Floating Animation */
.hero-floating {
  animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

.hero-image-wrapper {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
}
.list-group-item.active {
  color: var(--navy-dark);
  background-color: var(--yellow-brand);
  border-color: var(--yellow-brand);
}
/* ==========================================
   PAGE: CONTACT (page-contact)
   ========================================== */
.contact-info-card {
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

.contact-info-card:hover {
  transform: translateY(-10px);
  border-color: var(--yellow-brand) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

.map-container {
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1);
  border: 1px solid #eee;
}

.page-contact .bg-navy.rounded-4 {
  box-shadow: 0 15px 45px rgba(13, 27, 42, 0.2);
  z-index: 100;
}

.contact-card-title {
  font-size: 1.1rem;
}

@media (max-width: 576px) {
  .contact-card-title {
    font-size: 0.85rem !important;
  }
  .contact-icon-box {
    width: 45px !important;
    height: 45px !important;
    font-size: 1.1rem !important;
  }
  .btn-sm-mobile {
    padding: 4px 10px !important;
    font-size: 0.75rem !important;
  }
}

.contact-icon-box {
  width: 60px;
  height: 60px;
  background: rgba(13, 27, 42, 0.05);
  color: var(--navy-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.product-hero {
  background-size: cover;
  background-position: center;
  padding: 120px 0 60px;
  color: white;
}
.contact-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, #1a3a5a 100%);
  padding: 100px 0 60px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.btn-outline-navy {
  border: 1px solid var(--navy-dark);
  color: var(--navy-dark);
}

.btn-outline-navy:hover {
  background: var(--navy-dark);
  color: white;
}
.breadcrumb-item + .breadcrumb-item::before {
  color: white;
}
