/* ==========================================================================
   PokéMaster - Design System & UI Styling
   ========================================================================== */

:root {
  /* Color Tokens */
  --bg-dark: #080b12;
  --bg-card: rgba(16, 22, 36, 0.8);
  --bg-card-hover: rgba(24, 32, 52, 0.9);
  --surface-color: #101624;
  --surface-border: rgba(255, 255, 255, 0.08);
  --surface-border-hover: rgba(255, 203, 5, 0.45);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  /* PokéMaster Brand & Accent Palette */
  --master-gold: #ffcb05;
  --master-purple: #8b5cf6;
  --master-cyan: #06b6d4;
  --master-red: #ef4444;
  --master-green: #10b981;

  /* Card Type Colors */
  --type-fire: #ef4444;
  --type-water: #3b82f6;
  --type-electric: #eab308;
  --type-grass: #10b981;
  --type-psychic: #ec4899;
  --type-fighting: #f97316;
  --type-dark: #64748b;
  --type-dragon: #8b5cf6;
  --type-steel: #94a3b8;
  --type-normal: #a1a1aa;

  /* Effects */
  --glass-bg: rgba(12, 17, 29, 0.7);
  --glass-blur: blur(16px);
  --card-shadow: 0 14px 35px -8px rgba(0, 0, 0, 0.7), 0 4px 14px rgba(0, 0, 0, 0.5);
  --glow-gold: 0 0 25px rgba(255, 203, 5, 0.3);

  /* Radius & Transitions */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 14.5px;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 70%, rgba(6, 182, 212, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(255, 203, 5, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
}

h1, h2, h3, h4, .brand-name {
  font-family: 'Outfit', sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

.hidden { display: none !important; }
.gradient-text {
  background: linear-gradient(135deg, var(--master-gold) 0%, #ffe600 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-success { color: var(--master-green); }
.text-free { color: var(--master-cyan); font-weight: 700; }

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: var(--surface-border);
  padding: 0.85rem 1.5rem;
}

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #8b5cf6 50%, #ffffff 50%);
  border-radius: 50%;
  border: 3px solid #111;
  position: relative;
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.5);
}

.brand-logo::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: #ffffff;
  border: 3px solid #111;
  border-radius: 50%;
}

.brand-name {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-name .highlight {
  color: var(--master-gold);
}

.search-box {
  flex: 1;
  max-width: 520px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 0.7rem 2.8rem 0.7rem 2.7rem;
  background: rgba(16, 22, 36, 0.85);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-full);
  outline: none;
  transition: var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--master-gold);
  box-shadow: var(--glow-gold);
  background: rgba(16, 22, 36, 0.95);
}

.btn-clear {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--master-gold) 0%, #f59e0b 100%);
  color: #0b0f19;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-db-status {
  background: rgba(16, 22, 36, 0.9);
  border: 1px solid var(--surface-border);
  font-size: 0.8rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-full);
}

.btn-db-status:hover {
  border-color: var(--master-cyan);
}

.db-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-dim);
  display: inline-block;
}

.db-dot.connected {
  background: var(--master-green);
  box-shadow: 0 0 8px var(--master-green);
}

.btn-cart {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  position: relative;
  padding: 0.65rem 0.85rem;
}

.btn-cart:hover {
  border-color: var(--master-gold);
  color: var(--master-gold);
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--master-red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-dark);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
/* ==========================================================================
   Hero Section & Logo Banner Showcase
   ========================================================================== */
.hero-section {
  max-width: 1400px;
  margin: 1.25rem auto 2rem;
  padding: 2.25rem 2.25rem;
  background: linear-gradient(135deg, rgba(24, 32, 52, 0.85) 0%, rgba(12, 17, 29, 0.95) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 203, 5, 0.25);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.8), 0 0 30px rgba(139, 92, 246, 0.15);
  position: relative;
  overflow: hidden;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-logo-showcase {
    margin: 1rem auto 0;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-stats {
    justify-content: center;
  }
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
}

