:root {
  --font-manrope: "Manrope", sans-serif;
  --font-outfit: "Outfit", sans-serif;
  --color-brand: #1b3a6b;
  --color-brand-dark: #12284d;
  --color-brand-light: #2a5aa8;
  --color-accent: #e11d2e;
  --color-surface: #f5f8fc;
}

html,
body {
  background-color: #ffffff;
  font-family: var(--font-manrope);
  font-weight: 500;
  color: #12284d;
}

*,
*::before,
*::after {
  font-family: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-outfit);
  font-weight: 600;
}

p, li, a, button, span, label, input, textarea, select {
  font-family: var(--font-manrope);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html, body, * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.product-price-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1b3a6b 0%, #e5eaf3 100%);
  outline: none;
  cursor: pointer;
}

.product-price-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #1b3a6b;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.product-price-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #1b3a6b;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

@keyframes td-spin {
  to { transform: rotate(360deg); }
}

.td-spinner {
  animation: td-spin 0.85s linear infinite;
}

@keyframes td-shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.td-shimmer {
  background: linear-gradient(90deg, #e8f0fb 0%, #f5f8fc 40%, #e8f0fb 80%);
  background-size: 800px 100%;
  animation: td-shimmer 1.25s ease-in-out infinite;
}

#td-toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.td-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-width: 220px;
  max-width: 360px;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 8px 24px rgba(18, 40, 77, 0.18);
  animation: td-toast-in 0.25s ease;
}

.td-toast svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.td-toast.success { background: #1a9e4a; }
.td-toast.error { background: #e11d2e; }
.td-toast.info { background: #1b3a6b; }

@keyframes td-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-drawer-open { overflow: hidden; }

.mobile-nav-open { overflow: hidden; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.page-products > header {
  position: static;
}

@media (min-width: 1024px) {
  #products-filter-panel {
    position: sticky;
    top: var(--products-toolbar-h, 4.75rem);
    z-index: 20;
    max-height: calc(100vh - var(--products-toolbar-h, 4.75rem) - 1rem);
    overflow-y: auto;
    align-self: flex-start;
  }
}

.qr-scan-page {
  min-height: 100vh;
  color: #12284d;
  background:
    radial-gradient(ellipse 90% 42% at 50% -8%, rgba(27, 58, 107, 0.09), transparent 62%),
    linear-gradient(180deg, #eef3fa 0%, #f5f8fc 32%, #f5f8fc 100%);
}

body.qr-route-body {
  background: #f5f8fc;
}

body.home-popup-open {
  overflow: hidden;
}

.qr-scan-page,
.qr-scan-page * {
  box-sizing: border-box;
}

.qr-hidden {
  display: none !important;
}

.qr-scan-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.qr-scan-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid #dce6f4;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(18, 40, 77, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.qr-scan-container {
  width: 100%;
  max-width: 1400px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1rem;
  padding-left: 1rem;
}

.qr-scan-header-inner {
  padding-top: 0.75rem;
  padding-bottom: 1rem;
}

.qr-scan-search-wrap {
  position: relative;
}

.qr-scan-search-icon {
  position: absolute;
  top: 50%;
  left: 1rem;
  width: 1.25rem;
  height: 1.25rem;
  color: rgba(27, 58, 107, 0.45);
  pointer-events: none;
  transform: translateY(-50%);
}

.qr-scan-search-input {
  display: block;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border: 1px solid #d5deee;
  border-radius: 1rem;
  outline: none;
  background: #f5f8fc;
  color: #12284d;
  font: inherit;
  font-size: 0.875rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.qr-scan-search-input::placeholder {
  color: #94a1b5;
}

.qr-scan-search-input:focus {
  border-color: #1b3a6b;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(27, 58, 107, 0.08);
}

.qr-scan-tabs {
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  padding-top: 0.875rem;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}

.qr-scan-tabs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

#qr-album-tabs .qr-scan-tab {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 2.25rem;
  border-radius: 999px !important;
  border: 1px solid #d5deee !important;
  background-color: #fff !important;
  background-image: none !important;
  padding: 0.45rem 1rem !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  line-height: 1.2;
  color: #1b3a6b !important;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

#qr-album-tabs .qr-scan-tab:hover {
  border-color: #1b3a6b !important;
}

#qr-album-tabs .qr-scan-tab.is-active {
  background-color: #1b3a6b !important;
  border-color: #1b3a6b !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(27, 58, 107, 0.22);
}

.qr-scan-card {
  overflow: hidden;
  border: 1px solid #e4ebf5;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1px 4px rgba(18, 40, 77, 0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  animation: qr-fade-up 0.35s ease both;
}

.qr-scan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(18, 40, 77, 0.12);
}

.qr-scan-product-card:hover {
  border-color: #1b3a6b;
  box-shadow: 0 8px 22px rgba(27, 58, 107, 0.16);
}

.qr-scan-content {
  padding-top: 1.5rem;
  padding-bottom: 4rem;
}

.qr-scan-album-head {
  margin-bottom: 1.5rem;
}

.qr-scan-kicker {
  margin: 0;
  color: #1b3a6b;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.2;
  text-transform: uppercase;
}

.qr-scan-album-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.qr-scan-title,
.qr-scan-section-title,
.qr-empty-title {
  margin: 0;
  color: #12284d;
  font-family: var(--font-outfit, "Outfit", sans-serif);
}

.qr-scan-title {
  font-size: 2rem;
  line-height: 1.2;
}

.qr-scan-meta {
  margin: 0;
  color: #6b7b91;
  font-size: 0.875rem;
}

.qr-scan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.qr-scan-media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #eef3fb;
}

