/* --- CSS Variables --- */
:root {
  /* Default (Light Theme) */
  --primary: #0071e3; 
  --primary-hover: #005bb5;
  --bg-color: transparent; 
  --body-bg: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  --card-bg: rgba(255, 255, 255, 0.65);
  --text-main: #1d1d1f;
  --text-muted: #86868b;
  --border-color: rgba(0, 0, 0, 0.1);
  --success: #34c759;
  --nav-bg: rgba(255, 255, 255, 0.85);
  --dropdown-bg: #ffffff;
  --dropdown-hover: rgba(0, 0, 0, 0.05);
  --hero-text-grad: linear-gradient(135deg, #fceabb 0%, #f8b500 100%);
  --hero-text-shadow: 0 4px 20px rgba(248, 181, 0, 0.4);
  --slide-overlay: linear-gradient(to top, rgba(245, 247, 250, 1) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.7) 100%);
  --dot-bg: rgba(0,0,0,0.2);
  --active-cat-bg: rgba(0, 113, 227, 0.05);
  --active-cat-border: rgba(0, 113, 227, 0.3);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 14px 40px rgba(0, 0, 0, 0.16);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --primary: #fbc531; 
  --primary-hover: #e1b12c;
  --bg-color: transparent; 
  --body-bg: linear-gradient(135deg, #1e272e, #130f40, #000000);
  --card-bg: rgba(255, 255, 255, 0.05);
  --text-main: #f5f6fa;
  --text-muted: #dcdde1;
  --border-color: rgba(255, 255, 255, 0.1);
  --success: #44bd32;
  --nav-bg: rgba(10, 10, 15, 0.7);
  --dropdown-bg: #11141e;
  --dropdown-hover: rgba(255, 255, 255, 0.05);
  --hero-text-grad: linear-gradient(135deg, #fceabb 0%, #f8b500 100%);
  --hero-text-shadow: 0 4px 20px rgba(248, 181, 0, 0.4);
  --slide-overlay: linear-gradient(to top, rgba(30, 39, 46, 1) 0%, rgba(19, 15, 64, 0.4) 50%, rgba(0,0,0,0.6) 100%);
  --dot-bg: rgba(255,255,255,0.4);
  --active-cat-bg: rgba(255, 255, 255, 0.05);
  --active-cat-border: rgba(251, 197, 49, 0.3);
  
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* --- Resets & Base Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background: var(--body-bg);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* --- Layout Utilities --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: -18px auto 30px;
  max-width: 760px;
}

.spiral-filter-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
  z-index: 5;
}

.spiral-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 190px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-main);
  padding: 11px 14px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.spiral-filter-caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  opacity: 0.7;
}

.spiral-filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: none;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 8px;
  width: min(330px, calc(100vw - 40px));
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--dropdown-bg);
  box-shadow: var(--shadow-lg);
}

.spiral-filter-wrap.is-open .spiral-filter-menu {
  display: grid;
}

.spiral-filter {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-main);
  padding: 9px 14px;
  font-weight: 700;
  min-width: 78px;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.spiral-filter:hover,
.spiral-filter.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* --- Navigation --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(12px, 1.6vw, 26px);
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--primary);
}

/* Admin: Orders hover dropdown (Book vs Photocopy) */
.nav-links .nav-dropdown {
  position: relative;
}

.nav-links .nav-dropdown-trigger {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
  white-space: nowrap;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}

.nav-links .nav-dropdown-trigger::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.65;
}

.nav-links .nav-dropdown:hover .nav-dropdown-trigger,
.nav-links .nav-dropdown:focus-within .nav-dropdown-trigger {
  color: var(--primary);
}

.nav-links .nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  padding: 8px 0;
  margin: 0;
  list-style: none;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 300;
}

.nav-links .nav-dropdown.is-open .nav-dropdown-menu,
.nav-links .nav-dropdown.mobile-open .nav-dropdown-menu {
  display: block;
}

.nav-links .nav-dropdown-menu a {
  display: block;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
}

.nav-links .nav-dropdown-menu a:hover {
  background: var(--active-cat-bg);
  color: var(--primary);
}

.nav-links .nav-dropdown-menu a.nav-dropdown-current {
  color: var(--primary);
  font-weight: 700;
  background: rgba(37, 117, 252, 0.08);
}

@media (max-width: 900px) {
  .nav-links .nav-dropdown-menu {
    left: 0;
    transform: none;
  }
}

.nav-icons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: background-color 0.2s;
}

.icon-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.cart-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background-color: var(--primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 113, 227, 0.4);
}

.btn-secondary {
  background-color: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--dropdown-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- WhatsApp Float Button --- */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  font-size: 32px;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wa-float:hover {
  transform: scale(1.1);
}

.chat-float-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(17, 20, 30, 0.92);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat-float:hover .chat-float-tooltip,
.chat-float.show-label .chat-float-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(-2px);
}

/* --- Hero Section Premium Revamp --- */
.hero {
  position: relative;
  padding: 60px 20px 100px;
  overflow: hidden;
  background: var(--bg-color);
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  margin: 0 auto 60px;
}

