* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #F8FAFC;
  color: #0F172A;
  overflow-x: hidden;
}

body.lang-kh {
  font-family: 'Noto Sans Khmer', 'Inter', sans-serif;
}

/* Force utility mono text to Khmer font in KH mode. */
body.lang-kh .font-mono {
  font-family: 'Noto Sans Khmer', 'Inter', sans-serif !important;
}

@keyframes glitch-anim-1 {
  0% { clip-path: inset(20% 0 80% 0); transform: translate(-3px, 2px); }
  20% { clip-path: inset(30% 0 50% 0); transform: translate(-2px, 1px); }
  40% { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 2px); }
  60% { clip-path: inset(5% 0 85% 0); transform: translate(-3px, 1px); }
  80% { clip-path: inset(40% 0 40% 0); transform: translate(-2px, -1px); }
  100% { clip-path: inset(25% 0 55% 0); transform: translate(-1px, -2px); }
}

@keyframes glitch-anim-2 {
  0% { clip-path: inset(60% 0 10% 0); transform: translate(3px, -2px); }
  20% { clip-path: inset(80% 0 5% 0); transform: translate(1px, -1px); }
  40% { clip-path: inset(50% 0 30% 0); transform: translate(2px, -3px); }
  60% { clip-path: inset(70% 0 15% 0); transform: translate(3px, -2px); }
  80% { clip-path: inset(40% 0 40% 0); transform: translate(1px, -1px); }
  100% { clip-path: inset(25% 0 55% 0); transform: translate(2px, -3px); }
}

.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch-text::before {
  color: #60A5FA;
  animation: glitch-anim-1 2s infinite linear alternate-reverse;
  z-index: -1;
}

.glitch-text::after {
  color: #2563EB;
  animation: glitch-anim-2 2s infinite linear alternate-reverse;
  z-index: -1;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-track {
  animation: marquee 40s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes scan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.stroke-text {
  -webkit-text-stroke: 2px rgba(255,255,255,0.25);
  color: transparent;
}

.text-shadow-glow {
  text-shadow: 0 0 20px rgba(59,130,246,0.4), 0 0 40px rgba(59,130,246,0.2);
}

.glass-card-solid {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
}

.product-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(59,130,246,0.12), 0 4px 16px rgba(0,0,0,0.06);
  border-color: #93C5FD;
}

.partner-card {
  transition: all 0.3s ease;
}

.partner-card:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
  transform: scale(1.02);
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
  background: #93C5FD;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3B82F6;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #3B82F6;
  border-radius: 1px;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active {
  transform: translateX(0);
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.blue-badge {
  background: rgba(59, 130, 246, 0.1);
  color: #2563EB;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.blue-icon-box {
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
}

.tag-pill {
  background: #F1F5F9;
  color: #64748B;
}

.input-field {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: filter 0.3s ease;
}

.logo-img-footer {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.logo-img-footer:hover {
  opacity: 1;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slide .slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 6s ease-out;
}

.slide.active .slide-bg {
  transform: scale(1);
}

.slide .slide-content {
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.8s ease 0.4s, transform 0.8s ease 0.4s;
}

.slide.active .slide-content {
  opacity: 1;
  transform: translateY(0);
}

.slide .slide-tag {
  opacity: 0;
  transition: opacity 0.6s ease 0.2s;
}

.slide.active .slide-tag {
  opacity: 1;
}

.slide .slide-cta {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.7s ease 0.7s, transform 0.7s ease 0.7s;
}

.slide.active .slide-cta {
  opacity: 1;
  transform: translateY(0);
}

.slide-num {
  font-variant-numeric: tabular-nums;
}

.slide-progress-bar {
  height: 2px;
  background: rgba(255,255,255,0.15);
  position: relative;
  overflow: hidden;
}

.slide-progress-bar .slide-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #60A5FA;
  width: 0%;
  transition: width 0.1s linear;
}

.slide-progress-bar.active .slide-progress-fill {
  width: 100%;
  transition: width 6s linear;
}

.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: all 0.3s ease;
  cursor: pointer;
}

.slide-dot.active {
  background: #60A5FA;
  box-shadow: 0 0 8px rgba(96,165,250,0.5);
  width: 24px;
  border-radius: 4px;
}

.scroll-top-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 40;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  outline: none;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-top-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.35), 0 2px 8px rgba(0,0,0,0.1);
}

.scroll-top-btn:active {
  transform: translateY(0) scale(0.95);
  transition-duration: 0.1s;
}

.scroll-top-btn .btn-bg {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #2563EB;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3), 0 1px 3px rgba(0,0,0,0.08);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.scroll-top-btn:hover .btn-bg {
  background: rgb(30, 64, 175);
}

.scroll-top-btn .progress-ring {
  position: absolute;
  inset: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  transform: rotate(-90deg);
}