.hero-title {
  font-size: 2.25rem;
  line-height: 1.18;
  font-weight: 800;
  margin-bottom: 0.85rem;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.65rem;
  max-width: 650px;
  line-height: 1.5;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.stat-item { display: flex; flex-direction: column; }
.stat-value { font-size: 1.35rem; font-weight: 800; color: #fff; font-family: 'Outfit', sans-serif; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }
.stat-divider { width: 1px; height: 32px; background: rgba(255, 255, 255, 0.12); }

/* Prominent Hero Logo Emblem Showcase */
.hero-logo-showcase {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.logo-emblem-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  padding: 8px;
  background: linear-gradient(135deg, var(--master-gold), var(--master-purple), var(--master-cyan));
  box-shadow: 0 0 35px rgba(255, 203, 5, 0.45), 0 0 60px rgba(139, 92, 246, 0.3);
  animation: floatEmblem 4s ease-in-out infinite;
}

.hero-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--bg-dark);
  display: block;
}

.logo-glow-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 203, 5, 0.5);
  animation: rotateRing 18s linear infinite;
  pointer-events: none;
}

@keyframes floatEmblem {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.02); }
}

@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Main Layout & Filters
   ========================================================================== */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
}

.filter-toolbar {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.toolbar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--surface-border);
}

.toolbar-header h2 { font-size: 1.2rem; font-weight: 700; }
.btn-text { background: none; border: none; color: var(--master-gold); font-size: 0.85rem; cursor: pointer; &:hover { text-decoration: underline; } }

.filter-group { display: flex; flex-direction: column; gap: 0.4rem; }
.filter-group label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }

.custom-select, input[type="number"], input[type="text"], textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: rgba(10, 14, 24, 0.85);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition-fast);
}

.custom-select:focus, input:focus, textarea:focus {
  border-color: var(--master-gold);
  box-shadow: 0 0 0 2px rgba(255, 203, 5, 0.15);
}

.price-inputs { display: flex; align-items: center; gap: 0.5rem; }

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--surface-border);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--surface-border);
  color: var(--text-main);
  &:hover { border-color: var(--master-gold); color: var(--master-gold); }
}

.btn-sm { padding: 0.45rem 0.75rem; font-size: 0.85rem; }
.import-label { cursor: pointer; text-align: center; display: block; }

.catalog-section { display: flex; flex-direction: column; gap: 1.5rem; }
.catalog-header { display: flex; flex-direction: column; gap: 0.75rem; }
.results-info { display: flex; align-items: center; justify-content: space-between; }
.results-info h2 { font-size: 1.6rem; font-weight: 800; }
.results-badge { font-size: 0.85rem; color: var(--text-muted); background: rgba(255, 255, 255, 0.05); padding: 0.3rem 0.75rem; border-radius: var(--radius-full); }

