@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600;700;800;900&family=Bebas+Neue&display=swap');

:root, html[data-theme="dark"] {
  --bg: #050505;
  --bg-2: #0a0a0a;
  --bg-3: #111111;
  --surface: #0a0a0a;
  --surface-2: #141414;
  --line: #222222;
  --line-2: #2a2a2a;
  --accent: #e60000;
  --accent-2: #b30000;
  --gold: #ff3333;
  --blue: #222222;
  --blue-2: #111111;
  --line-green: #06c755;
  --text: #ffffff;
  --text-2: #d1d5db;
  --muted: #888888;
  --card: #0a0a0a;
  --card-line: #222222;
  --util-bar: #000000;
  --header: rgba(5,5,5,0.95);
  --footer: #020202;
  --hover-bg: #141414;
  --scroll-track: #050505;
  --scroll-thumb: #333333;
}


/* Skeleton Loading States */
.skeleton {
  pointer-events: none;
}

.skeleton-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
}

.skeleton-text {
  height: 16px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-price {
  height: 20px;
  width: 40%;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
html[data-theme="light"] {
  --bg: #f9fafb;
  --bg-2: #ffffff;
  --bg-3: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --line: #e5e7eb;
  --line-2: #d1d5db;
  --accent: #e60000;
  --accent-2: #cc0000;
  --gold: #ff3333;
  --blue: #111111;
  --blue-2: #000000;
  --line-green: #06c755;
  --text: #111827;
  --text-2: #374151;
  --muted: #6b7280;
  --card: #ffffff;
  --card-line: #e5e7eb;
  --util-bar: #f3f4f6;
  --header: rgba(255,255,255,0.95);
  --footer: #f9fafb;
  --hover-bg: #f3f4f6;
  --scroll-track: #f3f4f6;
  --scroll-thumb: #d1d5db;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Kanit', 'Inter', sans-serif; background: var(--bg); color: var(--text); overflow-x: hidden; transition: background 0.3s ease, color 0.3s ease; }
.font-display { font-family: 'Inter', 'Kanit', sans-serif; }
.font-bebas { font-family: 'Bebas Neue', 'Kanit', sans-serif; letter-spacing: 0.02em; }

/* Scrollbars */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--scroll-track); }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { filter: brightness(1.15); }

/* ============ TOP UTILITY BAR ============ */
.util-bar {
  background: var(--util-bar); color: var(--muted); font-size: 11px;
  border-bottom: 1px solid var(--line);
}

/* ============ MAIN HEADER ============ */
.header-main {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: var(--header);
}

/* ============ MEGA MENU ============ */
#mega-menu {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 49;
  pointer-events: none;
  padding-top: 0;
}
.mega-inner {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  border-top: none;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 4px 18px rgba(230,0,0,0.08);
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(.22,.8,.28,1), opacity 0.24s ease;
  pointer-events: none;
}
html[data-theme="light"] .mega-inner {
  box-shadow: 0 24px 60px rgba(0,0,0,0.14), 0 4px 18px rgba(230,0,0,0.06);
}
#mega-menu.open {
  pointer-events: auto;
}
#mega-menu.open .mega-inner {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mega-body {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 28px 20px 20px;
  max-width: 1440px;
  margin: 0 auto;
}
@media(max-width:1024px){ .mega-body { grid-template-columns: repeat(3,1fr); } }
@media(max-width:640px){ .mega-body { grid-template-columns: repeat(2,1fr); } }
.mega-col {
  padding: 0 20px 10px;
  border-right: 1px solid var(--line);
}
.mega-col:last-child { border-right: none; }
.mega-col-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 7px;
}
.mega-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 6px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 13.5px; font-weight: 500;
  transition: all 0.18s;
  cursor: pointer;
  text-decoration: none;
}
.mega-link:hover {
  background: var(--hover-bg);
  color: var(--text);
  padding-left: 12px;
}
.mega-link i {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--accent);
  flex: none;
}
.mega-link:hover i {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.mega-link .badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff; font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
}
.mega-brand-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-top: 4px;
}
.mega-brand-chip {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
  min-height: 38px;
}
.mega-brand-chip:hover {
  border-color: var(--accent);
  background: var(--hover-bg);
  color: var(--text);
}
.mega-footer-bar {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  padding: 12px 20px;
}
.mega-footer-bar-inner {
  max-width: 1440px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.mega-promo-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff;
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.mega-promo-chip-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); color: var(--text-2);
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
  background: transparent;
  cursor: pointer;
  transition: all .18s;
}
.mega-promo-chip-ghost:hover { border-color: var(--accent); color: var(--accent); }
.mega-overlay {
  position: fixed; inset: 0; z-index: 48;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.24s ease;
}
.mega-overlay.show { opacity: 1; pointer-events: auto; }
/* Trigger button active */
.cat-link.mega-active {
  background: var(--accent) !important;
  color: #fff !important;
}