.qr-scan-media-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.qr-scan-card:hover .qr-scan-media-image {
  transform: scale(1.04);
}

.qr-scan-badge {
  position: absolute;
  top: 0.625rem;
  left: 0.625rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #1b3a6b;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
  box-shadow: 0 1px 4px rgba(18, 40, 77, 0.12);
}

.qr-scan-card-body {
  min-height: 4.75rem;
  padding: 0.75rem;
  border-top: 1px solid #d5deee;
}

.qr-scan-name {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #12284d;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.qr-scan-product-media {
  padding: 1rem;
  background: #f5f8fc;
}

.qr-scan-product-image {
  object-fit: contain;
}

.qr-scan-section {
  margin-bottom: 2.5rem;
}

.qr-scan-section-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.qr-scan-section-title {
  font-size: 1.125rem;
  line-height: 1.3;
}

.qr-scan-count {
  padding: 0.125rem 0.625rem;
  border: 1px solid #d5deee;
  border-radius: 999px;
  background: #fff;
  color: #1b3a6b;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
}

.qr-scan-rule {
  flex: 1;
  height: 1px;
  background: #dce6f4;
}

.qr-scan-loading-card {
  overflow: hidden;
  border: 1px solid #e4ebf5;
  border-radius: 1rem;
  background: #fff;
}

.qr-scan-loading-media {
  aspect-ratio: 1;
}

.qr-scan-loading-copy {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
}

.qr-scan-loading-line {
  height: 0.875rem;
  border-radius: 0.25rem;
}

.qr-scan-loading-line-wide {
  width: 100%;
}

.qr-scan-loading-line-short {
  width: 66.666667%;
}

.qr-empty {
  width: 100%;
}

.qr-empty-box {
  max-width: 28rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
  border: 1px dashed #c9d7ea;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.qr-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 1rem;
  background: #eef3fb;
  color: #1b3a6b;
}

.qr-empty-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.qr-empty-title {
  font-size: 1.125rem;
  line-height: 1.4;
}

.qr-empty-copy {
  margin: 0.375rem 0 0;
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.5;
}

@media (min-width: 640px) {
  .qr-scan-container {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }

  .qr-scan-header-inner {
    padding-top: 1rem;
  }

  .qr-scan-grid {
    gap: 1rem;
  }
}

@media (min-width: 768px) {
  .qr-scan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .qr-scan-container {
    padding-right: 2rem;
    padding-left: 2rem;
  }

  .qr-scan-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .qr-scan-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@keyframes qr-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.home-popup {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}

.home-popup.hidden {
  display: none;
}

.home-popup.is-open {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.home-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 40, 77, 0.55);
}

.home-popup-panel {
  position: relative;
  z-index: 1;
  width: fit-content;
  max-width: min(88vw, 820px);
  max-height: 80vh;
  border-radius: 1.25rem;
  background: transparent;
  box-shadow: 0 24px 60px rgba(18, 40, 77, 0.28);
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.home-popup.is-open .home-popup-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.home-popup-close {
  position: absolute;
  top: -0.8rem;
  right: -0.8rem;
  z-index: 2;
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 0;
  background: #fff;
  color: #12284d;
  box-shadow: 0 4px 12px rgba(18, 40, 77, 0.16);
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.home-popup-close:hover {
  background: #f5f8fc;
  transform: scale(1.06);
}

.home-popup-close svg,
.home-popup-close i {
  width: 1.25rem;
  height: 1.25rem;
}

.home-popup-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80vh;
  border-radius: 1.25rem;
  object-fit: contain;
  background: #fff;
}

@media (max-width: 640px) {
  .home-popup {
    padding: 1rem;
  }

  .home-popup-panel {
    max-width: calc(100vw - 2rem);
    max-height: 80vh;
  }

  .home-popup-image {
    max-height: 80vh;
    border-radius: 1rem;
  }

  .home-popup-close {
    top: 0.55rem;
    right: 0.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-popup,
  .home-popup-panel,
  .home-popup-close {
    transition: none;
  }
}
