@import url("https://fonts.googleapis.com/css2?family=Oxanium:wght@200..800&display=swap");

body {
  overflow-x: hidden;
  position: relative;
  font-family: "Oxanium", sans-serif !important;
  font-weight: 400;
  line-height: 32px;
  color: #1a1a1a;
  font-size: 16px;
  background-color: #f5f5f5;
}

a {
  text-decoration: none;
  -webkit-transition: .3s all ease;
  -o-transition: .3s all ease;
  transition: .3s all ease;
  color: #2f2f2f;
}

a:hover {
  color: #2f2f2f;
  text-decoration: none;
}

/* --- Top utility strip --- */
.navbar-topstrip {
  background: #f7f7f6;
  color: #6b7280;
  font-family: 'Oxanium', sans-serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 7px 0;
  border-bottom: 1px solid #ececea;
}
.navbar-topstrip .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.navbar-topstrip .ts-left { display: flex; align-items: center; gap: 1.6rem; }
.navbar-topstrip .ts-left span { display: inline-flex; align-items: center; gap: .45rem; }
.navbar-topstrip i { color: #e31b23; font-size: .7rem; }
.navbar-topstrip a { color: #6b7280; }
.navbar-topstrip a:hover { color: #101010; }
@media (max-width: 767px) { .navbar-topstrip .ts-right { display: none; } }
@media (max-width: 560px) { .navbar-topstrip { display: none; } }

.custom-navbar {
  background: #ffffff !important;
  padding-top: 16px;
  padding-bottom: 16px;
  position: sticky;
  top: 0;
  z-index: 1040;
  border-bottom: 1px solid #ececea;
}

.custom-navbar .navbar-brand {
  font-size: 32px;
  font-weight: 600;
}

.custom-navbar .navbar-brand>span {
  opacity: .4;
}

.custom-navbar .navbar-toggler {
  border: 1px solid #d8d5d0;
  border-radius: 0;
  padding: 6px 10px;
}

.custom-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(16, 16, 16, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

body.dark-mode .custom-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.custom-navbar .navbar-toggler:active,
.custom-navbar .navbar-toggler:focus {
  -webkit-box-shadow: none;
  box-shadow: none;
  outline: none;
}

@media (min-width: 992px) {
  .custom-navbar .custom-navbar-nav li {
    margin-left: 4px;
    margin-right: 4px;
  }
}

.custom-navbar .custom-navbar-nav li a {
  font-family: 'Oxanium', sans-serif;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #101010 !important;
  opacity: .55;
  padding: .55rem 1rem !important;
  -webkit-transition: .18s all ease;
  -o-transition: .18s all ease;
  transition: .18s all ease;
  position: relative;
}

@media (min-width: 768px) {
  .custom-navbar .custom-navbar-nav li a:before {
    content: "";
    position: absolute;
    bottom: 4px;
    left: 16px;
    right: 16px;
    background: #e31b23;
    height: 2px;
    opacity: 1;
    visibility: visible;
    width: 0;
    -webkit-transition: .18s ease-out;
    -o-transition: .18s ease-out;
    transition: .18s ease-out;
  }
}

.custom-navbar .custom-navbar-nav li a:hover,
.custom-navbar .custom-navbar-nav li.active a {
  opacity: 1;
  background: #f7f7f6;
}

.custom-navbar .custom-navbar-nav li a:hover:before,
.custom-navbar .custom-navbar-nav li.active a:before {
  width: calc(100% - 32px);
}

.custom-navbar .dropdown-toggle::after {
  vertical-align: 2px;
  opacity: .6;
}

.custom-navbar .dropdown-menu {
  border: none;
  border-radius: 0;
  border-top: 3px solid #e31b23;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  padding: 8px 0;
  margin-top: 14px;
}

.custom-navbar .nav-category-menu {
  max-height: 420px;
  overflow-y: auto;
  min-width: 260px;
}

.custom-navbar .dropdown-item {
  font-family: "Oxanium", sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: #1a1a1a;
  padding: 10px 22px;
}

.custom-navbar .dropdown-item:hover,
.custom-navbar .dropdown-item:focus {
  background-color: #fff5f5;
  color: #e31b23;
}

/* Language switch (EN / TH pill toggle) */
.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: #f2f2f2;
  border: 1px solid #e6e6e6;
  border-radius: 999px;
  padding: 3px;
  width: 84px;
  height: 32px;
}

.lang-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 39px;
  height: 26px;
  background: #e31b23;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(227, 27, 35, 0.35);
  transition: transform 0.25s ease;
  z-index: 0;
}

.lang-switch.lang-switch-th .lang-switch-thumb {
  transform: translateX(39px);
}

.lang-switch-opt {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  font-family: "Oxanium", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #888;
  text-decoration: none;
  line-height: 26px;
  transition: color 0.25s ease;
}

.lang-switch-opt.active {
  color: #fff;
}

.lang-switch-opt:hover:not(.active) {
  color: #e31b23;
}

.hero {
  background: #f5f5f5;
  padding: 40px 0;
  color: #1a1a1a;
  position: relative;
}

@media (min-width: 768px) {
  .hero {
    padding: 60px 0;
  }
}

.btn {
  font-weight: 600;
  padding: 12px 30px;
  /* border-radius: 30px; */
  color: #ffffff;
  background: #2f2f2f;
  border-color: #2f2f2f;
}

.btn:hover {
  color: #ffffff;
  background: #222222;
  border-color: #222222;
}

.btn:active,
.btn:focus {
  outline: none !important;
  -webkit-box-shadow: none;
  box-shadow: none;
}

.btn.btn-primary {
  background: #ff0000;
  border-color: #3b5d50;
}

.btn.btn-primary:hover {
  background: #b41818;
  border-color: #314d43;
}

.btn.btn-secondary {
  color: #2f2f2f;
  background: #f9bf29;
  border-color: #f9bf29;
}

.btn.btn-secondary:hover {
  background: #f8b810;
  border-color: #f8b810;
}

.footer-section {
  padding: 20px 0;
  background: #ffffff;
}

.footer-section .relative {
  position: relative;
}

.footer-section a {
  text-decoration: none;
  color: #2f2f2f;
  -webkit-transition: .3s all ease;
  -o-transition: .3s all ease;
  transition: .3s all ease;
}

.footer-section a:hover {
  color: rgba(47, 47, 47, 0.5);
}

.footer-section .sofa-img {
  position: absolute;
  top: -200px;
  z-index: 1;
  right: 0;
}

.footer-section .sofa-img img {
  max-width: 380px;
}

.footer-section .border-top {
  border-color: #dce5e4;
}

.footer-section .border-top.copyright {
  font-size: 14px !important;
}

.footer-heading {
  font-family: 'Oxanium', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: #e31b23;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.footer-desc {
  font-size: 0.75rem;
  color: #666;
  line-height: 1.8;
  font-family: sans-serif;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-links a {
  font-size: 0.8rem;
  color: #444;
  font-family: sans-serif;
}

.footer-links a:hover {
  color: #e31b23;
}

.footer-contact li {
  font-size: 0.8rem;
  color: #444;
  margin-bottom: 0.5rem;
  font-family: sans-serif;
}

.footer-copyright {
  border-color: #e0e0e0 !important;
  color: #666;
  font-family: sans-serif;
}

.footer-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-family: 'Oxanium', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #e31b23;
  border: 1px solid #e31b23;
  padding: 2px 8px;
  text-transform: uppercase;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8rem;
  font-family: sans-serif;
  color: #444;
  margin-bottom: 0.6rem;
}

.footer-contact-item a {
  color: #444;
  font-size: 0.8rem;
  font-family: sans-serif;
}

.footer-contact-item a:hover {
  color: #e31b23;
}

.footer-icon {
  color: #e31b23;
  margin-top: 3px;
  min-width: 14px;
}

.footer-search-input {
  border: 1px solid #ddd;
  border-radius: 0;
  font-family: sans-serif;
  font-size: 0.8rem;
  height: 34px;
}

.footer-search-input:focus {
  border-color: #e31b23;
  box-shadow: none;
}

.footer-search-btn {
  background: #e31b23;
  color: #fff;
  border-radius: 0;
  border: none;
  padding: 0 14px;
}

.footer-search-btn:hover {
  background: #c0151c;
  color: #fff;
}

.footer-copy-link {
  font-size: 0.75rem;
  color: #666;
  font-family: sans-serif;
}

.footer-copy-link:hover {
  color: #e31b23;
}

.form-control {
  height: 50px;
  border-radius: 10px;
  font-family: "Oxanium", sans-serif;
}

.form-control:active,
.form-control:focus {
  outline: none;
  -webkit-box-shadow: none;
  box-shadow: none;
}

textarea {
  height: auto !important;
}

/* ================================================
   NISTO CUSTOM STYLES
   ================================================ */

.cursor-pointer {
  cursor: pointer;
}

body a {
  text-decoration: none;
}

/* --- Topic Title --- */
.topic-title {
  color: #1a1a1a;
  border-left: 5px solid #e61e25;
  padding-left: 15px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

/* --- Page Title --- */
.page-title {
  font-family: 'Oxanium', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #000000;
}

.page-title span {
  color: #e31b23;
}

/* --- Index Hero Banner (full-bleed video) --- */
.nisto-hero-banner {
  position: relative;
  height: 85vh;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #0d0d0d;
}

.nisto-hero-banner-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
}

.nisto-hero-banner-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg, rgba(6, 6, 6, 0.92) 0%, rgba(6, 6, 6, 0.72) 30%, rgba(6, 6, 6, 0.25) 58%, rgba(6, 6, 6, 0) 78%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 35%);
}