/* ============ THEME TOGGLE ============ */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px; font-weight: 600;
}
.theme-toggle:hover { background: var(--hover-bg); border-color: var(--accent); }
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: inline; }
html[data-theme="light"] .theme-toggle .sun { display: inline; }
html[data-theme="light"] .theme-toggle .moon { display: none; }
.logo-wrap {
  display: flex; align-items: center; gap: 10px;
}
.logo-icon {
  width: 42px; height: 42px; border-radius: 8px;
  background: linear-gradient(135deg, #e60000 0%, #8b0000 100%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; color: white; font-size: 24px;
  box-shadow: 0 4px 18px rgba(230, 0, 0, 0.4);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.05em;
}
.logo-text {
  font-family: 'Inter', sans-serif;
  font-weight: 900; font-size: 20px; letter-spacing: 0.02em;
  line-height: 1.05;
  text-transform: uppercase;
}
.logo-text .red { color: #e60000; }
.logo-sub { font-size: 10px; color: #888; font-weight: 500; letter-spacing: 0.1em; }

/* Search */
.search-bar {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  transition: all 0.2s;
}
.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,59,47,0.15);
}
.search-input {
  background: transparent;
  color: var(--text);
  border: none;
  outline: none;
  width: 100%;
  padding: 13px 18px;
  font-size: 14px;
}
.search-input::placeholder { color: var(--muted); }
.search-btn {
  background: var(--accent);
  color: white;
  border-radius: 999px;
  padding: 9px 22px;
  font-weight: 500;
  font-size: 14px;
  margin: 4px;
  transition: all 0.2s;
}
.search-btn:hover {
  background: #e6271c;
  transform: scale(1.02);
}

.header-icon {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--text-2);
  transition: color 0.2s;
  position: relative;
  font-size: 11px;
}
.header-icon:hover { color: var(--accent); }
.header-icon .fa { font-size: 19px; margin-bottom: 1px; color: var(--text); transition: color 0.2s; }
.header-icon:hover .fa { color: var(--accent); }
.cart-badge {
  position: absolute;
  top: -4px; right: -8px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
  animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Category nav (TAB BAR) */
.cat-nav {
  background: #0a0a0a;
  border-bottom: 1px solid #1a1a1a;
}
.cat-nav-inner {
  display: flex; align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 10px 0;
}
.cat-link {
  padding: 8px 18px;
  color: #d0d0d0;
  font-size: 14px;
  white-space: nowrap;
  transition: all 0.2s;
  border-radius: 8px;
  display: inline-flex; align-items: center; gap: 6px;
}
.cat-link:hover { color: white; background: #1a1a1a; }
.cat-link.active { color: white; background: #1a1a1a; }
.platinum-btn {
  margin-left: auto;
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border-radius: 8px;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 6px 18px rgba(230,0,0,0.14);
  transition: all 0.2s;
  white-space: nowrap;
}
.platinum-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(230,0,0,0.32); }

/* ============ HERO SECTION ============ */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}
@media (max-width: 1024px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-slider {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 21 / 9;
  background: #111;
}
.hero-slide {
  position: absolute; inset: 0;
  display: flex;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide-content {
  flex: 1; padding: 28px; display: flex; flex-direction: column; justify-content: center;
  position: relative;
}
.hero-slide-img {
  flex: 1; background-size: cover; background-position: center;
  position: relative;
}

.hero-slide-img::after {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 75% 20%, rgba(230,0,0,0.06), transparent 18%), linear-gradient(180deg, rgba(0,0,0,0.18), transparent 40%);
}
.hero-arrows {
  position: absolute; bottom: 12px; right: 12px;
  display: flex; gap: 6px; z-index: 10;
}
.hero-arrow {
  width: 34px; height: 34px; border-radius: 999px;
  background: rgba(255,255,255,0.12); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  color: white; cursor: pointer; transition: all 0.2s;
}
.hero-arrow:hover { background: rgba(255,255,255,0.25); }
.hero-dots {
  position: absolute; bottom: 16px; left: 16px;
  display: flex; gap: 6px; z-index: 10;
  font-size: 12px; color: #fff;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(8px);
  padding: 6px 12px; border-radius: 999px;
}
.hero-pager-dots {
  display: flex; gap: 6px;
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 10;
}
.hero-pager-dots span {
  width: 8px; height: 8px; border-radius: 999px;
  background: rgba(255,255,255,0.35);
  cursor: pointer; transition: all 0.3s;
}
.hero-pager-dots span.active { width: 24px; background: #fff; }

/* Best Seller panel */
.bestseller-panel {
  background: linear-gradient(180deg,rgba(255, 0, 0, 1) 0%, rgba(0, 0, 255, 1) 100%);
  border-radius: 12px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid #333;
}
.bestseller-panel::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 60%;
}
.bestseller-title {
  position: relative; z-index: 1;
  color: white; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.bestseller-title::before {
  content: '★'; color: #ffffff; font-size: 20px;
}
.bs-item {
  position: relative; z-index: 1;
  background: white; border-radius: 8px; padding: 9px;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 10px;
  transition: transform 0.2s;
  cursor: pointer;
}
.bs-item:hover { transform: translateX(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.4); }
.bs-rank {
  font-family: 'Bebas Neue'; font-size: 28px;
  color: #111111;
  min-width: 30px; text-align: center;
  font-weight: 700;
  line-height: 1;
}
.bs-rank.rank-1 { color: #e60000; }
.bs-rank.rank-2 { color: #666666; }
.bs-rank.rank-3 { color: #333333; }
.bs-thumb {
  width: 48px; height: 48px; border-radius: 8px;
  background: #f3f4f6;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.bs-thumb img { max-width: 90%; max-height: 90%; object-fit: contain; }
.bs-info { flex: 1; min-width: 0; }
.bs-brand { font-size: 10px; color: #e60000; font-weight: 600; text-transform: uppercase; }
.bs-name { font-size: 11px; color: #111; font-weight: 500; line-height: 1.2; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ============ TABS ============ */
.main-tabs {
  border-bottom: 1px solid var(--line);
  display: flex; gap: 34px;
}
.main-tab {
  padding: 18px 2px;
  color: #888;
  font-weight: 500;
  font-size: 17px;
  position: relative;
  cursor: pointer;
  transition: color 0.2s;
  background: none; border: none;
  font-family: inherit;
}
.main-tab:hover { color: var(--text); }
.main-tab.active { color: var(--text); }
.main-tab.active::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0;
  height: 3px; background: var(--accent);
  border-radius: 3px 3px 0 0;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ============ PRODUCT CARD (white) ============ */
.product-card {
  background: var(--card); color: var(--text);
  border-radius: 8px; /* Sharper edges */
  border: 1px solid var(--card-line);
  overflow: hidden; position: relative;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1), box-shadow 0.3s, border-color 0.3s;
  cursor: pointer;
  display: flex; flex-direction: column;
  animation: fadeInUp 0.5s ease backwards;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(230,0,0,0.15), 0 0 0 1px rgba(230,0,0,0.5);
  border-color: var(--accent);
}
.product-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: transparent; transition: background 0.3s; z-index: 3;
}
.product-card:hover::before {
  background: var(--accent);
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
.product-card .img-wrap {
  aspect-ratio: 1/1;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  padding: 16px;
}
.product-card .img-wrap img,
.product-card .img-wrap svg {
  max-width: 85%; max-height: 85%; object-fit: contain;
  transition: transform 0.5s;
}
.product-card .img-wrap img.product-photo {
  width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  object-fit: cover;
  border-radius: 8px;
  filter: contrast(1.04) saturate(1.06);
  transition: transform 0.5s, filter 0.35s, box-shadow 0.35s;
}
.product-card:hover .img-wrap img,
.product-card:hover .img-wrap svg {
  transform: scale(1.08);
}
.product-card:hover .img-wrap img.product-photo {
  filter: contrast(1.12) saturate(1.12);
  box-shadow: 0 12px 30px rgba(230,0,0,0.12);
}
.product-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: 10px; font-weight: 700;
  padding: 4px 10px; border-radius: 4px;
  letter-spacing: 0.04em; text-transform: uppercase;
  background: #111; color: #fff;
}
.product-badge.sale { background: var(--accent); }
.product-badge.new { background: #333333; }
.product-badge.hot { background: linear-gradient(90deg, #e60000, #8b0000); }
.product-badge.limited { background: #ffffff; color: #111; }
.product-wishlist,
.product-compare {
  position: absolute; right: 10px; z-index: 2;
  width: 32px; height: 32px; border-radius: 999px;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(4px);
  border: 1px solid #e5e5e5;
  display: flex; align-items: center; justify-content: center;
  color: #555; cursor: pointer;
  transition: all 0.2s;
}
.product-wishlist { top: 10px; }
.product-compare { top: 48px; opacity: 0; transform: scale(0.8); }
.product-card:hover .product-compare { opacity: 1; transform: scale(1); }
.product-wishlist:hover { color: var(--accent); transform: scale(1.1); }
.product-wishlist.active { color: white; background: var(--accent); border-color: var(--accent); }
.product-compare:hover { color: var(--accent); transform: scale(1.1); }

.product-hover-ctas {
  position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2;
  display: flex; gap: 6px;
  opacity: 0; transform: translateY(8px);
  transition: all 0.3s;
}
.product-card:hover .product-hover-ctas { opacity: 1; transform: translateY(0); }
@media (max-width: 768px) {
  .product-hover-ctas { opacity: 1; transform: none; }
  .product-compare { opacity: 1; transform: scale(1); }
}
.btn-buy-now, .btn-add-cart {
  flex: 1;
  padding: 12px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  transition: all 0.18s;
  border: none;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.btn-buy-now {
  background: #111;
  color: white;
}
.btn-buy-now:hover { background: #000; transform: translateY(-1px); }
.btn-add-cart {
  background: var(--accent);
  color: white;
}
.btn-add-cart:hover { background: var(--accent-2); transform: translateY(-1px); }

/* ======= BRAND LOGO EXPLORER (top of product info) ======= */
.product-brand-explorer {
  display: flex;
  align-items: center;
  height: 60px;
  margin: -20px 0px -13px 0px;
}
.product-brand-explorer img,
.product-brand-explorer svg {
  height: 100%;
  width: auto;
  max-width: 160px;
  max-height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}
html[data-theme="dark"] .product-brand-explorer img {
  filter: brightness(0) invert(1) drop-shadow(0 1px 3px rgba(255,255,255,0.1));
}
html[data-theme="dark"] .product-brand-explorer svg text {
  fill: #fff !important;
}
.product-brand-explorer .font-bold {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ======= BRAND LOGO OVERLAY (bottom-left of product image for special cards) ======= */
.product-brand-overlay {
  position: absolute;
  bottom: -20px;
  left: 12px;
  z-index: 5;
  height: 95px;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.product-brand-overlay img,
.product-brand-overlay svg {
  height: 100%;
  width: auto;
  max-width: 160px;
  max-height: 95px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}
.product-brand-overlay .font-bold {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0,0,0,0.5);
  padding: 2px 6px;
  border-radius: 4px;
}

.product-info {
  padding: 12px;
  flex: 1; display: flex; flex-direction: column;
}
.product-colors {
  display: flex; gap: 5px; margin-bottom: 8px;
}
.color-dot {
  width: 14px; height: 14px; border-radius: 999px;
  border: 2px solid #e5e5e5;
  cursor: pointer; transition: transform 0.15s;
  display:inline-block; overflow:hidden;
}
.color-dot:hover { transform: scale(1.25); }
.color-dot.active { border-color: #111; }
.color-dot.variant-thumb {
  width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--line);
  background: var(--surface-2);
  padding: 1px;
}
.color-dot.variant-thumb img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 4px;
}
.color-dot.variant-thumb.active {
  border-color: var(--accent);
}
.product-name {
  font-size: 13px; color: var(--text); font-weight: 500; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 36px;
}
.product-price-row { margin-top: 6px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-now { color: var(--accent); font-weight: 700; font-size: 17px; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 12px; }
.price-disc {
  background: rgba(230, 0, 0, 0.1); color: var(--accent);
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
}
.product-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
  font-size: 11px; color: var(--muted);
}
.rating-stars { color: var(--accent); }

/* ====== BLUE STYLE PRODUCT CARD (Advice-style) ====== */
.product-card.blue-style { border: 1px solid var(--card-line); background: var(--card); }
.product-card.blue-style .img-wrap { background: var(--surface-2); padding: 16px; }
.product-card.blue-style .product-hover-ctas { display: none; }
.product-card.blue-style .product-compare { display: none; }
.btn-row-blue {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  margin: 10px 12px 12px;
}
.product-card.blue-style .btn-blue-buy {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 8px;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer; border: none;
  font-family: inherit;
}
.product-card.blue-style .btn-blue-cart {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
}
.product-card.blue-style .btn-blue-cart:hover { background: var(--hover-bg); border-color: var(--text); }
.product-card.blue-style .btn-blue-now {
  background: var(--accent); color: white;
}
.product-card.blue-style .btn-blue-now:hover { background: var(--accent-2); transform: translateY(-1px); }
.product-view-btn {
  position: absolute; top: 48px; right: 10px; z-index: 3;
  width: 32px; height: 32px; border-radius: 999px;
  background: white; border: 1px solid #e5e7eb;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); cursor: pointer;
  transition: all 0.2s;
}
.product-view-btn:hover { background: var(--accent); color: white; }

/* Removed .brand-logo-sm as it's no longer used, replaced by .product-brand-inline */

/* Compare button active state */
.product-compare.active, .mini-icons i.active {
  background: var(--accent); color: white;
}
.installment-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.1); color: var(--text);
  font-size: 10px; font-weight: 600;
  padding: 3px 8px; border-radius: 4px;
  margin-top: 4px;
  border: 1px solid var(--line);
}
.advice-badge-top {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  display: flex; flex-direction: column; gap: 4px;
}
.advice-badge-top .yellow-chip {
  background: #ffffff;
  color: #111;
  font-size: 9px; font-weight: 800;
  padding: 3px 8px; border-radius: 4px;
  letter-spacing: 0.02em;
}
.advice-badge-top .sale-chip {
  background: var(--accent);
  color: white;
  font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 4px;
  text-transform: uppercase;
}
.mini-icons {
  display: flex; gap: 6px; margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.mini-icons i { cursor: pointer; transition: color 0.2s; }
.mini-icons i:hover { color: var(--accent); }
.rating-badge-blue {
  display: inline-flex; align-items: center; gap: 3px;
  background: #111111; color: white;
  font-size: 10px; font-weight: 600;
  padding: 2px 6px; border-radius: 4px;
}

/* ============ SECTION TITLES ============ */
.section-title-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.section-title {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 700; color: var(--text);
}
.section-title::before {
  content: ''; display: inline-block;
  width: 4px; height: 22px;
  background: var(--accent);
  border-radius: 2px;
}
.section-link {
  color: var(--accent);
  font-size: 14px;
  display: inline-flex; align-items: center; gap: 4px;
  transition: gap 0.2s;
}
.section-link:hover { gap: 8px; }

/* ============ LOGO PARTNERS MARQUEE ============ */
.marquee-wrap {
  overflow: hidden;
  position: relative;
  padding: 0px 0;
  background: transparent;
  border-radius: 16px;
}
.marquee-wrap::before, .marquee-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2;
  pointer-events: none;
}
.marquee-wrap::before {
  left: 0; background: linear-gradient(90deg, var(--bg) 10%, transparent);
}
.marquee-wrap::after {
  right: 0; background: linear-gradient(-90deg, var(--bg) 10%, transparent);
}
.marquee-track {
  display: flex; gap: 0px; align-items: center;
  width: max-content;
  animation: marquee 40s linear infinite;
  padding: 0px 0;
}
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.brand-logo {
  height: 80px;
  min-width: 160px;
  display: flex; align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(.22,.8,.28,1);
  padding: 8px 24px;
  background: transparent;
  border: none;
  border-radius: 14px;
  position: relative;
  transform-origin: center center;
}
.brand-logo img {
  max-height: 60px;
  max-width: 140px;
  width: auto;
  object-fit: contain;
  filter: none;
  opacity: 0.9;
  transition: opacity 0.25s ease, filter 0.3s ease;
}
.brand-logo:hover {
  transform: translateY(-6px);
}
.brand-logo:hover img {
  filter: drop-shadow(0 10px 28px rgba(230,0,0,0.45));
  opacity: 1;
  transform: scale(1.1);
}
@media (max-width: 768px) {
  .brand-logo { height: 60px; min-width: 120px; padding: 6px 16px; }
  .brand-logo img { max-height: 44px; max-width: 100px; }
}

/* ============ MERCULAR-STYLE CAROUSEL - ENHANCED 3D ============ */
.mercular-carousel {
  position: relative;
  padding: 50px 0 60px;
  overflow: hidden;
  perspective: 2000px;
  perspective-origin: 50% 40%;
  background: linear-gradient(180deg, transparent 0%, rgba(230,0,0,0.03) 50%, transparent 100%);
}
.mercular-title {
  text-align: center;
  font-weight: 800;
  font-size: 42px;
  margin-bottom: -35px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.mercular-title::before { content: '🔥 '; color: #ff4444; }
.mercular-title::after { content: ' 🔥'; color: #ff4444; }
.mercular-track {
  position: relative;
  height: 420px;
  width: 100%;
  transform-style: preserve-3d;
}
.mercular-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(320px, 50vw, 600px);
  height: 380px;
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.8s cubic-bezier(.22,.8,.28,1);
  box-shadow: 0 25px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
  transform-origin: center center;
  will-change: transform, opacity;
  cursor: pointer;
  backface-visibility: hidden;
  background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
}
.mercular-slide.active {
  box-shadow: 0 40px 100px rgba(230,0,0,0.25), 0 0 60px rgba(230,0,0,0.1), 0 0 0 2px rgba(230,0,0,0.3);
  z-index: 100;
}
.mercular-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 25% 20%, rgba(255,255,255,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 85%, rgba(0,0,0,0.35) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
}
.mercular-slide::after {
  content: '';
  position: absolute;
  inset: -20%;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 2px);
  background-size: 40px 40px;
  opacity: 0.35;
  z-index: 1;
  pointer-events: none;
  animation: bannerDrift 30s linear infinite;
}
@keyframes bannerDrift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(40px, 40px); }
}
.mercular-slide .banner-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 40px;
  text-align: center;
  gap: 18px;
}
.mercular-slide .banner-logo {
  width: min(72%, 340px);
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s cubic-bezier(.22,.8,.28,1);
}
.mercular-slide.active .banner-logo {
  transform: scale(1.05);
}
.mercular-slide .banner-logo img,
.mercular-slide .banner-logo svg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 8px 24px rgba(0,0,0,0.55))
    drop-shadow(0 0 30px rgba(255,255,255,0.15));
}
.mercular-slide .banner-logo span {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 72px;
  letter-spacing: 4px;
  color: #fff;
  text-shadow: 0 4px 16px rgba(0,0,0,0.6);
}
.mercular-slide .banner-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.mercular-slide .banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: 999px;
  background: #fff;
  color: #0a0a0a;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.mercular-slide .banner-cta i { font-size: 11px; transition: transform 0.3s; }
.mercular-slide:hover .banner-cta { background: var(--accent); color: #fff; transform: translateY(-2px); }
.mercular-slide:hover .banner-cta i { transform: translateX(4px); }
.mercular-slide .slide-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  z-index: 4;
  box-shadow: 0 4px 15px rgba(220,38,38,0.4);
  letter-spacing: 1px;
}
.mercular-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 999px;
  background: #1a1a1a; border: 1px solid #2a2a2a;
  color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: all 0.2s;
}
.mercular-arrow:hover { background: var(--accent); border-color: var(--accent); }
.mercular-arrow.left { left: 20px; }
.mercular-arrow.right { right: 20px; }


.mercular-slide .banner-content,
.mercular-slide .slide-badge,
.mercular-slide::after,
.mercular-slide::before {
  display: none;
}

.mercular-slide .banner-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  padding: 0;
  background: none;
  box-shadow: none;
}

.mercular-slide .banner-logo img,
.mercular-slide .banner-logo svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  filter: none;
}


/* ============ CATEGORY GRID ============ */
.cat-grid-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 700; color: var(--text);
  margin-bottom: 20px;
}
.cat-grid-title::before {
  content: ''; display: inline-block; width: 4px; height: 22px;
  background: var(--accent); border-radius: 2px;
}
.cat-icon-wrap {
  background: var(--surface);
  border-radius: 12px;
  padding: 22px 22px 24px;
  border: 1px solid var(--line);
}
.cat-icon-wrap .cat-grid-title { color: var(--text); margin-bottom: 18px; }
.cat-icon-wrap .cat-grid-title::before { background: var(--accent); }
.cat-icon-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
}
@media (max-width: 1024px) { .cat-icon-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .cat-icon-grid { grid-template-columns: repeat(3, 1fr); } }
.cat-icon-card {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 8px; /* Sharper edges */
  padding: 18px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  cursor: pointer;
  transition: all 0.25s;
}
.cat-icon-card:hover {
  border-color: var(--accent);
  background: var(--hover-bg);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}
.cat-icon-card .cat-icon {
  width: 60px; height: 60px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 38px;
  color: var(--accent);
  transition: all 0.3s;
}
.cat-icon-card:hover .cat-icon { border-color: var(--accent); background: rgba(230,0,0,0.1); }
.cat-icon-card:hover .cat-icon { transform: rotate(-5deg) scale(1.1); }
.cat-icon-card .cat-label {
  font-size: 16px; color: var(--text); text-align: center; font-weight: 500;
}

/* ============ FLASH SALE BANNER ============ */
.flash-sale-banner {
  background: linear-gradient(90deg,rgba(255, 0, 0, 1) 0%, rgba(0, 0, 255, 1) 100%);
  border-radius: 12px;
  padding: 22px 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(230, 0, 0, 0.25);
}
.flash-sale-banner::before {
  content: ''; position: absolute;
  top: -100px; right: -50px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(230,0,0,0.3), transparent 60%);
  border-radius: 50%;
  animation: floatOrb 8s ease-in-out infinite;
}
@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 20px); }
}
.flash-sale-grid {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 30px;
  align-items: center;
}
@media (max-width: 1024px) { .flash-sale-grid { grid-template-columns: 1fr; gap: 20px; } }
.flash-title-wrap {
  color: white;
}
.flash-title-wrap .label {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,0.35);
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.flash-title {
  font-family: 'Bebas Neue';
  font-size: 64px;
  line-height: 0.95;
  letter-spacing: 0.02em;
  font-weight: 700;
  color: white;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: titleGlow 2.5s ease-in-out infinite;
}
@keyframes titleGlow {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(255,255,255,0.3)); }
  50% { filter: drop-shadow(0 0 20px rgba(255,255,255,0.6)); }
}
.flash-title .sub { font-size: 18px; font-family: 'Kanit'; display: block; font-weight: 500; margin-top: 6px; }