.hero h1 {
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  line-height: 1.1;
  background: var(--hero-text-grad);
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  text-shadow: var(--hero-text-shadow);
}

.hero p {
  font-size: 1.35rem;
  color: #f5f6fa;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
  max-width: 650px;
  margin: 0 auto 40px;
}

.hero-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* --- Product Grid --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 22px;
}

.products-load-more-indicator {
  margin-top: 24px;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.products-load-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.free-notes-slider {
  display: flex;
  overflow-x: auto;
  gap: 24px;
  padding-bottom: 24px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.free-notes-slider::-webkit-scrollbar {
  display: none;
}

.free-notes-slider > * {
  flex: 0 0 auto;
  width: 260px;
  max-width: 80vw;
  scroll-snap-align: start;
}

.similar-products-slider {
  display: flex;
  overflow-x: auto;
  gap: 24px;
  padding-bottom: 18px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.similar-products-slider::-webkit-scrollbar {
  display: none;
}

.similar-products-slider .product-card {
  flex: 0 0 260px;
  width: 260px;
  max-width: 80vw;
  scroll-snap-align: start;
}

.home-products-filter-bar {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.home-products-search {
  flex: 1 1 320px;
  max-width: 520px;
  margin: 0;
}

.free-notes-slider-wrap {
  position: relative;
  padding: 0 36px;
}

.free-notes-nav {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-main);
  backdrop-filter: blur(8px);
  z-index: 5;
  cursor: pointer;
}

.free-notes-nav-left { left: 0; }
.free-notes-nav-right { right: 0; }

.product-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

/* Touch/press feedback (mobile) */
.product-card:active,
.product-card.is-pressed,
.note-card:active,
.note-card.is-pressed {
  transform: translateY(-2px) scale(0.985);
  box-shadow: 0 12px 28px rgba(0,0,0,0.14);
  filter: saturate(1.05);
}
.product-card:active .product-img-wrapper img,
.product-card.is-pressed .product-img-wrapper img {
  transform: scale(1.04);
}
.catalog-card:active,
.catalog-card.is-pressed {
  transform: translateY(-2px) scale(0.99);
  box-shadow: 0 12px 26px rgba(0,0,0,0.10);
}

/* --- Home Extra Sections --- */
.about-us-section {
  background: transparent;
}

.about-us-card {
  background: color-mix(in srgb, var(--card-bg) 80%, #ffffff 20%);
  border-radius: 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  border: 1px solid var(--border-color);
  padding: 14px;
}

.about-us-image-wrap img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  border-radius: 24px;
}

.about-us-content h2 {
  font-size: 3.4rem;
  line-height: 1.2;
  margin-bottom: 24px;
  color: var(--text-main);
}

.about-us-content p {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 560px;
}

.instagram-reels-section,
.reviews-link-section {
  background: transparent;
}

.social-preview-card {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  box-shadow: var(--shadow-md);
}

.social-reel-embed {
  min-height: 320px;
  background: #000;
}

.social-reel-embed iframe {
  width: 100%;
  height: 100%;
  min-height: 520px;
  border: 0;
  display: block;
}

.social-preview-content {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.social-preview-content h3 {
  font-size: 1.8rem;
  color: var(--text-main);
}

.social-preview-content p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.reviews-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.review-highlight-card {
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.review-stars {
  color: #d18c3b;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.review-highlight-card p {
  color: var(--text-main);
  margin-bottom: 10px;
}

.review-highlight-card span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.product-img-wrapper {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-img-wrapper img {
  transform: scale(1.05);
}

.category-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
}

.product-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.price-original {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 500;
}

.price-discount {
  font-size: 0.85rem;
  color: #00a676; /* Green */
  font-weight: 700;
  letter-spacing: 0.5px;
}

.add-to-cart-btn {
  background: var(--bg-color);
  color: var(--text-main);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.add-to-cart-btn:hover {
  background: var(--primary);
  color: white;
}

/* --- Layouts & Mobile Nav --- */
.mobile-menu-btn {
  display: none;
}
.mobile-nav-backdrop {
  display: none;
}

@media (max-width: 768px) {
  .navbar {
    z-index: 1300;
  }
  .hero h1 { font-size: 2.5rem; }
  .navbar .container {
    height: 64px;
    flex-wrap: nowrap;
    gap: 10px;
    position: relative;
    justify-content: center;
  }
  .logo {
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
  }
  .mobile-menu-btn {
    display: inline-flex;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--card-bg) 80%, #fff 20%);
    color: var(--text-main);
    flex-shrink: 0;
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
  }
  .mobile-menu-btn span {
    position: relative;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
  }
  .mobile-menu-btn span::before,
  .mobile-menu-btn span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
  }
  .mobile-menu-btn span::before { top: -5px; }
  .mobile-menu-btn span::after { top: 5px; }

  .nav-links { 
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: min(82vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 88px 18px 24px;
    background: var(--dropdown-bg);
    border-right: 1px solid var(--border-color);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    z-index: 1200;
  }
  .nav-links.mobile-open {
    transform: translateX(0);
  }
  .nav-links a {
    white-space: normal;
    font-size: 1rem;
    width: 100%;
    padding: 10px 6px;
    border-bottom: 1px solid var(--border-color);
  }
  .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(10, 12, 20, 0.45);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .mobile-nav-backdrop.show {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }
  
  .nav-links .nav-dropdown-menu {
    position: static;
    transform: none;
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
    margin-top: 8px;
    background: var(--card-bg);
  }
  .nav-icons {
    margin-left: auto;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
  }
  
  .section-title { font-size: 2rem; }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .product-card {
    padding: 16px;
  }
  .about-us-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .about-us-content h2 {
    font-size: 2.2rem;
  }
  .social-preview-card {
    grid-template-columns: 1fr;
  }
  .social-reel-embed iframe {
    min-height: 500px;
  }
  .social-preview-content {
    padding: 22px;
  }
  .reviews-highlight-grid {
    grid-template-columns: 1fr;
  }
  .home-products-search,
  .home-products-filter-bar .multi-select-container {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .product-card {
    padding: 10px;
    border-radius: var(--radius-sm);
  }
  .product-img-wrapper {
    margin-bottom: 8px;
  }
  .category-tag {
    font-size: 0.65rem;
    margin-bottom: 4px;
  }
  .product-title {
    font-size: 0.85rem;
    margin-bottom: 4px;
    line-height: 1.3;
  }
  .product-price {
    font-size: 0.9rem;
    gap: 4px;
  }
  .price-original {
    font-size: 0.75rem;
  }
  .price-discount {
    font-size: 0.7rem;
  }
  .add-to-cart-btn {
    width: 28px;
    height: 28px;
  }
  .add-to-cart-btn svg {
    width: 14px;
    height: 14px;
  }
  .product-footer {
    padding-top: 8px;
  }
  .hero h1 { font-size: 1.7rem; margin-bottom: 12px; }
  .hero p { font-size: 0.95rem; margin-bottom: 20px; }
  .section { padding: 40px 0; }
  .section-title { font-size: 1.5rem; margin-bottom: 24px; }
  .section-subtitle {
    margin: -8px auto 18px;
    font-size: 0.95rem;
  }
  .about-us-content h2 {
    font-size: 1.9rem;
    margin-bottom: 14px;
  }
  .about-us-content p {
    font-size: 0.98rem;
  }
  .social-preview-card {
    border-radius: 12px;
  }
  .social-reel-embed iframe {
    min-height: 460px;
  }
  .social-preview-content h3 {
    font-size: 1.4rem;
  }
  .social-preview-content p {
    font-size: 0.95rem;
  }
  .features-row {
    flex-wrap: wrap;
    gap: 20px;
  }
  .feature-item {
    flex: 1 1 40%;
  }
  .feature-item:not(:last-child)::after {
    display: none;
  }
}

/* --- Cart Page --- */
.cart-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.cart-items {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #f9f9f9;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-item-price {
  color: var(--text-muted);
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-color);
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.quantity-btn {
  color: var(--text-main);
  font-size: 1.2rem;
  font-weight: 600;
}

.remove-btn {
  color: #ff3b30;
  padding: 8px;
}

.cart-summary {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 88px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.summary-total {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

@media (max-width: 992px) {
  .cart-layout { grid-template-columns: 1fr; }
}

/* --- Admin Form --- */
.admin-card {
  background: var(--card-bg);
  padding: 32px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  max-width: 600px;
  margin: 0 auto 40px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
  background: var(--bg-color);
  color: var(--text-main);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card-bg);
}

select.form-control {
  background-color: var(--dropdown-bg);
  color: var(--text-main);
}

select.form-control option {
  background: #11141e;
  color: #f5f6fa;
}

:root:not([data-theme="dark"]) select.form-control option {
  background: #ffffff;
  color: #1d1d1f;
}

.admin-list {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.admin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  font-weight: 500;
  white-space: nowrap;
}

.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Search Input */
.search-input-wrapper {
  position: relative;
  max-width: 400px;
  margin: 0 auto 40px;
}

.search-input-wrapper i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
}

/* --- Auth UI --- */
.auth-container {
  max-width: 400px;
  margin: 60px auto;
  padding: 40px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.auth-container h2 {
  margin-bottom: 8px;
  font-size: 1.75rem;
}

.auth-container p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.auth-link {
  color: var(--primary);
  font-weight: 500;
  margin-top: 24px;
  display: block;
}

.auth-link:hover {
  text-decoration: underline;
}

/* --- Hero Slider --- */
.slider-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  background-size: cover;
  background-position: center;
}

.slide::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--slide-overlay);
}

.slide.active {
  opacity: 1;
}

.slider-overlay {
  display: none;
}

.slider-dots {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  background: var(--dot-bg);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  background: var(--text-main);
  transform: scale(1.2);
}

/* --- Purple Dual Buttons --- */
.btn-purple {
  background-color: #802a7e;
  color: white;
  transition: all 0.2s;
  border: 1px solid #802a7e;
}

.btn-purple:hover {
  background-color: #6a2268;
  box-shadow: 0 4px 14px rgba(128, 42, 126, 0.3);
}

.btn-outline-purple {
  background-color: transparent;
  color: #802a7e;
  border: 1px solid #802a7e;
  transition: all 0.2s;
}

.btn-outline-purple:hover {
  background-color: #fdfafc;
}

/* --- Feature Icons Row --- */
.features-row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 32px;
  margin-top: 24px;
}

.feature-item {
  flex: 1;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.feature-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background-color: var(--border-color);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fdfafc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-item span {
  font-size: 0.9rem;
  color: #555;
  font-weight: 500;
}


/* --- Checkout specific --- */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.radio-label:hover {
  background: var(--bg-color);
}

.radio-label input:checked + span {
  font-weight: 600;
}

/* --- Payment Overlay --- */
#paymentOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.payment-modal {
  background: white;
  padding: 40px;
  border-radius: var(--radius-lg);
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.loader {
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- Admin Additions --- */
.status-select {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.status-pending { color: #f59e0b; border-color: #f59e0b; }
.status-shipped { color: #3b82f6; border-color: #3b82f6; }
.status-delivered { color: #10b981; border-color: #10b981; }

/* --- Toast Notification --- */
#toastContainer {
  position: fixed;
  bottom: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.toast {
  background: #333;
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

.custom-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10050;
  padding: 16px;
}

.custom-confirm-overlay.show {
  display: flex;
}

.custom-confirm-modal {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px 20px;
}

.custom-confirm-title {
  margin: 0 0 10px;
  color: var(--text-main);
  font-size: 1.1rem;
}

.custom-confirm-message {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.custom-confirm-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-loader {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.btn.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@keyframes slideIn {
  0% { transform: translateX(-100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* --- Checkout Layout --- */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 992px) {
  .checkout-grid { grid-template-columns: 1fr; }
}

.checkout-summary-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 88px;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

/* Scrollable Filter Bar */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  justify-content: flex-start;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 8px; /* For scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;
}
.filter-bar::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Support for dynamic filter buttons */
.filter-btn {
  flex-shrink: 0;
}

/* Custom Multi-Select Dropdown */
.multi-select-container {
  position: relative;
  width: 100%;
  max-width: 400px;
}
.multi-select-header {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  backdrop-filter: blur(8px);
}
.multi-select-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--dropdown-bg);
  z-index: 100;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  max-height: 350px;
  overflow-y: auto;
  display: none;
}
.multi-select-dropdown.active {
  display: block;
}
.multi-select-search-pannel {
  position: sticky;
  top: 0;
  background: var(--dropdown-bg);
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  z-index: 101;
}
.multi-select-search {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-main);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
}
.multi-select-options {
  padding: 8px;
}
.multi-select-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.multi-select-option:hover {
  background: var(--dropdown-hover);
}
.multi-select-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.active-categories-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.active-cat-tag {
  background: var(--active-cat-bg);
  color: var(--primary);
  border: 1px solid var(--active-cat-border);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

/* --- Theme Switch Toggle --- */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}
.theme-switch-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 45px;
  text-align: right;
}
.theme-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}
.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.theme-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #2a2a35;
  transition: .4s;
  border-radius: 34px;
}
.theme-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input:checked + .theme-slider {
  background-color: var(--primary);
}
input:checked + .theme-slider:before {
  transform: translateX(24px);
}
:root:not([data-theme="dark"]) .theme-slider:not(:checked) {
  background-color: #ccc;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 768px) {
  .product-detail-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* ==========================================
   Chat Real-time UI Styles
========================================== */

/* Header */
.chat-header {
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

.chat-back-btn {
  color: #fff;
  margin-right: 16px;
  display: flex;
  align-items: center;
  transition: transform 0.2s;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.chat-back-btn:hover { transform: translateX(-3px); }

:root:not([data-theme="dark"]) .chat-header {
  background: var(--primary);
  border-bottom: none;
}
:root:not([data-theme="dark"]) .chat-header h2 { color: #fff !important; }

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.chat-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.2);
}

/* Messages Area */
.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Message Bubbles */
.chat-bubble-wrapper {
  display: flex;
  width: 100%;
}

.chat-bubble-me {
  justify-content: flex-end;
}

.chat-bubble-other {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 14px;
  position: relative;
  font-size: 0.95rem;
  line-height: 1.4;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.chat-bubble-other .chat-bubble {
  background: #ffffff;
  color: #111b21;
  border-top-left-radius: 4px;
}
[data-theme="dark"] .chat-bubble-other .chat-bubble {
  background: #202c33;
  color: #e9edef;
}

.chat-bubble-me .chat-bubble {
  background: #dcf8c6;
  color: #111b21;
  border-top-right-radius: 4px;
}
[data-theme="dark"] .chat-bubble-me .chat-bubble {
  background: #005c4b;
  color: #e9edef;
}

.chat-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 0.7rem;
  color: rgba(0,0,0,0.45);
  margin-top: 4px;
}
[data-theme="dark"] .chat-meta {
  color: rgba(255,255,255,0.6);
}

/* File Attachment UI inside bubbles */
.chat-file-attachment {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0,0,0,0.05);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid rgba(0,0,0,0.05);
}
[data-theme="dark"] .chat-file-attachment { background: rgba(255,255,255,0.05); border-color:rgba(255,255,255,0.1); }

.chat-file-attachment .file-name {
  font-weight: 600;
  font-size: 0.85rem;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.file-download-btn {
  background: var(--primary);
  color: #fff;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: opacity 0.2s;
}
.file-download-btn:hover { opacity: 0.8; }

/* Input Footer */
.chat-input-container {
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border-color);
}
:root:not([data-theme="dark"]) .chat-input-container {
  background: #f0f2f5;
  border-top: 1px solid rgba(0,0,0,0.05);
}

/* --- Catalog-style product cards (like reference image) --- */
.catalog-card {
  padding: 0;
  overflow: hidden;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}
[data-theme="dark"] .catalog-card {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
  box-shadow: var(--shadow-sm);
}
.catalog-card:hover { transform: translateY(-4px); }
.catalog-card .product-img-wrapper {
  margin-bottom: 0;
  border-radius: 0;
  background: #fff;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: visible;
  perspective: 900px;
}
.catalog-card .product-img-wrapper > img, .catalog-card .product-img-wrapper > .combo-image-grid {
  object-fit: contain;
  padding: 8px;
  width: 78%;
  height: auto;
  margin: 4px auto 0;
  transform: rotateX(18deg) rotateY(-10deg);
  transform-origin: center bottom;
  filter: drop-shadow(12px 14px 10px rgba(0,0,0,0.34));
  position: relative;
  z-index: 2;
}
[data-theme="dark"] .catalog-card .product-img-wrapper { background: rgba(255,255,255,0.92); }

.catalog-card-body {
  padding: 12px 14px 10px;
}
.catalog-card-title {
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.35;
  color: var(--text-main);
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}
.catalog-card-prices {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.catalog-price-selling {
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--text-main);
}
.catalog-price-original {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 600;
}
.catalog-add-btn {
  display: block;
  width: calc(100% - 24px);
  padding: 12px 14px;
  margin: 0 auto 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 55%, rgba(0,0,0,0.15));
  background: transparent;
  color: color-mix(in srgb, var(--primary) 88%, #1d4ed8);
  font-weight: 800;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}
[data-theme="dark"] .catalog-add-btn {
  background: transparent;
  border-color: rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.92);
}
.catalog-add-btn:hover {
  background: var(--primary);
  color: #fff;
}

.catalog-discount-ribbon {
  position: absolute;
  top: 10px;
  left: -42px;
  transform: rotate(-45deg);
  width: 140px;
  text-align: center;
  background: #e11d48;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 6px 0;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 18px rgba(225,29,72,0.35);
  z-index: 8;
}

/* --- Home: Category tiles (like reference image) --- */
.category-tiles-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 1024px) {
  .category-tiles-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .category-tiles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
.category-tile {
  --tile-accent: #ef4444;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid color-mix(in srgb, var(--tile-accent) 30%, rgba(0,0,0,0.1));
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  min-height: 170px;
  position: relative;
  transform: translateZ(0);
  will-change: transform, box-shadow;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.24s ease,
    filter 0.24s ease;
}
[data-theme="dark"] .category-tile {
  background: rgba(255,255,255,0.06);
  box-shadow: var(--shadow-sm);
}
.category-tile::before {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tile-accent) 75%, #fff), color-mix(in srgb, var(--tile-accent) 40%, #fff));
}
.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(110% 90% at 20% 12%, color-mix(in srgb, var(--tile-accent) 22%, transparent) 0%, transparent 55%),
    radial-gradient(90% 70% at 90% 0%, rgba(255,255,255,0.35) 0%, transparent 60%);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.32s ease, transform 0.32s ease;
  pointer-events: none;
}
.category-tile:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: color-mix(in srgb, var(--tile-accent) 55%, rgba(0,0,0,0.12));
  box-shadow:
    0 16px 40px rgba(0,0,0,0.12),
    0 0 0 6px color-mix(in srgb, var(--tile-accent) 9%, transparent);
}
.category-tile:hover::after {
  opacity: 1;
  transform: translateY(0);
}
.category-tile:focus-visible {
  outline: none;
  box-shadow:
    0 16px 40px rgba(0,0,0,0.12),
    0 0 0 4px color-mix(in srgb, var(--tile-accent) 30%, transparent),
    0 0 0 7px color-mix(in srgb, var(--tile-accent) 14%, transparent);
}
.category-tile:active,
.category-tile.is-pressed {
  transform: translateY(-1px) scale(0.985);
  box-shadow:
    0 10px 22px rgba(0,0,0,0.10),
    0 0 0 5px color-mix(in srgb, var(--tile-accent) 12%, transparent);
  filter: saturate(1.05);
}
.category-tile:active::after,
.category-tile.is-pressed::after {
  opacity: 1;
  transform: translateY(0);
}
.category-tile-body {
  padding: 18px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.category-tile-icon {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 2px solid color-mix(in srgb, var(--tile-accent) 50%, transparent);
  background: color-mix(in srgb, var(--tile-accent) 8%, #fff);
  color: color-mix(in srgb, var(--tile-accent) 85%, #111);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.category-tile:hover .category-tile-icon {
  transform: translateY(-2px) scale(1.06) rotate(-1deg);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--tile-accent) 24%, transparent);
}
.category-tile:active .category-tile-icon,
.category-tile.is-pressed .category-tile-icon {
  transform: translateY(0) scale(1.02);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--tile-accent) 18%, transparent);
}
.category-tile-title {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.2px;
  color: var(--text-main);
}
.category-tile-btn {
  background: #0b0b0f;
  color: #fff;
  font-weight: 800;
  padding: 12px 14px;
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .category-tile-btn { background: rgba(255,255,255,0.12); }
.category-tile-btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -120%;
  width: 80%;
  height: 220%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 35%, rgba(255,255,255,0.28) 50%, rgba(255,255,255,0.18) 65%, transparent 100%);
  opacity: 0;
  pointer-events: none;
}
.category-tile:hover .category-tile-btn::after {
  opacity: 1;
  animation: category-btn-shine 0.95s ease forwards;
}
@keyframes category-btn-shine {
  from { left: -120%; }
  to { left: 140%; }
}

/* Tap ripple (injected by JS) */
.tap-ripple {
  position: absolute;
  border-radius: 999px;
  transform: scale(0);
  opacity: 0.35;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.55) 30%, rgba(255,255,255,0.0) 70%);
  animation: tap-ripple 650ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  mix-blend-mode: overlay;
}
[data-theme="dark"] .tap-ripple {
  opacity: 0.28;
  background: radial-gradient(circle, rgba(251,197,49,0.95) 0%, rgba(251,197,49,0.45) 30%, rgba(251,197,49,0.0) 70%);
  mix-blend-mode: screen;
}
@keyframes tap-ripple {
  0% { transform: scale(0.2); opacity: 0.38; }
  60% { transform: scale(1); opacity: 0.26; }
  100% { transform: scale(1.15); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .category-tile,
  .category-tile::after,
  .category-tile-icon {
    transition: none !important;
  }
  .category-tile-btn::after,
  .tap-ripple {
    animation: none !important;
  }
}

.category-mobile-slider,
.category-mobile-pagination {
  display: none;
}

@media (max-width: 768px) {
  .category-tiles-grid {
    display: none;
  }

  .category-mobile-slider {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .category-mobile-viewport {
    overflow: hidden;
    width: 100%;
  }

  .category-mobile-track {
    display: flex;
    gap: 20px; /* slide-to-slide gap */
    transition: transform 0.3s ease;
  }

  .category-mobile-slide {
    min-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .category-mobile-slide .category-tile {
    min-height: 142px;
  }

  .category-mobile-slide .category-tile-body {
    padding: 14px 10px;
    gap: 8px;
  }

  .category-mobile-slide .category-tile-icon {
    width: 46px;
    height: 46px;
  }

  .category-mobile-slide .category-tile-title {
    font-size: 1rem;
  }

  .category-mobile-slide .category-tile-btn {
    padding: 10px 10px;
    font-size: 0.82rem;
  }

  .category-mobile-nav {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.7);
    color: #ff6b81;
    display: grid;
    place-items: center;
    font-size: 0.95rem;
    flex-shrink: 0;
  }
  [data-theme="dark"] .category-mobile-nav {
    background: rgba(255,255,255,0.08);
  }

  .category-mobile-pagination {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.4px;
  }
}


.chat-attach-btn {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s;
  background: transparent;
  border: none;
  cursor: pointer;
}
.chat-attach-btn:hover { background: rgba(0,0,0,0.05); color: var(--text-main); }
[data-theme="dark"] .chat-attach-btn:hover { background: rgba(255,255,255,0.1); }

.chat-input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}
[data-theme="dark"] .chat-input-wrapper { background: #2a3942; }

.chat-input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 12px 16px;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
}

.chat-send-btn {
  background: var(--primary);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
  border: none;
  cursor: pointer;
}
.chat-send-btn:hover { transform: scale(1.05); }

/* File Preview before send */
.chat-file-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0,0,0,0.02);
  border-bottom: 1px solid var(--border-color);
}