.active-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-pill {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.tag-pill button { background: none; border: none; color: inherit; cursor: pointer; font-weight: bold; }

/* ==========================================================================
   Cards Grid & 3D Foil Effect
   ========================================================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card-item { perspective: 1000px; cursor: pointer; }

.card-inner {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  transition: transform 0.15s ease-out, border-color 0.2s, box-shadow 0.2s;
  transform-style: preserve-3d;
  overflow: hidden;
}

.card-item:hover .card-inner {
  border-color: var(--surface-border-hover);
  box-shadow: 0 16px 36px -10px rgba(255, 203, 5, 0.25), 0 8px 16px rgba(0, 0, 0, 0.5);
}

.card-foil {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: var(--radius-md);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s;
  background: linear-gradient(
    125deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 30%,
    rgba(236, 72, 153, 0.3) 45%,
    rgba(6, 182, 212, 0.3) 60%,
    transparent 100%
  );
  background-size: 200% 200%;
}

.card-item:hover .card-foil { opacity: 1; }

.card-header-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 4;
}

.badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-psa {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

.badge-gold {
  background: linear-gradient(135deg, var(--master-gold) 0%, #d97706 100%);
  color: #000;
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  height: 270px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.card-item:hover .card-img-wrapper img { transform: scale(1.04); }

.card-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  z-index: 4;
}

.card-name {
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-set-info { font-size: 0.8rem; color: var(--text-muted); }

.card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.4rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--surface-border);
}

.card-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--master-gold);
  font-family: 'Outfit', sans-serif;
}

.btn-add-cart-icon {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  &:hover { background: var(--master-gold); color: #000; border-color: var(--master-gold); transform: scale(1.1); }
}

/* Badges */
.badge-Fire { background: rgba(239, 68, 68, 0.25); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4); }
.badge-Water { background: rgba(59, 130, 246, 0.25); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.4); }
.badge-Rayo { background: rgba(234, 179, 8, 0.25); color: #fef08a; border: 1px solid rgba(234, 179, 8, 0.4); }
.badge-Planta { background: rgba(16, 185, 129, 0.25); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-Psíquico { background: rgba(236, 72, 153, 0.25); color: #fbcfe8; border: 1px solid rgba(236, 72, 153, 0.4); }
.badge-Lucha { background: rgba(249, 115, 22, 0.25); color: #fdba74; border: 1px solid rgba(249, 115, 22, 0.4); }
.badge-Oscuro { background: rgba(100, 116, 139, 0.25); color: #cbd5e1; border: 1px solid rgba(100, 116, 139, 0.4); }
.badge-Dragón { background: rgba(139, 92, 246, 0.25); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.4); }
.badge-Metal { background: rgba(148, 163, 184, 0.25); color: #e2e8f0; border: 1px solid rgba(148, 163, 184, 0.4); }
.badge-Incoloro { background: rgba(212, 212, 216, 0.25); color: #f4f4f5; border: 1px solid rgba(212, 212, 216, 0.4); }

/* ==========================================================================
   Modals & Drawers
   ========================================================================== */
.modal-overlay, .drawer-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.25s ease-out;
}

.modal-card {
  background: #101624;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-sm { max-width: 420px; padding: 2rem; }
.modal-md { max-width: 500px; padding: 2rem; }
.modal-lg { max-width: 780px; padding: 2rem; }
.modal-detail { max-width: 950px; padding: 2.2rem; }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--surface-border);
}

.modal-header h3 { font-size: 1.5rem; font-weight: 800; }
.modal-subtitle { font-size: 0.9rem; color: var(--text-muted); }
.modal-close { background: none; border: none; font-size: 1.8rem; color: var(--text-muted); cursor: pointer; &:hover { color: #fff; } }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.full-width { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text-main); }
.help-text { font-size: 0.75rem; color: var(--text-muted); }
.input-with-button { display: flex; gap: 0.5rem; }

.api-search-box {
  position: relative;
  background: rgba(139, 92, 246, 0.05);
  border: 1px dashed rgba(139, 92, 246, 0.3);
  padding: 1rem;
  border-radius: var(--radius-md);
}

.api-results-dropdown {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: #1a2336;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: var(--card-shadow);
  margin-top: 4px;
}

.api-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  &:hover { background: rgba(255, 203, 5, 0.15); }
}

.api-item img { width: 35px; height: 48px; object-fit: contain; }

.image-upload-tabs { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.tab-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.tab-btn.active { background: var(--master-gold); color: #000; font-weight: 700; border-color: var(--master-gold); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.dropzone {
  border: 2px dashed var(--surface-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  color: var(--text-muted);
  &:hover { border-color: var(--master-gold); background: rgba(255, 203, 5, 0.05); color: #fff; }
}

.image-preview-container {
  margin-top: 0.75rem;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.image-preview { max-height: 100%; object-fit: contain; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--surface-border); }

/* Detail 3D Modal */
.detail-container { display: grid; grid-template-columns: 360px 1fr; gap: 2.5rem; }
.detail-visual { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.holo-card-stage { perspective: 1200px; width: 290px; height: 410px; }

.holo-card-3d {
  width: 100%; height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.holo-card-inner {
  width: 100%; height: 100%;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.holo-card-inner img { width: 100%; height: 100%; object-fit: fill; }

.holo-foil-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.5) 40%,
    rgba(236, 72, 153, 0.4) 60%,
    rgba(6, 182, 212, 0.4) 80%,
    transparent 100%
  );
  background-size: 250% 250%;
  mix-blend-mode: color-dodge;
  opacity: 0.6;
}

.tilt-instruction { font-size: 0.8rem; color: var(--text-muted); }

.detail-info { display: flex; flex-direction: column; gap: 1.25rem; }
.detail-badges { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.detail-title { font-size: 2.2rem; font-weight: 800; line-height: 1.1; }
.detail-subtitle { color: var(--text-muted); font-size: 0.95rem; }

.detail-price-box {
  background: rgba(255, 203, 5, 0.08);
  border: 1px solid rgba(255, 203, 5, 0.25);
  padding: 1.2rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-label { display: block; font-size: 0.8rem; color: var(--text-muted); }
.price-value { font-size: 2rem; font-weight: 800; color: var(--master-gold); font-family: 'Outfit', sans-serif; }
.stock-tag { font-size: 0.85rem; background: rgba(16, 185, 129, 0.15); color: #6ee7b7; padding: 0.3rem 0.75rem; border-radius: var(--radius-full); }

.detail-specs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: rgba(10, 14, 24, 0.7);
  padding: 1rem;
  border-radius: var(--radius-md);
}

.spec-row { display: flex; justify-content: space-between; font-size: 0.9rem; }
.spec-name { color: var(--text-muted); }
.spec-val { font-weight: 600; }

.detail-actions { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.5rem; }
.btn-block { width: 100%; }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1.1rem; }

.btn-danger-outline {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  &:hover { background: rgba(239, 68, 68, 0.15); border-color: #ef4444; }
}

/* Drawer */
.drawer-overlay { justify-content: flex-end; padding: 0; }

.cart-drawer {
  background: #0d121f;
  width: 100%;
  max-width: 440px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--surface-border);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-header { padding: 1.5rem; border-bottom: 1px solid var(--surface-border); display: flex; align-items: center; justify-content: space-between; }
.drawer-title { display: flex; align-items: center; gap: 0.6rem; }
.drawer-title h3 { font-size: 1.25rem; font-weight: 800; }

.drawer-body { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }

.cart-item {
  display: flex;
  gap: 1rem;
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  padding: 0.85rem;
  border-radius: var(--radius-md);
  align-items: center;
}

.cart-item img { width: 55px; height: 75px; object-fit: contain; border-radius: 4px; }
.cart-item-info { flex: 1; }
.cart-item-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.2rem; }
.cart-item-price { color: var(--master-gold); font-weight: 700; font-size: 0.9rem; }
.qty-controls { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem; }
.btn-qty { width: 24px; height: 24px; background: rgba(255, 255, 255, 0.1); border: none; color: #fff; border-radius: 4px; cursor: pointer; &:hover { background: var(--master-gold); color: #000; } }
.cart-item-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0.4rem; &:hover { color: var(--master-red); } }

.drawer-footer { padding: 1.5rem; border-top: 1px solid var(--surface-border); background: rgba(13, 18, 31, 0.95); display: flex; flex-direction: column; gap: 1rem; }
.coupon-box { display: flex; gap: 0.5rem; }
.cart-summary { display: flex; flex-direction: column; gap: 0.4rem; }
.summary-line { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--text-muted); }
.total-line { font-size: 1.15rem; color: #fff; font-weight: 700; padding-top: 0.5rem; border-top: 1px solid var(--surface-border); margin-top: 0.3rem; }
.total-amount { color: var(--master-gold); font-size: 1.3rem; }

.receipt-box { background: rgba(0, 0, 0, 0.4); border: 1px dashed var(--surface-border); padding: 1.2rem; border-radius: var(--radius-md); margin: 1.5rem 0; text-align: left; font-size: 0.9rem; }
.checkout-success-icon { font-size: 4rem; margin-bottom: 0.5rem; }

.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 2000; display: flex; flex-direction: column; gap: 0.75rem; }
.toast { background: #1a2336; border: 1px solid var(--surface-border); color: #fff; padding: 0.85rem 1.25rem; border-radius: var(--radius-md); box-shadow: var(--card-shadow); display: flex; align-items: center; gap: 0.75rem; animation: slideInUp 0.3s ease-out; }
.toast-success { border-left: 4px solid var(--master-green); }
.toast-info { border-left: 4px solid var(--master-purple); }
.toast-error { border-left: 4px solid var(--master-red); }

.location-banner {
  background: rgba(139, 92, 246, 0.15);
  border-bottom: 1px solid rgba(139, 92, 246, 0.3);
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
  color: #c4b5fd;
  text-align: center;
}

.detail-location-alert {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #a5f3fc;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

.warning-clause-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: #fecaca;
  line-height: 1.45;
}

.warning-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ef4444;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.warning-highlight {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.checkbox-clause-group {
  background: rgba(255, 203, 5, 0.05);
  border: 1px solid rgba(255, 203, 5, 0.25);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-main);

  input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--master-gold);
  }
}

.btn-whatsapp {
  background: #25D366;
  color: #000;
  font-weight: 700;

  &:hover {
    background: #1eb957;
    color: #000;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.4);
  }
}

.ticket-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Category Tabs Bar */
.category-tabs-bar {
  background: rgba(18, 22, 34, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 70px;
  z-index: 90;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.category-tabs-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scrollbar-width: thin;

  &::-webkit-scrollbar {
    height: 4px;
  }
  &::-webkit-scrollbar-thumb {
    background: var(--master-gold);
    border-radius: 4px;
  }
}

.category-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);

  .tab-icon {
    font-size: 1.05rem;
  }

  &:hover {
    background: rgba(255, 203, 5, 0.1);
    color: var(--text-main);
    border-color: rgba(255, 203, 5, 0.3);
  }

  &.active {
    background: linear-gradient(135deg, rgba(255, 203, 5, 0.2), rgba(139, 92, 246, 0.25));
    border-color: var(--master-gold);
    color: var(--master-gold);
    box-shadow: 0 0 16px rgba(255, 203, 5, 0.25);
  }
}

/* ==========================================================================
   Reviews & Star Rating System
   ========================================================================== */
.reviews-section {
  max-width: 1400px;
  margin: 3rem auto 4rem;
  padding: 0 1.5rem;
}

.reviews-container {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--card-shadow);
}

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--surface-border);

  h2 { font-size: 1.5rem; font-weight: 800; }
}

.reviews-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

.rating-summary-box {
  background: rgba(255, 203, 5, 0.08);
  border: 1px solid rgba(255, 203, 5, 0.3);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rating-score {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--master-gold);
}

.stars-display {
  font-size: 1.1rem;
  color: #ffc107;
  letter-spacing: 2px;
}

.rating-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.review-card {
  background: rgba(10, 14, 24, 0.75);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: var(--transition-fast);

  &:hover {
    border-color: rgba(255, 203, 5, 0.35);
    transform: translateY(-2px);
  }
}

.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.review-author {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.92rem;
}

.review-date {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.review-stars {
  color: #ffc107;
  font-size: 0.95rem;
  letter-spacing: 1px;
}

.review-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.add-review-box {
  background: rgba(24, 32, 52, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.75rem;
  border-radius: var(--radius-md);

  h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 1rem; color: var(--master-gold); }
}

.review-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;

  .full-width { grid-column: 1 / -1; }
  .align-right { text-align: right; }
}

.star-rating-input {
  display: flex;
  gap: 0.4rem;
  font-size: 1.8rem;
  cursor: pointer;
  user-select: none;
  margin-top: 0.2rem;
}

.star-rating-input .star {
  color: #4b5563;
  transition: color 0.15s ease, transform 0.15s ease;

  &:hover, &.active {
    color: #ffc107;
    transform: scale(1.15);
  }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }

@media (max-width: 1024px) {
  .main-container { grid-template-columns: 1fr; }
  .filter-toolbar { position: static; }
  .detail-container { grid-template-columns: 1fr; }
  .holo-card-stage { margin: 0 auto; }
}

@media (max-width: 640px) {
  .navbar-container { flex-direction: column; gap: 0.75rem; }
  .search-box { width: 100%; max-width: none; }
  .hero-title { font-size: 2rem; }
  .form-grid { grid-template-columns: 1fr; }
}