.time-slots {
  display: flex; gap: 10px;
  margin: 0px 0px 0px 54px;
}
.time-slot {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 12px 20px;
  text-align: center;
  color: white;
  cursor: pointer;
  transition: all 0.25s;
  min-width: 100px;
}
.time-slot:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-3px);
}
.time-slot.active {
  background: white;
  color: var(--accent);
  border-color: white;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.time-slot .time {
  font-family: 'Bebas Neue';
  font-size: 50px;
  line-height: 1;
  font-weight: 700;
}
.time-slot .status {
  font-size: 16px;
  margin-top: 4px;
  opacity: 0.9;
}
.time-slot.active .status { font-weight: 600; opacity: 1; }

.countdown-row {
  display: flex; gap: 8px; margin: 0px;
}
.countdown-box {
  background: #111;
  border-radius: 10px;
  padding: 10px 24px;
  min-width: 60px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}
.countdown-box::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: rgba(255,255,255,0.1);
}
.countdown-box .num {
  font-family: 'Bebas Neue';
  font-size: 40px; line-height: 1;
  font-weight: 700;
}
.countdown-box .lbl {
  font-size: 14px; color: #aaa; margin-top: 2px;
}
.countdown-sep {
  font-family: 'Bebas Neue';
  font-size: 24px; color: white; font-weight: 700;
}
.flash-link-btn {
  background: white; color: #111;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}
.flash-link-btn:hover { transform: scale(1.05); box-shadow: 0 10px 25px rgba(0,0,0,0.2); }

.text-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0px;
}