.chat-empty-state {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-align: center;
  background: var(--card-bg);
  padding: 24px;
  border-radius: 12px;
  max-width: 300px;
}
.chat-empty-state svg { margin-bottom: 12px; opacity: 0.5; }

/* ==========================================
   Free Notes Card UI
========================================== */
.note-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
  align-items: center;
  text-align: center;
}

.note-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(251, 197, 49, 0.4);
}

.note-icon {
  background: rgba(251, 197, 49, 0.1);
  color: var(--primary);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.note-card:hover .note-icon {
  transform: scale(1.1);
}

.note-details {
  flex-grow: 1;
  margin-bottom: 24px;
}

.note-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.3;
}

/* ==========================================
   Cost Estimator Button & Modal
========================================== */
.btn-estimator {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 18px rgba(106, 17, 203, 0.4);
  gap: 8px;
  cursor: pointer;
}
.btn-estimator:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(106, 17, 203, 0.5);
}

.ce-modal-box {
  background: var(--dropdown-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ce-modal-box::-webkit-scrollbar { display: none; }

.ce-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}
.ce-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.ce-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}
.ce-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}
.ce-close-btn {
  margin-left: auto;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.ce-close-btn:hover { background: rgba(255,0,0,0.15); color: #ff3b30; }

.ce-upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: 14px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.ce-upload-zone:hover {
  border-color: #6a11cb;
  background: rgba(106, 17, 203, 0.05);
  color: var(--text-main);
}
.ce-upload-zone.has-file {
  border-color: #2575fc;
  background: rgba(37, 117, 252, 0.06);
}
.ce-upload-zone p { margin: 0; font-weight: 600; font-size: 0.95rem; }

.ce-page-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  background: rgba(37, 117, 252, 0.08);
  border: 1px solid rgba(37, 117, 252, 0.2);
  color: #2575fc;
  padding: 8px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: 500;
}
[data-theme="dark"] .ce-page-info { color: #7eb3ff; background: rgba(37,117,252,0.12); }

.ce-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.ce-option-group { display: flex; flex-direction: column; gap: 8px; }
.ce-option-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.ce-toggle-group {
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.ce-toggle {
  flex: 1;
  padding: 9px 6px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.ce-toggle.active {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: #fff;
}

.ce-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  background: var(--card-bg);
  color: var(--text-main);
  cursor: pointer;
  outline: none;
}
.ce-select:focus { border-color: #6a11cb; }

.ce-counter {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}
.ce-counter-btn {
  width: 36px;
  height: 36px;
  background: var(--card-bg);
  color: var(--text-main);
  font-size: 1.2rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.ce-counter-btn:hover { background: rgba(106, 17, 203, 0.15); color: #6a11cb; }
#ceCopiesVal {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}

.ce-estimate-box {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 16px;
}
.ce-estimate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}
.ce-estimate-row:last-child { border-bottom: none; }
.ce-estimate-row span:last-child { font-weight: 600; color: var(--text-main); }
.ce-estimate-total {
  padding-top: 12px;
  margin-top: 4px;
  font-size: 1.05rem !important;
  font-weight: 700;
  color: var(--text-main) !important;
}
.ce-estimate-total span:last-child {
  color: #2575fc !important;
  font-size: 1.2rem;
}

.ce-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
  transition: color 0.2s;
}
.ce-back-btn:hover { color: var(--text-main); }

.ce-order-summary {
  background: linear-gradient(135deg, rgba(106,17,203,0.1), rgba(37,117,252,0.1));
  border: 1px solid rgba(106,17,203,0.2);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
}

@media (max-width: 480px) {
  .ce-modal-box { padding: 20px 16px; }
  .ce-options-grid { grid-template-columns: 1fr; gap: 12px; }
  .hero-btns { flex-direction: column; align-items: center; }
}

.note-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.note-download-btn {
  background: var(--card-bg);
  border: 1px solid var(--primary);
  color: var(--primary);
  width: 100%;
  font-weight: 600;
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.note-card:hover .note-download-btn {
  background: var(--primary);
  color: #fff;
}

/* --- My orders: tracking timeline (48h progression + admin status) --- */
.order-tracking {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 4px 0 0 0;
}

.order-tracking-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.order-tracking-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 18px 0;
  line-height: 1.5;
}

.order-tracking-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.order-tracking-step {
  position: relative;
  padding-left: 40px;
  padding-bottom: 20px;
  min-height: 28px;
}

.order-tracking-step:last-child {
  padding-bottom: 0;
}

.order-tracking-step::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 26px;
  width: 2px;
  bottom: 0;
  background: var(--border-color);
}

.order-tracking-step:last-child::after {
  display: none;
}

.order-tracking-step.is-done::after {
  background: linear-gradient(180deg, #10b981 0%, #10b981 70%, var(--border-color) 100%);
}

.order-tracking-step.is-pending::after {
  background: var(--border-color);
}

.order-tracking-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: var(--card-bg);
  box-sizing: border-box;
}

.order-tracking-step.is-done .order-tracking-dot {
  background: #10b981;
  border-color: #10b981;
}

.order-tracking-step.is-done .order-tracking-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  width: 5px;
  height: 9px;
  margin: -5px 0 0 -3px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.order-tracking-step.is-current .order-tracking-dot {
  border-color: #2575fc;
  background: var(--card-bg);
  box-shadow: 0 0 0 4px rgba(37, 117, 252, 0.22);
  animation: order-track-pulse 1.6s ease-in-out infinite;
}

.order-tracking-step.is-pending .order-tracking-dot {
  opacity: 0.4;
  background: var(--bg-color);
}

@keyframes order-track-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(37, 117, 252, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(37, 117, 252, 0.08); }
}

.order-tracking-step-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.order-tracking-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
}

.order-tracking-step.is-pending .order-tracking-label {
  color: var(--text-muted);
  font-weight: 500;
}

.order-tracking-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #2575fc;
  background: rgba(37, 117, 252, 0.12);
  padding: 3px 8px;
  border-radius: 999px;
}