.nisto-hero-banner-content {
  position: relative;
  z-index: 2;
  max-width: 560px !important;
  margin: 0 !important;
}

.nisto-hero-banner-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 78%, rgba(0, 0, 0, 0.35) 100%),
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.45) 100%);
}

.nisto-hero-corner {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 34px;
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Oxanium', sans-serif;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.nisto-hero-corner-line {
  width: 30px;
  height: 2px;
  background: #e31b23;
  display: inline-block;
}

.nisto-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  font-family: 'Oxanium', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e6e6e6;
  margin-bottom: 24px;
}

.nisto-hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e31b23;
  box-shadow: 0 0 0 4px rgba(227, 27, 35, 0.25);
}

.nisto-hero-banner-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  z-index: 2;
}

.nisto-hero-banner-scroll span {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: #e31b23;
  border-radius: 2px;
  transform: translateX(-50%);
  animation: nisto-scroll-bounce 1.6s ease infinite;
}

@keyframes nisto-scroll-bounce {
  0%   { top: 6px; opacity: 1; }
  70%  { top: 18px; opacity: 0; }
  100% { top: 18px; opacity: 0; }
}

.nisto-accent-line {
  width: 45px;
  height: 4px;
  background-color: #e31b23;
  margin-bottom: 20px;
}

.nisto-hero-title {
  font-family: 'Oxanium', sans-serif;
  font-weight: 800;
  font-size: 3.4rem;
  line-height: 1.08;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.text-nisto-red {
  color: #e31b23;
}

.nisto-hero-desc {
  font-size: 1rem;
  color: #cfcfcf;
  max-width: 460px;
  margin-bottom: 36px;
  line-height: 1.7;
  font-weight: 300;
}

.nisto-btn-group {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;
  font-family: 'Oxanium', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.btn-hero i {
  font-size: 0.8rem;
  transition: transform 0.25s ease;
}

.btn-hero-primary {
  background-color: #e31b23;
  color: #fff;
  box-shadow: 0 8px 20px rgba(227, 27, 35, 0.35);
}

.btn-hero-primary:hover {
  background-color: #c0000a;
  color: #fff;
  box-shadow: 0 10px 26px rgba(227, 27, 35, 0.45);
  transform: translateY(-2px);
}

.btn-hero-primary:hover i {
  transform: translateX(3px);
}

.btn-hero-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-hero-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  transform: translateY(-2px);
}

.btn-slanted-dark {
  background-color: #1a1a1a;
  color: #ffffff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

.btn-slanted-dark:hover {
  background-color: #e31b23;
  color: #fff;
  box-shadow: 6px 6px 0 rgba(163, 0, 10, 0.4);
  transform: skewX(-20deg) translateY(-2px);
}

@media (max-width: 480px) {
  .nisto-hero-title {
    font-size: 1.9rem;
  }
  .nisto-hero-desc {
    font-size: .88rem;
  }
  .nisto-hero-banner {
    padding: 90px 0 50px;
  }
  .btn-hero {
    padding: 12px 20px;
    font-size: .78rem;
  }
  .nisto-btn-group {
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .nisto-hero-title {
    font-size: 2.3rem;
  }
}

@media (max-width: 991px) {
  .nisto-hero-title {
    font-size: 3rem;
  }

  .nisto-hero-banner-content {
    max-width: 100% !important;
    margin: 0 auto !important;
  }

  .nisto-hero-banner {
    height: auto;
    min-height: 85vh;
    text-align: center;
    padding: 100px 0 60px;
  }

  .nisto-hero-desc {
    margin: 0 auto 30px auto;
  }

  .nisto-hero-badge {
    margin-left: auto;
    margin-right: auto;
  }

  .nisto-btn-group {
    justify-content: center;
  }
}

/* --- Search & Filter --- */
.search-wrapper-section {
  background-color: #F1EFEE;
  border-top: 1px solid #1a1a1a;
  min-height: calc(100vh - 80px);
  padding-bottom: 60px;
}

.search-container {
  background: #ffffff !important;
  border-radius: 0 !important;
  box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
  position: relative;
  margin-top: 30px;
}

.search-container .form-control,
.search-container .form-select {
  font-family: 'Oxanium', sans-serif;
  background-color: #f3f3f3 !important;
  height: 45px;
  font-weight: 600;
  border-radius: 4px !important;
}

.search-container .form-control:focus,
.search-container .form-select:focus {
  border-color: #e31b23 !important;
  box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
}

.search-container .form-control::placeholder {
  color: #888;
}

.search-container label.small {
  color: #e31b23 !important;
  font-family: 'Oxanium', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.75rem;
  margin-bottom: 8px;
}

.nav-pills {
  background: transparent;
  border-radius: 0;
  display: flex;
  margin-bottom: 30px !important;
}

.nav-pills .nav-link {
  color: #666;
  font-family: 'Oxanium', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 15px 30px;
  border-radius: 0;
  transition: all 0.3s ease;
}

.nav-pills .nav-link.active {
  background: transparent !important;
  color: #e31b23 !important;
  border-bottom: 3px solid #e31b23;
  box-shadow: none;
}

.btn-search-action {
  background-color: #e31b23;
  color: white;
  border: none;
  height: 55px;
  font-family: 'Oxanium', sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 4px;
  transition: 0.3s;
}

.btn-search-action:hover {
  background-color: #ff2a33;
  color: white;
  box-shadow: 0 0 15px rgba(227, 27, 35, 0.5);
}

/* --- Outline Button --- */
.btn-outline-nisto {
  color: #fff;
  border: 1px solid #333;
  font-family: 'Oxanium', sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: 0.3s;
  background: #111;
  border-radius: 0;
}

.btn-outline-nisto:hover {
  background: #e31b23;
  border-color: #e31b23;
  color: #fff;
  box-shadow: 0 0 15px rgba(227, 27, 35, 0.4);
}

/* --- Section Title --- */
.section-title-agg {
  font-family: 'Oxanium', sans-serif;
  font-weight: 800;
  color: #000000;
  font-size: 1.8rem;
  letter-spacing: 1px;
  border-left: 5px solid #e31e24;
  padding-left: 15px;
  margin-bottom: 30px;
}

.section-title-agg span {
  color: #e31e24;
}

/* --- Brand Cards (Admin light theme) --- */
.brand-img-box {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 10px;
  overflow: hidden;
}

.brand-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-card {
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  background: #fff;
}

.brand-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12) !important;
}

.brand-logo {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.brand-card:hover .brand-logo {
  transform: scale(1.05);
}

.brand-name {
  color: #ffffff;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
  transition: color 0.3s ease;
  letter-spacing: 0.5px;
}

/* --- Brand Cards (Dark theme) --- */
.brand-card-agg {
  background: #252525;
  padding: 40px 20px;
  text-align: center;
  border-radius: 4px;
  border: 1px solid #333;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  height: 100%;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}

.brand-card-agg:hover {
  background: #2d2d2d;
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  border-color: #444;
}

.brand-card-agg:hover .brand-name {
  color: #e31e24;
}

.brand-stats {
  color: #888;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.brand-card-agg:hover .brand-stats {
  color: #fff;
}

.brand-border-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background-color: #e31e24;
  transition: width 0.4s ease;
}

.brand-card-agg:hover .brand-border-bottom {
  width: 100%;
}

.brand-link {
  text-decoration: none !important;
}





#displayToggle .nav-link {
  background: transparent !important;
  border: none !important;
  color: #666;
  font-family: 'Oxanium', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 10px 30px;
  position: relative;
  transition: 0.3s;
  text-transform: uppercase;
}

#displayToggle .nav-link.active {
  color: #e31b23 !important;
}