.text-xs {
  white-space: nowrap;
  margin: 8px -18px !important;
      font-size: 18px !important ;
    line-height: 1rem;
  align-self: flex-start;
}

.countdown-row {
  margin: 0px 25px !important;
}

.flash-link-btn {
  margin: 0px 20px !important;
  }


/* ============ SHOP BY CATEGORY TILES ============ */
.shop-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 768px) { .shop-cat-grid { grid-template-columns: repeat(2, 1fr); } }
.shop-cat-tile {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  cursor: pointer;
  border: 1px solid #222;
  background: #111;
  transition: transform 0.3s, box-shadow 0.3s;
}
.shop-cat-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(230, 0, 0, 0.3);
  border-color: var(--accent);
}
.shop-cat-tile img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}
.shop-cat-tile:hover img { transform: scale(1.08); }
.shop-cat-tile .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85) 100%);
}
.shop-cat-tile .content {
  position: absolute; left: 20px; bottom: 20px; right: 20px;
  z-index: 2; color: white;
}
.shop-cat-tile .title {
  font-family: 'Bebas Neue';
  font-size: 22px;
  letter-spacing: 0.06em;
  font-weight: 500;
  line-height: 1;
}
.shop-cat-tile .sub {
  font-size: 14px; color: #d0d0d0; margin-top: 4px;
  letter-spacing: 0.03em;
}
.shop-cat-tile .arrow {
  position: absolute; right: 16px; bottom: 16px;
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 12px;
  transition: all 0.3s;
  z-index: 2;
}
.shop-cat-tile:hover .arrow { background: white; color: var(--accent); transform: translateX(5px); }