.order-tracking--cancelled {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.06);
}

.order-tracking-cancel-msg {
  margin: 0;
  font-size: 0.9rem;
  color: #ef4444;
  font-weight: 600;
}

/* --- Document Scanner UI --- */
#scannerModal {
  display: none; 
  position: fixed; 
  inset: 0; 
  background: #000; 
  z-index: 100000; 
  flex-direction: column;
}

#scannerVideo {
  flex: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111;
  position: absolute;
  top: 0;
  left: 0;
}

#scannerControls {
  padding: 20px;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  position: absolute;
  bottom: 0;
  width: 100%;
  z-index: 20;
}

.scanner-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.scanner-btn:active {
  opacity: 0.8;
}

.scanner-cam-btn {
  background: var(--primary);
  color: #000;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
}

#scannerPreviewContainer {
  display: none;
  flex: 1;
  background: #000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  padding-bottom: 100px;
  z-index: 15;
  position: relative;
}

#scannerPreviewCanvas {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 2px solid var(--primary);
}

.scanner-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--primary);
  color: #000;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 50;
}
 
 
/* --- Loaders and Button Groups --- */
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 1s ease-in-out infinite; display: none; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.loading { pointer-events: none; opacity: 0.8; }
.btn.loading .spinner { display: inline-block; }
.otp-btn-group { display: flex; gap: 10px; margin-bottom: 12px; }
.otp-btn-group .btn { flex: 1; font-size: 0.9rem; padding: 10px; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: white; border: none; font-weight: 600; cursor: pointer; transition: all 0.3s; }
.btn-sms { background-color: #2575fc; }
.btn-sms:hover { background-color: #1a5bce; }
.btn-whatsapp { background-color: #25D366; }
.btn-whatsapp:hover { background-color: #1ebe57; }

/* Animated Bot Styles */
.animated-bot .bot-eye { animation: blink 3s infinite; }
.animated-bot .waving-arm { transform-origin: 75% 45%; animation: wave 2.5s infinite; }
.animated-bot .thinking-bubble { animation: floatBubble 4s ease-in-out infinite; }
.animated-bot .dot-1 { animation: thinkDot 1.5s infinite 0s; }
.animated-bot .dot-2 { animation: thinkDot 1.5s infinite 0.3s; }
.animated-bot .dot-3 { animation: thinkDot 1.5s infinite 0.6s; }
@keyframes blink { 0%, 96%, 98% { opacity: 1; } 97% { opacity: 0; } 100% { opacity: 1; } }
@keyframes wave { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-20deg); } 50% { transform: rotate(10deg); } 75% { transform: rotate(-20deg); } }
@keyframes floatBubble { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes thinkDot { 0%, 100% { opacity: 0.2; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.2); } }

/* Image Categories Slider */
.image-categories-container {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding: 8px 4px 20px 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.image-categories-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.image-category-item {
  flex: 0 0 auto;
  width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  scroll-snap-align: start;
  gap: 8px;
  transition: transform 0.2s ease;
}

.image-category-item:hover {
  transform: translateY(-4px);
}

.image-category-item .img-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.image-category-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.image-category-item .category-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-color);
  text-align: center;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* --- 2-Row Dynamic Categories Slider --- */
.dynamic-categories-slider {
  display: grid;
  grid-template-rows: auto auto;
  grid-auto-flow: column;
  gap: 16px;
  padding: 8px 4px 20px 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.dynamic-categories-slider::-webkit-scrollbar {
  display: none;
}
.dynamic-category-item {
  flex: 0 0 auto;
  width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  scroll-snap-align: start;
  gap: 8px;
  transition: transform 0.2s ease;
}
.dynamic-category-item:hover {
  transform: translateY(-4px);
}
.dynamic-category-item .img-wrapper {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
}
.dynamic-category-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}
.dynamic-category-item .category-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-color);
  text-align: center;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Skeleton Loading Animation */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.skeleton-img, .skeleton-text {
  background: #e0e0e0;
  background-image: linear-gradient(90deg, #e0e0e0 0px, #f0f0f0 40px, #e0e0e0 80px);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--radius-sm);
}

[data-theme='dark'] .skeleton-img, [data-theme='dark'] .skeleton-text {
  background: #2a2a2a;
  background-image: linear-gradient(90deg, #2a2a2a 0px, #3a3a3a 40px, #2a2a2a 80px);
}

.skeleton-img { height: 260px; width: 100%; }
.skeleton-text { height: 16px; width: 85%; }
.skeleton-text.short { width: 50%; }

/* Combo Image Grid */
.combo-image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.combo-image-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