#displayToggle .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: #e31b23;
}

#displayToggle .nav-link:hover:not(.active) {
  color: #999;
}

.custom-toggle-wrapper .nav-link {
  background: transparent;
  color: #888;
  font-weight: bold;
  border: none;
  padding: 10px 25px;
  border-radius: 0;
  position: relative;
}

.custom-toggle-wrapper .nav-link.active {
  color: #fff !important;
  background: transparent !important;
}

.custom-toggle-wrapper .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #e31e24;
}

/* --- Product Cards --- */
.product-card {
  background: #ffffff;
  border: 1px solid #222;
  border-radius: 0;
  transition: all 0.3s;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  border-color: #e31b23;
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 15px rgba(227, 27, 35, 0.2) !important;
  z-index: 2;
}

.product-img-box {
  background: #ffffff;
  text-align: center;
  position: relative;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #222;
}

.product-img-box img {
  max-height: 90%;
  object-fit: contain;
}

.img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(227, 27, 35, 0.9);
  color: rgb(0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: 0.3s;
  font-family: 'Oxanium', sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.product-card:hover .img-overlay {
  opacity: 1;
}

.part-number-text {
  font-family: 'Oxanium', sans-serif;
  font-size: 1.2rem;
  color: #000000;
  letter-spacing: 1px;
}

.product-card:hover .part-number-text {
  color: #e31b23;
}

/* --- Product card: sectioned layout (each block = one scannable fact) --- */
.pc-category-ribbon {
  position: absolute;
  top: 12px;
  left: 0;
  z-index: 1;
  background: #CC0000;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: .3rem .6rem;
  max-width: 80%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

@media (max-width: 576px) {
  .pc-category-ribbon {
    top: 8px;
    max-width: 72%;
    font-size: .6rem;
    padding: .22rem .45rem;
    letter-spacing: .02em;
  }
}
.pc-section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .6rem;
}
.pc-stock-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #f0fdf4;
  color: #16a34a;
  font-family: 'Oxanium', sans-serif;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .06em;
  padding: .3rem .5rem;
  border-radius: 999px;
  margin-top: .2rem;
  white-space: nowrap;
}
.pc-stock-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
}
.pc-stock-pill.pc-stock-pill-out {
  background: #f4f4f5;
  color: #9ca3af;
}
.pc-stock-pill.pc-stock-pill-out .dot {
  background: #9ca3af;
}
.pc-section {
  padding: .65rem .9rem;
  border-bottom: 1px solid #eee;
}
.pc-section:last-child {
  border-bottom: none;
}
.pc-section-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem 1rem;
}
.pc-value-sm {
  font-size: .85rem;
  font-weight: 600;
  color: #495057;
}
.pc-section-footer {
  margin-top: auto;
  border-bottom: none;
  background: #f7f7f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: .18s;
}
.product-card:hover .pc-section-footer {
  background: #101010;
}
.pc-view-link {
  font-family: 'Oxanium', sans-serif;
  font-weight: 700;
  font-size: .76rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #1a1a1a;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: .18s;
}
.pc-view-link i {
  font-size: .68rem;
  color: #e31b23;
  transition: .18s;
}
.product-card:hover .pc-view-link {
  color: #fff;
}
.product-card:hover .pc-view-link i {
  transform: translateX(3px);
}
.pc-qty {
  font-size: .72rem;
  font-weight: 600;
  color: #9ca3af;
  transition: .18s;
}
.product-card:hover .pc-qty {
  color: #6b7280;
}
.pc-label {
  font-family: 'Oxanium', sans-serif;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: #98a2b3;
  margin-bottom: .3rem;
}
.pc-part-no {
  margin: 0 0 .35rem;
  color: #000;
  font-size: 1.35rem;
  font-weight: 700;
  font-family: 'Oxanium', sans-serif;
  line-height: 1.2;
}
.pc-nisto-badge {
  display: inline-block;
  font-size: .85rem;
  font-family: 'Oxanium', sans-serif;
  color: #6b7280;
}
.pc-description {
  margin: 0;
  color: #212529;
  font-size: 1rem;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pc-chip {
  display: inline-block;
  text-decoration: none;
  font-size: .85rem;
  font-family: 'Oxanium', sans-serif;
  color: #6b7280;
  border: 1px solid #d7dbe0;
  border-radius: 4px;
  padding: 2px 8px;
}
.pc-chip:hover {
  color: #CC0000;
  border-color: #CC0000;
}
.pc-brand-badge {
  display: inline-block;
  color: #CC0000;
  font-weight: 600;
  font-size: .9rem;
}
.pc-model {
  font-size: 1rem;
  color: #495057;
}
.pc-years {
  font-size: .95rem;
  color: #6b7280;
  margin-top: .35rem;
}
/* --- Product detail modal (white / red, sectioned) --- */
.pd-modal .modal-content {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px !important;
  border-top: 4px solid #e31b23;
  box-shadow: 0 25px 70px rgba(0,0,0,.35);
  overflow: hidden;
}
.pd-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: rgba(255,255,255,.9);
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.pd-close:hover {
  background: #e31b23;
  border-color: #e31b23;
  color: #fff;
  transform: rotate(90deg);
}
.pd-image-panel {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  background:
    radial-gradient(circle at 30% 20%, rgba(227,27,35,.06), transparent 55%),
    #fafafa;
  border-right: 1px solid #eee;
  overflow: hidden;
}
.pd-image-panel img {
  max-height: 340px;
  filter: drop-shadow(0 20px 20px rgba(0,0,0,.12));
}
.pd-zoom-img {
  cursor: zoom-in;
  transition: transform .25s ease;
  will-change: transform;
}
.pd-zoom-wrap.pd-zoom-active .pd-zoom-img {
  transform: scale(2.4);
  transition: transform .06s ease-out;
}
.pd-zoom-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(16,16,16,.75);
  color: #fff;
  font-family: 'Oxanium', sans-serif;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .35rem .7rem;
  border-radius: 999px;
  opacity: 0;
  transition: opacity .18s;
  pointer-events: none;
}
.pd-zoom-wrap:hover .pd-zoom-hint {
  opacity: 1;
}
.pd-zoom-wrap.pd-zoom-active .pd-zoom-hint {
  opacity: 0;
}
@media (max-width: 767px) {
  .pd-zoom-hint { display: none; }
}
.pd-ribbon {
  position: absolute;
  top: 18px;
  left: 0;
  background: #e31b23;
  color: #fff;
  font-family: 'Oxanium', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .35rem .75rem;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.pd-info-panel {
  background: #ffffff;
  color: #1a1a1a;
  padding: 2.25rem 2.5rem;
  max-height: 78vh;
  overflow-y: auto;
}
.pd-eyebrow {
  font-family: 'Oxanium', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: #e31b23;
}
.pd-title {
  font-family: 'Oxanium', sans-serif;
  font-weight: 800;
  font-size: 2.3rem;
  color: #111;
  line-height: 1.15;
  margin: .2rem 0 .5rem;
}
.pd-nisto {
  display: inline-block;
  font-family: 'Oxanium', sans-serif;
  font-size: .95rem;
  color: #6b7280;
}
.pd-section {
  border-top: 1px solid #eee;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
}
.pd-section-last {
  padding-bottom: .25rem;
}
.pd-label {
  font-family: 'Oxanium', sans-serif;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #98a2b3;
}
.pd-value {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-top: .2rem;
}
.pd-value-accent {
  color: #e31b23;
  text-transform: uppercase;
  font-weight: 800;
}
.pd-description {
  margin: .2rem 0 0;
  color: #495057;
  font-size: 1.1rem;
}
.pd-chip {
  display: inline-block;
  text-decoration: none;
  font-family: 'Oxanium', sans-serif;
  font-size: .95rem;
  color: #495057;
  background: #f7f8fa;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  padding: 5px 12px;
  transition: .2s;
}
.pd-chip:hover {
  color: #fff;
  border-color: #e31b23;
  background: #e31b23;
}
.pd-spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.pd-spec-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.pd-spec-box {
  background: #fdecec;
  border: 1px solid #f8d3d3;
  border-radius: 8px;
  padding: .75rem;
  text-align: center;
}
.pd-spec-box-out {
  background: #f3f4f6;
  border-color: #e5e7eb;
}
.pd-spec-box-out .pd-value {
  color: #6b7280;
}
.pd-dim-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .6rem;
}
.pd-dim-box {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  padding-bottom: .5rem;
}
.pd-dim-letter {
  background: #e31b23;
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  padding: .3rem 0;
  margin-bottom: .4rem;
}
.pd-vehicle-list {
  max-height: 180px;
  overflow-y: auto;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: .75rem;
}
.pd-vehicle-brand {
  font-family: 'Oxanium', sans-serif;
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #e31b23;
  margin-bottom: .35rem;
}
.pd-universal-note {
  font-size: 1rem;
  font-style: italic;
  color: #6b7280;
}