/* ============ TOP SELLING BANNER (สินค้าขายดี) ============ */
.top-sell-banner {
  background: linear-gradient(135deg, #111111 0%, #222222 50%, #1a0000 100%);
  border-radius: 12px 12px 0 0;
  padding: 20px 28px;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; gap: 24px;
  flex-wrap: wrap;
}
.top-sell-banner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 5% 50%, rgba(255,255,255,0.05), transparent 35%),
              radial-gradient(circle at 95% 50%, rgba(230,0,0,0.15), transparent 30%);
  pointer-events: none;
}
.top-sell-banner .banner-title-wrap {
  display: flex; align-items: center; gap: 16px;
  position: relative; z-index: 2;
}
.top-sell-banner .icon-cluster {
  position: relative; width: 100px; height: 70px;
  display: flex; align-items: center; justify-content: center;
}
.top-sell-banner .icon-cluster .shop-bag {
  width: 60px; height: 60px; border-radius: 14px;
  background: linear-gradient(135deg, #e60000, #8b0000);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: white;
  box-shadow: 0 8px 20px rgba(230,0,0,0.4);
  transform: rotate(-8deg);
}
.top-sell-banner .icon-cluster .float-i {
  position: absolute; font-size: 22px;
  animation: bob 3s ease-in-out infinite;
}
.top-sell-banner .icon-cluster .f1 { top: -8px; right: -4px; color: var(--accent); animation-delay: 0s; }
.top-sell-banner .icon-cluster .f2 { bottom: -4px; right: 8px; color: #f472b6; animation-delay: 0.6s; }
.top-sell-banner .icon-cluster .f3 { top: 6px; left: -8px; color: #4ade80; animation-delay: 1.2s; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.top-sell-title {
  font-family: 'Kanit'; font-size: 28px; color: white;
  font-weight: 700; line-height: 1; letter-spacing: 0.01em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.top-sell-tabs-wrap {
  flex: 1; min-width: 0;
  position: relative; z-index: 2;
  display: flex; flex-direction: column; gap: 8px;
}
.top-sell-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.top-sell-tab {
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  font-weight: 500;
  white-space: nowrap;
}
.top-sell-tab:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(255,255,255,0.3); }
.top-sell-tab.active {
  background: white;
  color: #111111;
  font-weight: 600;
  border-color: white;
}
.top-sell-all-btn {
  position: relative; z-index: 2;
  background: white; color: #111111;
  padding: 9px 22px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  transition: all 0.2s;
  white-space: nowrap;
  align-self: flex-start;
}
.top-sell-all-btn:hover { transform: scale(1.04); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.top-sell-container {
  background: var(--surface);
  border-radius: 0 0 12px 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: none;
}
.top-sell-container .product-grid { margin-top: 0; }

/* Adapted cards for Advice-style (blue) */
.product-card.advice-style .img-wrap { padding: 18px; }
.product-card.advice-style .product-name { color: #111; font-weight: 500; }
.advice-install-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fef3c7; color: #d97706;
  font-size: 10px; font-weight: 600;
  padding: 3px 8px; border-radius: 6px;
  margin-top: 6px;
}

/* ============ PREMIUM 4-ROW BANNER ============ */
.premium-4row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 768px) { .premium-4row { grid-template-columns: 1fr; } }
.premium-row {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  min-height: 140px;
  display: flex; align-items: center;
  padding: 24px 28px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid #232323;
}
.premium-row:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.premium-row .content { position: relative; z-index: 2; }
.premium-row .label {
  font-size: 11px; color: rgba(255,255,255,0.8);
  font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.premium-row .title {
  font-family: 'Inter'; font-weight: 800; font-size: 24px;
  color: white; margin-top: 4px; line-height: 1.1;
}
.premium-row .sub {
  color: rgba(255,255,255,0.85); font-size: 13px; margin-top: 6px;
}
.premium-row .btn {
  position: relative; z-index: 2;
  margin-left: auto;
  background: white; color: #111;
  padding: 10px 20px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
}
.premium-row .btn:hover { transform: scale(1.05); }
.premium-row .decor-icon {
  position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
  font-size: 130px; opacity: 0.12;
}

/* ============ PROMOTION 2 CARDS ============ */
.promo-2-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 768px) { .promo-2-grid { grid-template-columns: 1fr; } }
.promo-card {
  border-radius: 12px;
  padding: 28px 30px;
  min-height: 200px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s;
  display: flex; align-items: center; justify-content: space-between;
}
.promo-card:hover { transform: translateY(-4px); }
.promo-card .chip {
  display: inline-flex; gap: 6px; align-items: center;
  background: rgba(255,255,255,0.18); backdrop-filter: blur(6px);
  color: white; padding: 5px 12px;
  font-size: 12px; font-weight: 600; border-radius: 999px;
  margin-bottom: 10px;
}
.promo-card .title {
  font-family: 'Inter'; font-weight: 800; font-size: 28px;
  line-height: 1.15; color: white;
}
.promo-card .desc {
  color: rgba(255,255,255,0.85); margin-top: 8px; font-size: 13px;
}
.promo-card .big-icon {
  font-size: 110px; opacity: 0.12; color: white;
}

/* ============ TIKTOK VIDEO GRID ============ */
.tiktok-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
@media (max-width: 1024px) { .tiktok-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .tiktok-grid { grid-template-columns: repeat(2, 1fr); } }
.tiktok-card {
  position: relative;
  aspect-ratio: 9/16;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #111;
  border: 1px solid #202020;
  transition: transform 0.3s;
}
.tiktok-card:hover { transform: scale(1.03); }
.tiktok-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.tiktok-card:hover img { transform: scale(1.1); }
.tiktok-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.85) 100%);
  z-index: 1;
}
.tiktok-card .play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  color: #111;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  transition: all 0.3s;
  opacity: 0;
}
.tiktok-card:hover .play-btn { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
.tiktok-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
  padding: 4px 8px; border-radius: 999px;
  color: white; font-size: 10px;
  display: flex; align-items: center; gap: 4px;
  z-index: 2;
}
.tiktok-meta {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  z-index: 2;
  color: white;
}
.tiktok-meta .title {
  font-size: 12px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.tiktok-meta .views {
  font-size: 10px; color: #ddd; margin-top: 4px;
}

/* ============ ARTICLE CARDS ============ */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.article-grid.article-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .article-grid.article-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .article-grid, .article-grid.article-grid-4 { grid-template-columns: 1fr; } }
.article-img { position: relative; }
.article-tag {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
  color: white; z-index: 2;
}
.article-tag.adv { background: #333333; }
.article-tag.promo { background: #dc2626; }
.article-tag.nvidia { background: #10b981; }
.article-tag.apple { background: #111827; }
.article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s, border-color 0.3s;
}
.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 10px 25px rgba(230, 0, 0, 0.15);
}
.article-card .article-img {
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  background-color: #222;
}
.article-card .article-body { padding: 16px; }
.article-card .article-date { font-size: 11px; color: #888; }
.article-card .article-title {
  font-size: 15px; font-weight: 600; color: white; margin-top: 6px;
  line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ============ SERVICES FEATURES ============ */
.services-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 768px) { .services-bar { grid-template-columns: repeat(2, 1fr); } }
.service-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border-radius: 8px;
  padding: 16px 18px;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid var(--line);
}
.service-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(230,0,0,0.1);
  border-color: var(--accent);
}
.service-item .icon {
  width: 48px; height: 48px;
  border-radius: 8px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-size: 20px;
  flex-shrink: 0;
}
.service-item .title { font-weight: 600; color: var(--text); font-size: 14px; }
.service-item .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ============ NEWS/ACTIVITY SECTION ============ */
.news-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
}
@media (max-width: 900px) { .news-grid { grid-template-columns: 1fr; } }
.news-main {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s;
  background: linear-gradient(135deg, #111111 0%, #220000 50%, #e60000 100%);
}
.news-main:hover { transform: translateY(-3px); }
.news-main .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.6), rgba(0,0,0,0.2) 40%, transparent);
}
.news-main .content {
  position: absolute; left: 32px; top: 50%; transform: translateY(-50%);
  z-index: 2; color: white;
}
.news-main .title-big {
  font-family: 'Kanit';
  font-size: 56px; font-weight: 800; line-height: 0.95;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.news-main .sub {
  font-size: 15px; margin-top: 12px; max-width: 420px;
}
.news-side {
  display: flex; flex-direction: column; gap: 14px;
}
.news-card-sm {
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  padding: 18px 20px;
  position: relative;
  flex: 1;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  transition: transform 0.3s;
  border: 1px solid var(--line);
  min-height: 120px;
}
.news-card-sm:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,0,0,0.3); border-color: var(--accent); }
.news-card-sm .sm-icon {
  width: 70px; height: 70px; border-radius: 12px;
  background: linear-gradient(135deg, #222222, #000000);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  flex-shrink: 0;
  font-family: 'Inter';
}
.news-card-sm .sm-text { flex: 1; }
.news-card-sm .sm-brand { font-size: 11px; color: var(--accent); font-weight: 700; letter-spacing: 0.1em; }
.news-card-sm .sm-title { color: var(--text); font-weight: 600; font-size: 15px; margin-top: 3px; line-height: 1.3; }
.news-card-sm .sm-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.news-card-sm .sm-price {
  color: var(--accent); font-weight: 800; font-size: 18px; margin-top: 6px;
  font-family: 'Kanit';
}

/* ============ FOOTER (LINE EMPHASIS) ============ */
footer { background: #070707; border-top: 1px solid #1a1a1a; padding-top: 40px; padding-bottom: 30px; }
.line-big-cta {
  background: linear-gradient(135deg, #06c755 0%, #04a548 100%);
  box-shadow: 0 15px 40px rgba(6, 199, 85, 0.3);
  border-radius: 20px;
  padding: 28px 32px;
  margin-bottom: 40px;
  display: flex; flex-direction: row; align-items: center; justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.line-big-cta::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(255,255,255,0.15), transparent 50%);
  pointer-events: none;
}
.line-icon-big {
  width: 76px; height: 76px;
  border-radius: 999px;
  background: white;
  color: #06c755;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
  animation: line-pulse 2.4s ease-in-out infinite;
  position: relative;
}

/* Grid wrapper */
.social-cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 40px;
}

/* ลบ margin-bottom ออกจาก card แต่ละอัน เพราะ grid จัดการแล้ว */
.social-cta-grid .line-big-cta {
  margin-bottom: 0;
}

/* facebook */
.facebook-cta {
  background: linear-gradient(135deg, #1877f2 0%, #0d5fc4 100%);
  box-shadow: 0 15px 40px rgba(24, 119, 242, 0.35);
}
.facebook-cta .line-icon-big {
  color: #1877f2;
}

/* YouTube */
.youtube-cta {
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  box-shadow: 0 15px 40px rgba(255, 0, 0, 0.3);
}
.youtube-cta .line-icon-big {
  color: #ff0000;
}

/* Responsive */
@media (max-width: 768px) {
  .social-cta-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes line-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
  50% { box-shadow: 0 0 0 14px rgba(255,255,255,0); }
}
.line-info-text { position: relative; z-index: 1; color: white; }
.line-big-title { font-size: 26px; font-weight: 800; }
.line-big-sub { font-size: 14px; opacity: 0.95; margin-top: 3px; }
.line-actions {
  display: flex; gap: 10px; position: relative; z-index: 1;
  flex-wrap: wrap;
}
.btn-line-add {
  background: white; color: #06c755;
  padding: 13px 26px; border-radius: 999px;
  font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.2s;
}
.btn-line-add:hover { transform: scale(1.05); box-shadow: 0 8px 20px rgba(0,0,0,0.25); }
.btn-phone-call {
  background: rgba(0,0,0,0.25);
  border: 1.5px solid rgba(255,255,255,0.5);
  color: white;
  padding: 13px 26px; border-radius: 999px;
  font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.2s;
}
.btn-phone-call:hover { background: rgba(0,0,0,0.4); }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-title {
  color: white; font-weight: 600; font-size: 15px;
  margin-bottom: 14px;
}
.footer-link {
  color: #a7a7a7; font-size: 13px; display: block;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.footer-link:hover { color: white; }
.footer-social {
  display: flex; gap: 8px; margin-top: 14px;
}
.social-link {
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: all 0.2s;
}
.social-link:hover { color: white !important; transform: translateY(-2px); opacity: 0.8; }
.social-link[style*="#1877F2"]:hover { background: #1877F2 !important; border-color: #1877F2 !important; }
.social-link[style*="#E4405F"]:hover { background: #E4405F !important; border-color: #E4405F !important; }
.social-link[style*="var(--text)"]:hover { background: var(--text) !important; border-color: var(--text) !important; color: var(--bg) !important; }
.social-link[style*="#FF0000"]:hover { background: #FF0000 !important; border-color: #FF0000 !important; }
.social-link[style*="#06C755"]:hover { background: #06C755 !important; border-color: #06C755 !important; }
.footer-bottom {
  border-top: 1px solid #1a1a1a;
  margin-top: 30px;
  padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: #777;
}

/* ============ FLOATING LINE BUTTON ============ */
.floating-line {
  position: fixed; bottom: 24px; right: 24px; z-index: 100;
  background: linear-gradient(135deg, #06c755, #04a548);
  color: white;
  padding: 12px 20px 12px 12px;
  border-radius: 999px;
  font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 30px rgba(6, 199, 85, 0.5);
  transition: all 0.3s;
  animation: float-in 1s ease 0.5s backwards;
}
@keyframes float-in {
  from { transform: translateY(80px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.floating-line:hover { transform: translateY(-3px) scale(1.05); }
.floating-line .icon {
  width: 36px; height: 36px; border-radius: 999px;
  background: white; color: #06c755;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  animation: line-pulse 2.4s ease-in-out infinite;
}

/* ============ TOAST NOTIFICATION ============ */
.toast {
  position: fixed; top: 90px; right: 20px;
  background: #111;
  border: 1px solid #333;
  border-left: 4px solid #06c755;
  color: white;
  padding: 12px 18px 12px 14px;
  border-radius: 10px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  min-width: 260px;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
  z-index: 200;
  display: flex; align-items: center; gap: 10px;
}
.toast.show { transform: translateX(0); }
.toast.error { border-left-color: #ef4444; }
.toast .icon { font-size: 18px; color: #06c755; }
.toast.error .icon { color: #ef4444; }
.toast .text { font-size: 13px; flex: 1; }

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0; transform: translateY(25px);
  transition: all 0.8s cubic-bezier(.4,0,.2,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ MODAL SYSTEM ============ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  display: none; align-items: flex-start; justify-content: center;
  overflow-y: auto;
  padding: 28px 18px;
  animation: fadeIn 0.25s ease;
}
.modal-overlay.show { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--bg-2); color: var(--text);
  border-radius: 18px;
  border: 1px solid var(--line);
  max-width: 1100px; width: 100%;
  box-shadow: 0 30px 90px rgba(0,0,0,0.5);
  overflow: hidden;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  margin: auto;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-head {
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--bg-2); z-index: 2;
}
.modal-head .title {
  font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px;
}
.modal-head .title .icon-box {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; display: inline-flex; align-items: center; justify-content: center;
}
.modal-close {
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--surface); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
  border: 1px solid var(--line);
}
.modal-close:hover { background: var(--accent); color: white; border-color: var(--accent); }
.modal-body { padding: 18px 20px; max-height: calc(100vh - 180px); overflow-y: auto; }

/* Empty state */
.empty-state {
  text-align: center; padding: 60px 20px;
}
.empty-state .icon {
  width: 100px; height: 100px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 42px; color: var(--muted); margin-bottom: 18px;
}
.empty-state .title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.empty-state .sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; padding: 12px 24px; border-radius: 999px;
  font-weight: 600; cursor: pointer; border: none;
  transition: all 0.2s; font-family: inherit;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(255,59,47,0.25); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line);
  padding: 12px 24px; border-radius: 999px;
  font-weight: 600; cursor: pointer; transition: all 0.2s;
  font-family: inherit;
}
.btn-ghost:hover { background: var(--hover-bg); }

.btn-line-order {
  display: inline-flex; align-items: center; gap: 8px;
  background: #06C755; color: #fff;
  border: 1px solid #06C755;
  padding: 12px 24px; border-radius: 999px;
  font-weight: 600; cursor: pointer; transition: all 0.2s;
  font-family: inherit;
}
.btn-line-order:hover { background: #05b34c; border-color: #05b34c; }

/* ============ COMPARISON MODAL ============ */
.cmp-grid {
  display: grid;
  grid-template-columns: 180px repeat(var(--cmp-cols, 3), minmax(200px, 1fr));
  gap: 0;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.cmp-grid .cell {
  padding: 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.cmp-grid .cell:last-child, .cmp-grid .cell.row-last { border-right: none; }
.cmp-grid .cell.head {
  background: var(--surface);
  text-align: center; position: relative;
}
.cmp-grid .cell.head img { max-width: 100%; height: 140px; object-fit: contain; margin: 0 auto 10px; }
.cmp-grid .cell.head .remove-btn {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted); font-size: 10px;
}
.cmp-grid .cell.head .remove-btn:hover { background: #dc2626; color: white; border-color: #dc2626; }
.cmp-grid .cell.spec-label {
  font-weight: 700; background: var(--surface-2);
  color: var(--muted); font-size: 12px;
}
.cmp-grid .cell.highlight { background: rgba(6,199,85,0.08); color: #06c755; font-weight: 700; }
.cmp-add-slot {
  border: 2px dashed var(--line); border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 30px; color: var(--muted); cursor: pointer;
  min-height: 200px; gap: 8px; font-size: 12px;
}
.cmp-add-slot:hover { border-color: var(--accent); color: var(--accent); }

/* ============ CART MODAL ============ */
.cart-layout {
  display: grid; grid-template-columns: 1fr 340px; gap: 24px;
}
@media (max-width: 768px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-items { display: flex; flex-direction: column; gap: 10px; }
.cart-item {
  display: grid; grid-template-columns: 80px 1fr auto; gap: 14px;
  padding: 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface);
  align-items: center;
}
.cart-item .ci-img {
  width: 80px; height: 80px; border-radius: 8px; overflow: hidden;
  background: #fff; display: flex; align-items: center; justify-content: center;
}
.cart-item .ci-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .ci-name { font-weight: 600; font-size: 14px; }
.cart-item .ci-brand { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.cart-item .ci-price { font-weight: 700; color: var(--accent); font-size: 15px; }
.qty-ctrl { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: 6px; }
.qty-ctrl button {
  width: 26px; height: 26px; background: var(--surface); border: none;
  color: var(--text); cursor: pointer; font-weight: 700;
}
.qty-ctrl button:hover { background: var(--hover-bg); }
.qty-ctrl span { min-width: 32px; text-align: center; font-weight: 600; font-size: 13px; }
.cart-item .remove {
  color: var(--muted); cursor: pointer; padding: 6px;
  transition: color 0.2s;
}
.cart-item .remove:hover { color: #dc2626; }

.cart-summary {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px;
  position: sticky; top: 80px;
}
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.cart-summary .row.total { font-size: 18px; font-weight: 700; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }
.cart-summary .row .val { font-weight: 600; }
.cart-summary .row .val.discount { color: #06c755; }

/* Checkout steps */
.checkout-steps {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 24px;
}
.checkout-step {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 11px; color: var(--muted);
}
.checkout-step .dot {
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--surface); border: 2px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--muted);
  transition: all 0.3s;
}
.checkout-step.active .dot {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; border-color: var(--accent);
}
.checkout-step.done .dot { background: #06c755; color: white; border-color: #06c755; }
.checkout-step.active { color: var(--text); font-weight: 600; }
.step-connector {
  flex: 0 0 40px; height: 2px; background: var(--line);
}

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--text-2); }
.form-control {
  width: 100%; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 14px;
}
.form-control:focus { border-color: var(--accent); outline: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.payment-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 640px) { .payment-options { grid-template-columns: 1fr; } }
.payment-opt {
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 14px 10px; text-align: center; cursor: pointer;
  transition: all 0.2s;
}
.payment-opt.selected { border-color: var(--accent); background: rgba(255,59,47,0.05); }
.payment-opt i { font-size: 22px; margin-bottom: 6px; display: block; color: var(--accent); }
.payment-opt .name { font-size: 12px; font-weight: 600; }
.payment-opt .sub { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* ============ HOW-TO-USE MODAL ============ */
.howto-hero {
  display: grid; grid-template-columns: 300px 1fr; gap: 20px; margin-bottom: 24px;
  background: var(--surface); padding: 20px; border-radius: 14px;
  border: 1px solid var(--line);
}
@media (max-width: 640px) { .howto-hero { grid-template-columns: 1fr; } }
.howto-hero img { width: 100%; border-radius: 10px; aspect-ratio: 1; object-fit: cover; background: #fff; }
.howto-steps { display: flex; flex-direction: column; gap: 12px; }
.howto-step {
  display: flex; gap: 14px; padding: 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface);
}
.howto-step .num {
  width: 36px; height: 36px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; font-weight: 700; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.howto-step .title { font-weight: 700; margin-bottom: 4px; }
.howto-step .text { font-size: 13px; color: var(--text-2); line-height: 1.55; }

/* Toast container color */
.toast { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); }

/* Light theme specific overrides */
html[data-theme="light"] .article-card { background: var(--card); border-color: var(--card-line); }
html[data-theme="light"] .article-card .article-title { color: var(--text); }
html[data-theme="light"] .tiktok-meta { color: var(--text); }
html[data-theme="light"] footer { background: var(--footer); color: var(--text); border-top: 1px solid var(--line); }
html[data-theme="light"] .footer-link, html[data-theme="light"] footer a { color: var(--text-2); }
html[data-theme="light"] .footer-title { color: var(--text); }
html[data-theme="light"] .product-card { background: var(--card); }
html[data-theme="light"] .search-bar { background: var(--surface); border-color: var(--line); color: var(--text); }
html[data-theme="light"] .search-bar input { color: var(--text); }
html[data-theme="light"] .search-bar input::placeholder { color: var(--muted); }
html[data-theme="light"] .cat-nav { background: var(--surface); border-color: var(--line); }
html[data-theme="light"] .cat-link { color: var(--text-2); }
html[data-theme="light"] .cat-link:hover, html[data-theme="light"] .cat-link.active { background: var(--hover-bg); color: var(--text); }
html[data-theme="light"] .product-name { color: var(--text); }
html[data-theme="light"] .price-now { color: var(--text); }

/* Light theme - Mercular Banner Carousel */
html[data-theme="light"] .mercular-slide .banner-tag {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}
html[data-theme="light"] .mercular-slide .banner-cta {
  background: #fff;
  color: #0a0a0a;
}
html[data-theme="light"] .mercular-slide .banner-logo {
  background: rgba(255,255,255,0.98);
  border-radius: 20px;
  padding: 20px 30px;
  box-shadow:
    0 20px 40px rgba(0,0,0,0.15),
    0 0 0 1px rgba(0,0,0,0.05),
    inset 0 1px 0 rgba(255,255,255,0.5);
  backdrop-filter: blur(10px);
}
html[data-theme="light"] .mercular-slide .banner-logo img,
html[data-theme="light"] .mercular-slide .banner-logo svg {
  filter: none;
  max-height: 140px;
  max-width: 300px;
}
html[data-theme="light"] .mercular-slide .banner-logo span {
  color: #0a0a0a;
  text-shadow: none;
}

/* Light theme - Partner Marquee */
html[data-theme="light"] .marquee-wrap {
  background: transparent;
  border: none;
}
html[data-theme="light"] .marquee-wrap::before {
  background: linear-gradient(90deg, var(--bg) 10%, transparent);
}
html[data-theme="light"] .marquee-wrap::after {
  background: linear-gradient(-90deg, var(--bg) 10%, transparent);
}
html[data-theme="light"] .brand-logo {
  background: none;
  border: none;
}
html[data-theme="light"] .brand-logo:hover {
  transform: translateY(-6px);
}
html[data-theme="light"] .brand-logo img {
  filter: none;
}
html[data-theme="light"] .brand-logo:hover img {
  filter: drop-shadow(0 8px 22px rgba(230,0,0,0.28));
}

/* Dark theme */
html[data-theme="dark"] .brand-logo {
  background: #3a3a3a;
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  transition: all 0.35s cubic-bezier(.22,.8,.28,1);
  gap: 0;
}
html[data-theme="dark"] .brand-logo:hover {
  background: linear-gradient(145deg, #333 0%, #2a2a2a 100%);
  border-color: var(--accent);
  box-shadow: 0 8px 16px rgba(230,0,0,0.15), 0 4px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08);
  transform: translateY(-6px);
}
html[data-theme="dark"] .brand-logo img {
  filter: none;
  max-height: 160px;
  max-width: 200px;
}
html[data-theme="dark"] .marquee-wrap::before {
  background: linear-gradient(90deg, var(--bg) 15%, transparent);
}
html[data-theme="dark"] .marquee-wrap::after {
  background: linear-gradient(-90deg, var(--bg) 15%, transparent);
}

/* Mercular Banner - Elegant fix */
html[data-theme="dark"] .mercular-slide .banner-logo {
  background: rgba(255,255,255,0.95);
  border-radius: 20px;
  padding: 20px 30px;
  box-shadow:
    0 20px 40px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255,255,255,0.1),
    inset 0 1px 0 rgba(255,255,255,0.3);
  backdrop-filter: blur(10px);
}
html[data-theme="dark"] .mercular-slide .banner-logo img,
html[data-theme="dark"] .mercular-slide .banner-logo svg {
  filter: none;
  max-height: 140px;
  max-width: 300px;
}
html[data-theme="dark"] .mercular-slide .banner-logo span {
  color: #0a0a0a;
  text-shadow: none;
}

/* Dark theme - Header icons visibility */
html[data-theme="dark"] .header-icon {
  color: #e0e0e0;
}
html[data-theme="dark"] .header-icon:hover {
  color: var(--accent);
}
html[data-theme="dark"] .search-bar .fa-search {
  color: #aaa;
}
html[data-theme="dark"] .cat-icon-card .cat-icon {
  background: var(--surface-2);
  border-color: var(--line-2);
}

/* Section */
section { padding: 20px 0; }
.container-main { max-width: 1440px; margin: 0 auto; padding: 0 20px; }

/* Color utilities */
.text-accent { color: var(--accent); }
.bg-accent { background: var(--accent); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  display: none;
}
.mobile-menu.show { display: block; }

/* Product grid base */
.product-grid {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 0;
  scrollbar-width: none; /* Firefox */
}
.product-grid::-webkit-scrollbar { display: none; }
.product-grid > .product-card {
  flex: 0 0 calc(20% - 12px);
  scroll-snap-align: start;
}
@media (max-width: 1280px) {
  .product-grid > .product-card { flex: 0 0 calc(25% - 11px); }
}
@media (max-width: 1024px) {
  .product-grid > .product-card { flex: 0 0 calc(33.333% - 10px); }
}
@media (max-width: 640px) {
  .product-grid > .product-card { flex: 0 0 calc(50% - 7px); }
}

/* Product grid carousel wrapper */
.product-grid-wrap {
  position: relative;
}
.grid-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  transition: all .2s;
  opacity: 0;
  pointer-events: none;
}
.product-grid-wrap:hover .grid-arrow {
  opacity: 1;
  pointer-events: auto;
}
.grid-arrow:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.grid-arrow.prev { left: -12px; }
.grid-arrow.next { right: -12px; }
@media (max-width: 768px) {
  .grid-arrow { width: 32px; height: 32px; opacity: 1; pointer-events: auto; }
  .grid-arrow.prev { left: 4px; }
  .grid-arrow.next { right: 4px; }
}

.product-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 1024px) { .product-grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .product-grid-4 { grid-template-columns: repeat(2, 1fr); } }

/* Hero badge blinking */
.hero-sale-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px; font-weight: 700; color: white;
  margin-bottom: 14px;
  animation: chip-pulse 2s ease-in-out infinite;
}
@keyframes chip-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(230,0,0,0.45); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(230,0,0,0); }
}

/* Gradient text */
.grad-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Flash Sale Carousel */
.flash-carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.flash-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px 4px;
  scrollbar-width: none;
}
.flash-carousel::-webkit-scrollbar { display: none; }
.flash-carousel > .product-card {
  flex: 0 0 calc(20% - 12px);
  scroll-snap-align: start;
  min-width: 200px;
}
@media (max-width: 1280px) {
  .flash-carousel > .product-card { flex: 0 0 calc(25% - 11px); }
}
@media (max-width: 1024px) {
  .flash-carousel > .product-card { flex: 0 0 calc(33.333% - 10px); }
}
@media (max-width: 640px) {
  .flash-carousel > .product-card { flex: 0 0 calc(50% - 7px); min-width: 160px; }
}
.flash-nav {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.9); border: none;
  color: var(--accent); cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: all .2s; flex-shrink: 0;
}
.flash-nav:hover { background: var(--accent); color: #fff; }
@media (max-width: 768px) {
  .flash-nav { width: 30px; height: 30px; font-size: 12px; }
}

/* Brand Grid Section */
.brand-grid-section {
  padding: 40px 0;
}
.brand-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
@media (max-width: 1024px) { .brand-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .brand-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
.brand-grid-item {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; cursor: pointer; text-decoration: none;
  min-height: 90px;
}
.brand-grid-item:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(230,0,0,0.12);
}
.brand-grid-item img {
  max-height: 48px; max-width: 100%; object-fit: contain;
  filter: none;
}