.scroll-top-btn .progress-ring-track {
  fill: none;
  stroke: rgba(255,255,255,0.15);
  stroke-width: 2.5;
}

.scroll-top-btn .progress-ring-fill {
  fill: none;
  stroke: #93C5FD;
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.15s ease-out;
}

.scroll-top-btn .btn-icon {
  position: relative;
  z-index: 2;
  color: white;
  transition: transform 0.3s ease;
}

.scroll-top-btn.visible .btn-icon {
  animation: arrowBounceIn 0.5s ease 0.3s both;
}

@keyframes arrowBounceIn {
  0% { transform: translateY(6px); opacity: 0; }
  60% { transform: translateY(-2px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

.scroll-top-btn .percentage-label {
  position: absolute;
  top: -8px;
  right: -4px;
  z-index: 3;
  background: #1E40AF;
  color: white;
  font-size: 9px;
  font-family: 'Inter', monospace;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 1px 5px;
  border-radius: 6px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  line-height: 1.4;
}

.scroll-top-btn:hover .percentage-label {
  opacity: 1;
  transform: scale(1);
}

.partner-pill-link {
  display: inline-flex;
  text-decoration: none;
  outline: none;
}

.partner-pill-link:focus-visible .partner-pill {
  box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #2563EB;
}

.partner-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 14px 8px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  white-space: nowrap;
  transition: all 0.25s ease;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  min-width: 88px;
}

.partner-pill:hover {
  border-color: #93C5FD;
  background: #EFF6FF;
  transform: scale(1.05);
  box-shadow: 0 2px 16px rgba(59, 130, 246, 0.12), 0 0 0 1px rgba(59, 130, 246, 0.05);
}

.pill-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.pill-arrow:hover {
  opacity: 1;
}

.pill-logo {
  height: 45px;
  object-fit: contain;
  border-radius: 6px;
  background: #FFFFFF;
  padding: 2px;
  flex-shrink: 0;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.partner-pill:hover .pill-logo {
  border-color: #93C5FD;
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.15);
}

.pill-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.pill-brand {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1E293B;
  line-height: 1.2;
}

.search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid #E2E8F0;
  background: #F8FAFC;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #64748B;
}

.search-toggle:hover {
  border-color: #2563EB;
  color: #2563EB;
  background: #EFF6FF;
}

.search-toggle svg {
  width: 18px;
  height: 18px;
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay.active .search-box {
  transform: translateY(0);
  opacity: 1;
}

.search-box {
  background: #FFFFFF;
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
  transform: translateY(-16px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  overflow: hidden;
  max-height: 480px;
  display: flex;
  flex-direction: column;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #F1F5F9;
}

.search-input-wrap svg {
  width: 20px;
  height: 20px;
  color: #94A3B8;
  flex-shrink: 0;
}

.search-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  color: #1E293B;
  background: transparent;
}

.search-input-wrap input::placeholder {
  color: #94A3B8;
}

.search-input-wrap kbd {
  font-family: inherit;
  font-size: 11px;
  color: #94A3B8;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 5px;
  padding: 2px 7px;
}

.search-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: #F1F5F9;
  color: #64748B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.search-close-btn:hover {
  background: #E2E8F0;
  color: #334155;
}

.search-close-btn svg {
  width: 14px;
  height: 14px;
}

.search-results {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
}

.search-results::-webkit-scrollbar {
  width: 5px;
}

.search-results::-webkit-scrollbar-track {
  background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
  background: #E2E8F0;
  border-radius: 10px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.search-result-item:hover {
  background: #F8FAFC;
}

.search-result-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}

.search-result-title {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
}

.search-result-desc {
  font-size: 12px;
  color: #64748B;
  line-height: 1.5;
}

.search-empty {
  display: grid;
  place-items: center;
  gap: 12px;
  text-align: center;
  color: #64748B;
  padding: 40px 20px;
}

.search-empty svg {
  width: 48px;
  height: 48px;
}

.search-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  color: #94A3B8;
  padding: 14px 20px;
  border-top: 1px solid #F1F5F9;
}

.search-hint kbd {
  font-family: inherit;
  font-size: 10px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  padding: 4px 8px;
  border-radius: 6px;
}

.cat-item {
  transition: all 0.2s ease;
  cursor: pointer;
  border-radius: 8px;
}

.cat-item:hover {
  background: #F8FAFC;
}

.cat-item.active {
  background: #EFF6FF;
}

.cat-item.active .cat-label {
  color: #1D4ED8;
  font-weight: 600;
}

.cat-item.active .cat-count {
  background: #2563EB;
  color: white;
}

.cat-item.active .cat-arrow {
  color: #2563EB;
  transform: rotate(90deg);
}