/* --- Modals --- */
.modal-content {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 0 !important;
  border-top: 4px solid #e31b23;
  color: #1a1a1a;
}

.modal-header {
  background-color: #e31b23 !important;
  color: #fff !important;
  border-bottom: none !important;
}

.modal-title {
  font-family: 'Oxanium', sans-serif;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
}

.modal-body {
  background: #ffffff;
  color: #1a1a1a;
}

.modal-body hr {
  border-color: #eee;
}

.modal-body .badge.border {
  background: #f7f8fa !important;
  color: #101828 !important;
  border-color: #eaecf0 !important;
}

.modal-body label {
  color: #555;
  letter-spacing: 1px;
  font-size: 0.85rem;
}

.modal-footer {
  background: #f8f8f8 !important;
  border-top: 1px solid #eee !important;
}

.btn-close-white {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* --- Pagination --- */
.pagination .btn-outline-nisto {
  color: #aaa;
  border-color: #333;
  background: #111;
  font-family: 'Oxanium', sans-serif;
  border-radius: 4px !important;
}

.pagination .btn-outline-nisto:hover {
  background: #e31b23;
  border-color: #e31b23;
  color: #fff;
}

.pagination .disabled .btn-outline-nisto {
  color: #555;
  border-color: #222;
  background: #0d0d0d;
}

/* --- Login Page --- */
.login-page {
  background: #f5f5f5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  font-family: "Oxanium", sans-serif;
}

.login-card {
  width: 100%;
  max-width: 400px;
  border: 1px solid #e0e0e0;
  border-radius: 0;
  background-color: #ffffff;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
  position: relative;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: #e61e25;
}

.text-red {
  color: #e61e25;
}

.login-page .form-control {
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  color: #1a1a1a;
  border-radius: 0;
  padding: 12px;
}

.login-page .form-control:focus {
  background-color: #ffffff;
  border-color: #e61e25;
  color: #1a1a1a;
  box-shadow: none;
}

.login-page .input-group-text {
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  color: #666;
  border-radius: 0;
}

.btn-login {
  border-radius: 0;
  padding: 14px;
  font-weight: 800;
  background-color: #e61e25;
  border: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: 0.3s;
  color: #fff;
}

.btn-login:hover {
  background-color: #c0000a;
  color: #ffffff;
  transform: translateY(-2px);
}

.form-label {
  color: #555;
  letter-spacing: 1px;
}

.back-link {
  color: #888;
  transition: 0.3s;
}

.back-link:hover {
  color: #e61e25;
}

/* --- Admin Pages --- */
.admin-hero {
  background: #f5f5f5;
  min-height: 100vh;
  padding-top: 80px;
  color: #1a1a1a;
}

.admin-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 0;
  transition: 0.2s;
  text-decoration: none !important;
  padding: 40px 20px;
  border-bottom: 3px solid transparent;
}