.subcat-item {
  transition: all 0.15s ease;
  cursor: pointer;
  border-radius: 6px;
}

.subcat-item:hover {
  background: #F1F5F9;
}

.subcat-item.active {
  background: #DBEAFE;
  color: #1D4ED8;
  font-weight: 600;
}

.subcat-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.subcat-list.open {
  max-height: 400px;
}

.cat-arrow {
  transition: transform 0.25s ease;
}

.cat-item.active .cat-arrow {
  transform: rotate(90deg);
}

.filter-check {
  display: none;
}

.filter-check + label {
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-check + label .check-box {
  width: 16px;
  height: 16px;
  border: 1.5px solid #CBD5E1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.filter-check:checked + label .check-box {
  background: #2563EB;
  border-color: #2563EB;
}

.filter-check:checked + label .check-box .check-icon {
  opacity: 1;
}

.filter-check + label .check-box .check-icon {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.filter-check:checked + label .filter-label {
  color: #1D4ED8;
}

.range-track {
  height: 4px;
  background: #E2E8F0;
  border-radius: 2px;
  position: relative;
}

.range-fill {
  position: absolute;
  height: 100%;
  background: #3B82F6;
  border-radius: 2px;
}

.range-thumb {
  width: 18px;
  height: 18px;
  background: white;
  border: 2px solid #3B82F6;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.range-thumb:hover,
.range-thumb:active {
  box-shadow: 0 0 0 4px rgba(59,130,246,0.15);
}

.prod-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.prod-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(59,130,246,0.1), 0 2px 8px rgba(0,0,0,0.04);
  border-color: #93C5FD;
}

.prod-card:hover .prod-img {
  transform: scale(1.05);
}

.prod-img {
  transition: transform 0.5s ease;
}

.view-btn {
  transition: all 0.15s ease;
}

.view-btn.active {
  background: #2563EB;
  color: white;
  border-color: #2563EB;
}

.filter-drawer {
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.filter-drawer.active {
  transform: translateX(0);
}

.page-btn {
  transition: all 0.15s ease;
}

.page-btn.active {
  background: #2563EB;
  color: white;
  border-color: #2563EB;
}

.page-btn:not(.active):hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.active-filter-tag {
  transition: all 0.15s ease;
}

.active-filter-tag:hover {
  background: #FEE2E2;
  border-color: #FECACA;
  color: #DC2626;
}

/* ====== LANGUAGE SWITCHER STYLES ====== */

/* 1. DESKTOP SWITCHER */
#langSwitcher {
  transition: all 0.3s ease;
}
#langSwitcher.nav-scrolled {
  background: #F1F5F9; /* Slate 100 */
  border-color: #E2E8F0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.lang-btn {
  transition: all 0.2s ease;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.6rem;
}
#langSwitcher button {
  color: #475569; /* Slate 700 - Dark Text on Light Background */
}
.lang-active {
  background-color: #2563EB;
  color: #FFFFFF !important;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

/* 2. MOBILE SWITCHER */
#mobileLangSwitcher {
  background: #E2E8F0; /* Slate 200 */
  border-color: #CBD5E1;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
#mobileLangSwitcher .lang-btn {
  color: #334155; /* Slate 700 - Dark Text */
}
#mobileLangSwitcher .lang-active {
  color: #FFFFFF;
}

/* ====== PARTNER PILL ====== */
.partner-pill-link {
    display: inline-flex;
    text-decoration: none;
    outline: none;
}
.partner-pill-link:focus-visible .partner-pill {
    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #2563EB;
}
.partner-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 14px 8px;
    border-radius: 12px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    white-space: nowrap;
    transition: all 0.25s ease;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    min-width: 88px;
}
.partner-pill:hover {
    border-color: #93C5FD;
    background: #EFF6FF;
    transform: scale(1.05);
    box-shadow: 0 2px 16px rgba(59, 130, 246, 0.12), 0 0 0 1px rgba(59, 130, 246, 0.05);
}
.partner-pill:hover .pill-arrow {
    opacity: 1;
    transform: translateY(0);
}
.pill-logo {
    height: 45px;
    object-fit: contain;
    border-radius: 6px;
    background: #FFFFFF;
    padding: 2px;
    flex-shrink: 0;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.partner-pill:hover .pill-logo {
    border-color: #93C5FD;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.15);
}
.pill-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}
.pill-brand {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1E293B;
    line-height: 1.2;
}
.pill-country {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #94A3B8;
    line-height: 1;
    transition: color 0.25s ease;
}
.partner-pill:hover .pill-country {
    color: #3B82F6;
}
.pill-arrow {
    position: absolute;
    top: -5px;
    right: -5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2563EB;
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.3);
}
.pill-arrow-icon {
    font-size: 10px;
    color: white;
    line-height: 1;
    margin-left: -0.5px;
}