.admin-card:hover {
  border-bottom-color: #e61e25;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.admin-icon {
  max-height: 50px;
  opacity: 0.5;
  transition: 0.2s;
  filter: none;
}

.admin-card:hover .admin-icon {
  opacity: 1;
  transform: translateY(-5px);
  filter: none;
}

.admin-label {
  color: #555;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 20px;
  text-transform: uppercase;
}

.admin-card:hover .admin-label {
  color: #e61e25;
}

/* --- Admin Buttons --- */
.btn-action {
  background-color: #e31b23;
  color: white;
  border: none;
  height: 45px;
  font-family: 'Oxanium', sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 4px;
  transition: 0.3s;
}

.btn-action:hover {
  background-color: #ff2a33;
  box-shadow: 0 0 15px rgba(227, 27, 35, 0.5);
  color: white;
}

.btn-reset {
  background-color: #333;
  color: #ccc;
  border: none;
  height: 45px;
  border-radius: 4px;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-reset:hover {
  background-color: #444;
  color: #fff;
}

.btn-edit-dark {
  background: #444444;
  color: #fff;
  font-family: 'Oxanium', sans-serif;
  font-size: 0.8rem;
  font-weight: bold;
  border-radius: 0;
  transition: 0.3s;
}

.btn-edit-dark:hover {
  background: #363636;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

.btn-delete-dark {
  background: #c82333;
  color: #fff;
  font-family: 'Oxanium', sans-serif;
  font-size: 0.8rem;
  font-weight: bold;
  border-radius: 0;
  transition: 0.3s;
}

.btn-delete-dark:hover {
  background: #e31b23;
  color: #fff;
  box-shadow: 0 0 10px rgba(227, 27, 35, 0.5);
}

/* --- Category Dropdown Panel --- */
.cat-drop-panel {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-top: 4px solid #e31e24;
  border-radius: 0 0 8px 8px;
  padding: 30px 35px 25px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.cat-drop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.cat-drop-label {
  font-family: 'Oxanium', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #ffffff;
  text-transform: uppercase;
}

.cat-drop-count-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  /* background: #fff5f5; */
  /* border: 1.5px solid #e31e24; */
  border-radius: 4px;
  padding: 5px 16px;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.cat-drop-count-badge.visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.cat-drop-count-val {
  font-family: 'Oxanium', sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: #000000;
  line-height: 1;
}

.cat-badge-unit {
  font-family: 'Oxanium', sans-serif;
  font-size: 0.5rem;
  letter-spacing: 2px;
  color: #000000;
  text-transform: uppercase;
}

.cat-drop-select-wrap {
  position: relative;
}

.cat-drop-select {
  width: 100%;
  height: 52px;
  background: #f8f8f8;
  border: 1.5px solid #e0e0e0;
  border-radius: 4px;
  color: #1a1a1a;
  font-family: 'Oxanium', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0 50px 0 18px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.cat-drop-select:hover {
  background: #f0f0f0;
  border-color: #ccc;
}

.cat-drop-select:focus {
  outline: none;
  border-color: #e31e24;
  box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.12);
  background: #ffffff;
}

.cat-drop-select option {
  background: #ffffff;
  color: #1a1a1a;
  font-family: sans-serif;
}

.cat-drop-arrow {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #e31e24;
  pointer-events: none;
  font-size: 0.75rem;
  transition: transform 0.3s;
}

.cat-drop-select:focus~.cat-drop-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.cat-drop-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f0f0f0;
  flex-wrap: wrap;
}

.cat-drop-info-text {
  font-family: 'Oxanium', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 1.5px;
  color: #ccc;
  text-transform: uppercase;
  transition: color 0.3s;
}

.cat-drop-info-text.selected {
  color: #888;
}

.cat-drop-confirm {
  height: 46px;
  padding: 0 28px;
  background: #f0f0f0;
  border: 1.5px solid #e0e0e0;
  border-radius: 4px;
  color: #bbb;
  font-family: 'Oxanium', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: not-allowed;
  transition: all 0.3s;
  flex-shrink: 0;
  white-space: nowrap;
}

.cat-drop-confirm.ready {
  background: #e31e24;
  border-color: #e31e24;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(227, 30, 36, 0.35);
}

.cat-drop-confirm.ready:hover {
  background: #c01019;
  box-shadow: 0 6px 28px rgba(227, 30, 36, 0.55);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .cat-drop-panel {
    padding: 22px 20px 20px;
  }

  .cat-drop-action {
    flex-direction: column;
    align-items: stretch;
  }

  .cat-drop-confirm {
    height: 48px;
    width: 100%;
    text-align: center;
  }
}

/* --- Search Results Section --- */
.search-results-section {
  background: #f5f5f5;
  min-height: 300px;
}

/* --- Sidebar Filter --- */
.sidebar-filter-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-top: 4px solid #e31b23;
  border-radius: 0;
}

.filter-group-title {
  font-family: 'Oxanium', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #1a1a1a !important;
  margin-bottom: 8px;
}

.btn-search-sidebar {
  background: #e31b23;
  color: #fff;
  border: none;
  font-family: 'Oxanium', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 1px;
  border-radius: 0;
  transition: 0.3s;
}

.btn-search-sidebar:hover {
  background: #c0000a;
  color: #fff;
  box-shadow: 0 4px 15px rgba(227,27,35,0.3);
}

/* --- Utilities --- */
.shadow {
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
}

.bg-b {
  background-color: #f5f5f5;
  padding: 60px 0;
}

@media (max-width: 576px) {
  .brand-card-agg {
    padding: 25px 10px;
  }

  .brand-name {
    font-size: 0.9rem !important;
  }
}

/* พื้นหลังของโซนเนื้อหา */
.bg-b {
  background-color: #ffffff;
  /* เปลี่ยนเป็นขาวสะอาด */
  padding: 60px 0;
}

/* หัวข้อ Section */
.section-title-agg {
  color: #1a1a1a;
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: 1px;
  border-left: 5px solid #e31e24;
  padding-left: 15px;
  margin-bottom: 30px;
}

.section-title-agg span {
  color: #e31e24;
}

/* ตัวการ์ดแบบสีขาว (White Card) */
.brand-card-agg {
  background: #ffffff;
  padding: 40px 20px;
  text-align: center;
  border-radius: 8px;
  border: 1px solid #eeeeee;
  /* เส้นขอบบางๆ สีเทา */
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  /* เงาบางๆ ให้ดูมีมิติ */
}

/* ชื่อสินค้า/หมวดหมู่ */
.brand-name {
  color: #333333;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

/* สถิติจำนวน ITEMS */
.brand-stats {
  color: #999999;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
}

/* Hover Effects สำหรับการ์ดขาว */
.brand-card-agg:hover {
  background: #ffffff;
  transform: translateY(-8px);
  border-color: #e31e24;
  /* ขอบเปลี่ยนเป็นสีแดง */
  box-shadow: 0 10px 25px rgba(227, 30, 36, 0.1);
  /* เงาสีแดงจางๆ */
}

.brand-card-agg:hover .brand-name {
  color: #e31e24;
}

/* Modal Styling */
.modal-header {
  background: #e31b23;
  border-bottom: none;
}

.info-label {
  color: #e31e24;
  /* Label เป็นสีแดงเด่น */
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.info-value {
  color: #1a1a1a;
  font-weight: 600;
}

/* Dimensions Box (สีขาว-เทา) */
.dimension-badge {
  background: #f8f9fa;
  border: 1px solid #eee;
  padding: 10px;
  border-radius: 8px;
}

.dimension-badge .val {
  color: #e31e24;
  /* ตัวเลขเป็นแดง */
}

/* Model Tags */
.model-tag {
  background: #969696;
  /* พื้นหลังแดงอ่อนๆ */
  /* border: 1px solid #525252; */
  color: #000000;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
}

/* ลบขอบมนออกเพื่อให้แนบชิดขอบจอ */
.nisto-carousel-full {
  width: 100%;
  margin: 0;
  padding: 0;
}

.nisto-carousel-full .carousel-item {
  height: 60vh;
  /* ปรับความสูงเป็น 60% ของความสูงหน้าจอ (หรือปรับตามชอบ) */
  min-height: 400px;
}

.nisto-carousel-full .carousel-item img {
  object-fit: cover;
  height: 100%;
  width: 100%;
  filter: brightness(0.6);
  /* ทำให้รูปเข้มขึ้นนิดนึงเพื่อให้ตัวหนังสืออ่านง่าย */
}

/* จัดตำแหน่งข้อความให้นิ่งและสวยงาม */
.nisto-carousel-full .carousel-caption {
  bottom: 50%;
  transform: translateY(50%);
  /* ให้อยู่กึ่งกลางแนวตั้ง */
  text-align: left;
  left: 10%;
  right: 10%;
}

.nisto-carousel-full .carousel-caption h2 {
  font-family: 'Oxanium', sans-serif;
  font-size: 4rem;
  /* ตัวหนังสือใหญ่สะใจแบบเต็มจอ */
  letter-spacing: 2px;
  margin-bottom: 0;
}

.nisto-carousel-full .carousel-caption p {
  font-size: 1.4rem;
  margin-top: 10px;
  max-width: 600px;
  border-left: 4px solid #e31e24;
  padding-left: 20px;
}

/* ปุ่มใน Carousel */
.nisto-carousel-full .btn-danger {
  background-color: #e31e24;
  border: none;
  font-weight: bold;
  letter-spacing: 1px;
  /* border-radius: 0; */
  /* ปุ่มเหลี่ยมๆ จะดูเข้ากับธีมอุตสาหกรรมมากกว่า */
}

/* ปรับ Indicators ให้ดูทันสมัย */
.nisto-carousel-full .carousel-indicators [button] {
  height: 4px;
  background-color: #e31e24;
}

/* รองรับมือถือ */
@media (max-width: 768px) {
  .nisto-carousel-full .carousel-item {
    height: 50vh;
  }

  .nisto-carousel-full .carousel-caption h2 {
    font-size: 2.2rem;
  }

  .nisto-carousel-full .carousel-caption {
    text-align: center;
    left: 5%;
    right: 5%;
  }
}


.custom-modal-content {
  background: #ffffff;
  border: none;
  border-radius: 0;
  border-top: 5px solid #dc3545;
  /* เน้นสีแดงที่ขอบบน */
  color: #333;
  font-family: 'Oxanium', sans-serif;
  overflow: hidden;
}

.modal-header {
  border-bottom: 1px solid #f0f0f0;
  background: #ffffff;
  padding: 1rem 1.5rem;
}

.product-image-section {
  background: #ffffff;
  border-bottom: 1px solid #eee;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* สไตล์ตามรูปภาพตัวอย่าง */
.part-number-main {
  font-family: 'Oxanium', sans-serif;
  font-weight: 700;
  font-size: 2.2rem;
  color: #000;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 10px;
}

.nisto-badge {
  display: inline-block;
  background: #dc3545;
  color: white;
  padding: 4px 12px;
  font-family: 'Oxanium', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.brand-section {
  border-left: 4px solid #dc3545;
  padding-left: 15px;
  margin-bottom: 20px;
}

.brand-name {
  font-family: 'Oxanium', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #2c3e50;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.year-text {
  font-family: 'Oxanium', sans-serif;
  color: #7f8c8d;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.description-text {
  font-family: 'Oxanium', sans-serif;
  border-top: 1px solid #eee;
  padding-top: 15px;
  text-transform: uppercase;
  color: #555;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

/* ส่วนรายละเอียดสเปกเพิ่มเติม */
.spec-grid-card {
  background: #fbfbfb;
  border: 1px solid #eee;
  padding: 12px;
  height: 100%;
}

.info-label {
  font-family: 'Oxanium', sans-serif;
  text-transform: uppercase;
  font-size: 0.65rem;
  color: #999;
  font-weight: 700;
  margin-bottom: 2px;
}

.dimension-badge {
  background: #fff;
  border: 1px solid #ddd;
  padding: 8px 4px;
  text-align: center;
}

.dimension-badge .name {
  font-family: 'Oxanium', sans-serif;
  display: block;
  font-size: 0.6rem;
  color: #dc3545;
  font-weight: 800;
}

.dimension-badge .val {
  font-size: 0.9rem;
  color: #1a1a1a;
  font-weight: 700;
}

.model-tag {
  background: #f1f1f1;
  color: #333;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-left: 3px solid #dc3545;
}

.btn-close {
  border-radius: 0;
  opacity: 1;
  background-color: #f8f9fa;
}


/* คอนเทนเนอร์หลักของรูปภาพ */
/* คอนเทนเนอร์ฝั่งซ้ายที่คุณมีอยู่แล้ว */
.product-image-section {
  position: relative;
  overflow: hidden;
  /* บังคับให้รูปที่ซูมไม่ล้นออกจากคอลัมน์ 5 */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  min-height: 350px;
  /* ปรับความสูงขั้นต่ำให้สมดุลกับเนื้อหาขวา */
  background: #fff;
}

/* ตัวรูปภาพข้างใน */
.product-image-section img {
  transition: transform 0.1s ease-out;
  /* ให้เลื่อนตามเมาส์แบบหน่วงนิดๆ ดูแพง */
  transform-origin: center center;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* ให้รูปอยู่ตรงกลางกรอบเสมอ */
  pointer-events: none;
  /* เพื่อให้เมาส์โฟกัสที่ตัวกรอบ ไม่กระตุกเวลาโดนรูป */
}

/* สถานะเริ่มต้น: โปร่งใสและขยับลงไปด้านล่างเล็กน้อย */
.reveal-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
    visibility: hidden;
}

/* สถานะเมื่อปรากฏบนจอ: ค่อยๆ แสดงและเลื่อนขึ้นมาที่เดิม */
.reveal-item.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}
/* ===== Select2 Custom Theme ===== */

.select2-container--bootstrap-5 .select2-selection {
  font-family: 'Oxanium', sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: #f3f3f3 !important;
  border: 1.5px solid #ced4da !important;
  border-radius: 4px !important;
  color: #1a1a1a !important;
  height: 45px !important;
  display: flex !important;
  align-items: center !important;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  color: #1a1a1a !important;
  font-family: 'Oxanium', sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding-left: 14px !important;
}

.select2-container--bootstrap-5 .select2-selection__placeholder {
  color: #888 !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow b {
  border-color: #e31b23 transparent transparent transparent !important;
}

.select2-container--bootstrap-5.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-color: transparent transparent #e31b23 transparent !important;
}

.select2-container--bootstrap-5.select2-container--open .select2-selection,
.select2-container--bootstrap-5.select2-container--focus .select2-selection {
  border-color: #e31b23 !important;
  box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px !important;
}

.select2-container--bootstrap-5 .select2-dropdown {
  background: #ffffff !important;
  border: 1.5px solid #e31b23 !important;
  border-radius: 4px !important;
  box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px !important;
  z-index: 9999;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
  background: #f3f3f3 !important;
  border: 1px solid #ced4da !important;
  border-radius: 4px !important;
  color: #1a1a1a !important;
  font-family: 'Oxanium', sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 8px 12px !important;
  outline: none !important;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field:focus {
  border-color: #e31b23 !important;
  box-shadow: none !important;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field::placeholder {
  color: #aaa !important;
}

.select2-container--bootstrap-5 .select2-results__option {
  font-family: 'Oxanium', sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #1a1a1a !important;
  padding: 10px 16px !important;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s, color 0.15s;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
  background: #e31b23 !important;
  color: #fff !important;
}

.select2-container--bootstrap-5 .select2-results__option[aria-selected="true"] {
  background: #fdecea !important;
  color: #e31b23 !important;
}

.select2-container--bootstrap-5 .select2-results__option--message {
  color: #aaa !important;
  font-style: italic;
  text-transform: none;
}

/* --- Search loading overlay --- */
.search-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(255, 255, 255, .9);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.search-loading-overlay.active { display: flex; }
.search-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #eee;
  border-top-color: #e31b23;
  border-radius: 50%;
  animation: search-loading-spin 0.8s linear infinite;
}
.search-loading-text {
  font-family: 'Oxanium', sans-serif;
  font-weight: 700;
  letter-spacing: .08em;
  color: #e31b23;
  font-size: .85rem;
}
@keyframes search-loading-spin {
  to { transform: rotate(360deg); }
}
body.dark-mode .search-loading-overlay {
  background: rgba(13, 13, 13, .9);
}

/* --- Side rail (floating vertical icon bar) --- */
.side-rail {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 1050;
  background: #ffffff;
  border: 1px solid #eee;
  border-right: none;
  border-radius: 14px 0 0 14px;
  padding: 8px 8px 8px 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.side-rail-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s;
}
.side-rail-btn:hover {
  background: #fdecec;
  color: #e31b23;
}
.side-rail-btn.active {
  background: #e6f9ec;
  color: #16a34a;
}

/* --- Dark mode theme --- */
body.dark-mode {
  background-color: #0d0d0d;
  color: #e5e7eb;
}
body.dark-mode .side-rail {
  background: #1b1c20;
  border-color: #333539;
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
}
body.dark-mode .side-rail-btn {
  color: #e5e7eb;
}
body.dark-mode .side-rail-btn:hover {
  background: #26282c;
  color: #ff6b6b;
}
body.dark-mode .sidebar-filter-card {
  background: #17181b !important;
  border: 1px solid #26282c;
  color: #e5e7eb;
}
body.dark-mode .sidebar-filter-card .filter-group-title,
body.dark-mode .sidebar-filter-card label {
  color: #e5e7eb !important;
}
body.dark-mode .sidebar-filter-card .form-select,
body.dark-mode .sidebar-filter-card .form-control {
  background-color: #111214;
  border-color: #333539;
  color: #e5e7eb;
}
body.dark-mode #resultsCol h5,
body.dark-mode #resultsCol .text-dark {
  color: #e5e7eb !important;
}
body.dark-mode .product-card {
  background: #17181b;
  border: 1px solid #26282c;
}
body.dark-mode .product-img-box {
  background: #ffffff;
  border-bottom: 1px solid #26282c;
}
body.dark-mode .pc-section {
  border-bottom-color: #26282c;
}
body.dark-mode .pc-section-footer {
  background: #1b1c20;
}
body.dark-mode .product-card:hover .pc-section-footer {
  background: #000;
}
body.dark-mode .pc-view-link {
  color: #e5e7eb;
}
body.dark-mode .pc-value-sm {
  color: #9ca3af;
}
body.dark-mode .pc-stock-pill {
  background: rgba(22,163,74,.12);
}
body.dark-mode .pc-stock-pill.pc-stock-pill-out {
  background: #1b1c20;
}
body.dark-mode .pc-part-no {
  color: #fff;
}
body.dark-mode .pc-nisto-badge {
  color: #9ca3af;
}
body.dark-mode .pc-chip {
  color: #9ca3af;
  border-color: #333539;
}
body.dark-mode .pc-model,
body.dark-mode .pc-years,
body.dark-mode .pc-category {
  color: #9ca3af;
}
body.dark-mode .pd-modal .modal-content {
  background: #111214;
  border-color: #2a2c30;
  box-shadow: 0 25px 70px rgba(0,0,0,.65);
}
body.dark-mode .pd-close {
  background: rgba(0,0,0,.5);
  border-color: #333;
  color: #fff;
}
body.dark-mode .pd-image-panel {
  background: #ffffff;
  border-right-color: #2a2c30;
}
body.dark-mode .pd-image-panel img {
  filter: drop-shadow(0 15px 20px rgba(0,0,0,.25));
}
body.dark-mode .pd-info-panel {
  background: #111214;
  color: #e5e7eb;
}
body.dark-mode .pd-title {
  color: #fff;
}
body.dark-mode .pd-nisto {
  color: #9ca3af;
}
body.dark-mode .pd-section {
  border-top-color: #26282c;
}
body.dark-mode .pd-label {
  color: #6b7280;
}
body.dark-mode .pd-value {
  color: #e5e7eb;
}
body.dark-mode .pd-value-accent {
  color: #ff4d4d;
}
body.dark-mode .pd-description {
  color: #cbd5e1;
}
body.dark-mode .pd-chip {
  color: #d1d5db;
  background: #1b1c20;
  border-color: #333539;
}
body.dark-mode .pd-chip:hover {
  color: #fff;
  border-color: #e31b23;
  background: #e31b23;
}
body.dark-mode .pd-spec-box {
  background: #17181b;
  border-color: #26282c;
}
body.dark-mode .pd-dim-box {
  background: #17181b;
  border-color: #26282c;
}
body.dark-mode .pd-vehicle-list {
  background: #17181b;
  border-color: #26282c;
}
body.dark-mode .pd-vehicle-brand {
  color: #ff4d4d;
}
body.dark-mode .pd-universal-note {
  color: #9ca3af;
}
body.dark-mode .search-results-section,
body.dark-mode .bg-b {
  background: #0d0d0d !important;
}
body.dark-mode .section-title-agg,
body.dark-mode .section-title-agg .text-dark,
body.dark-mode h3.text-dark,
body.dark-mode li.text-dark {
  color: #e5e7eb !important;
}
body.dark-mode .text-muted {
  color: #9ca3af !important;
}
body.dark-mode .btn-outline-danger {
  color: #ff6b6b;
  border-color: #ff6b6b;
}
body.dark-mode .btn-outline-danger:hover {
  background: #e31b23;
  border-color: #e31b23;
  color: #fff;
}
body.dark-mode .footer-section {
  background: #0d0d0d !important;
  color: #9ca3af;
}
body.dark-mode .custom-navbar {
  background: #111214 !important;
  border-bottom-color: #26282c;
}
body.dark-mode .custom-navbar .nav-link,
body.dark-mode .custom-navbar .navbar-brand>span {
  color: #e5e7eb !important;
}
body.dark-mode .custom-navbar .custom-navbar-nav li a:hover,
body.dark-mode .custom-navbar .custom-navbar-nav li.active a {
  background: #1b1c20;
}
body.dark-mode .navbar-topstrip {
  background: #17181b;
  border-bottom: 1px solid #26282c;
}
body.dark-mode .custom-navbar .navbar-toggler {
  border-color: #333539;
}

/* --- Dark mode: plain product modal (search.html, pre-redesign markup) --- */
body.dark-mode .modal-content {
  background-color: #17181b;
  border-color: #26282c;
  color: #e5e7eb;
}
body.dark-mode .modal-header.bg-light,
body.dark-mode .modal-footer {
  background-color: #1b1c20 !important;
}
body.dark-mode .modal-body,
body.dark-mode .modal-body.bg-white,
body.dark-mode .bg-white {
  background-color: #17181b !important;
  color: #e5e7eb;
}
body.dark-mode .modal-title {
  color: #fff;
}
body.dark-mode .modal-body .badge.border {
  background: #1b1c20 !important;
  color: #e5e7eb !important;
  border-color: #333539 !important;
}

/* --- Dark mode: contact page --- */
body.dark-mode .contact-wrap {
  background: #0d0d0d;
}
body.dark-mode .contact-card,
body.dark-mode .contact-panel {
  background: #17181b;
  border-color: #26282c;
  color: #e5e7eb;
}
body.dark-mode .contact-card h5,
body.dark-mode .contact-panel h2 {
  color: #fff;
}
body.dark-mode .contact-card p,
body.dark-mode .contact-card a,
body.dark-mode .contact-panel .sub,
body.dark-mode .hours-list li {
  color: #9ca3af;
}
body.dark-mode .hours-list li span:last-child {
  color: #e5e7eb;
}
body.dark-mode .hours-list li {
  border-bottom-color: #26282c;
}
body.dark-mode .form-floating-nisto label {
  color: #9ca3af;
}
body.dark-mode .form-floating-nisto .form-control,
body.dark-mode .form-floating-nisto textarea {
  background: #111214;
  border-color: #333539;
  color: #e5e7eb;
}
body.dark-mode .social-row a {
  background: #1b1c20;
  color: #9ca3af;
}

/* ===== End Select2 Custom Theme ===== */

/* ======================================================
   RESPONSIVE / MOBILE FIXES (site-wide)
   ====================================================== */

/* Global safety: never let media overflow their container */
img, video, iframe {
  max-width: 100%;
}

@media (max-width: 768px) {
  /* --- Navbar --- */
  .custom-navbar {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .custom-navbar .navbar-brand img {
    width: 190px !important;
  }
  .custom-navbar .navbar-brand {
    font-size: 24px;
  }
  .custom-navbar .custom-navbar-nav li a {
    padding: .85rem 1rem !important;
    font-size: .78rem;
  }
  .custom-navbar .nav-category-menu {
    max-height: 320px;
  }

  /* --- Side rail: shrink & keep off content on small screens --- */
  .side-rail {
    padding: 6px;
    gap: 2px;
  }
  .side-rail-btn {
    width: 34px;
    height: 34px;
    font-size: .95rem;
  }

  /* --- Footer --- */
  .footer-section .sofa-img {
    display: none;
  }
  .footer-section .row.pt-5 {
    padding-top: 2rem !important;
  }

  /* --- Product detail modal --- */
  .pd-image-panel {
    min-height: 260px;
    padding: 1.5rem;
    border-right: none;
    border-bottom: 1px solid #eee;
  }
  .pd-image-panel img {
    max-height: 220px;
  }
  .pd-info-panel {
    padding: 1.5rem 1.25rem;
    max-height: none;
  }
  .pd-title {
    font-size: 1.6rem;
  }
  .pd-eyebrow {
    font-size: .74rem;
  }
  .pd-value {
    font-size: 1rem;
  }
  .pd-description {
    font-size: .95rem;
  }
  .pd-spec-grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .pd-dim-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pd-close {
    width: 32px;
    height: 32px;
    top: 10px;
    right: 10px;
  }

  /* --- Product cards --- */
  .product-img-box {
    height: 150px;
  }
  .pc-part-no {
    font-size: 1.1rem;
  }
  .pc-section {
    padding: .55rem .7rem;
  }

  /* --- Modals (generic bootstrap ones used across admin/legacy markup) --- */
  .modal-dialog {
    margin: .75rem;
  }
  .product-image-section {
    min-height: 220px;
  }
  .part-number-main {
    font-size: 1.6rem;
  }

  /* --- Sidebar filter / search --- */
  .sidebar-filter-card {
    padding: 1.25rem !important;
  }
  .search-container {
    margin-top: 16px;
  }
  .btn-search-action,
  .btn-search-sidebar {
    height: 48px;
  }

  /* --- Admin cards --- */
  .admin-card {
    padding: 24px 12px;
  }

  /* --- Login --- */
  .login-card {
    margin: 0 12px;
  }

  /* --- Section titles / hero paddings --- */
  .section-title-agg {
    font-size: 1.4rem;
  }
  .hero {
    padding: 30px 0;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
    line-height: 1.6;
  }
  .custom-navbar .navbar-brand img {
    width: 150px !important;
  }
  .navbar-topstrip {
    font-size: .64rem;
  }

  /* --- Product detail modal: tighten further --- */
  .pd-title {
    font-size: 1.35rem;
  }
  .pd-spec-grid,
  .pd-spec-grid-3 {
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
  }
  .pd-section {
    margin-top: .8rem;
    padding-top: .8rem;
  }
  .pd-section.d-flex {
    gap: 1rem !important;
  }

  /* --- Product card grid: 2-up cards need smaller type/padding --- */
  .product-img-box {
    height: 120px;
  }
  .pc-label {
    font-size: .6rem;
  }
  .pc-part-no {
    font-size: .85rem;
  }
  .pc-nisto-badge {
    font-size: .7rem;
  }
  .pc-value-sm,
  .pc-model,
  .pc-years {
    font-size: .72rem;
  }
  .pc-section {
    padding: .4rem .55rem;
  }
  .pc-stock-pill {
    font-size: .54rem;
    padding: .2rem .35rem;
  }
  .pc-view-link {
    font-size: .62rem;
  }
  .pc-qty {
    font-size: .62rem;
  }

  /* --- Buttons: keep tap targets comfortable, but not oversized --- */
  .btn {
    padding: 10px 18px;
  }

  /* --- Footer --- */
  .footer-heading {
    margin-top: 1.2rem;
  }

  /* --- Admin --- */
  .admin-label {
    font-size: .75rem;
  }
}
