/* VARIABLES & TOKENS */
:root {
  /* Colors */
  --primary: #265BFF;
  --primary-dark: #0035be;
  --primary-light: #efefff;
  --secondary: #985CF8;
  --secondary-light: #e9ddff;
  --background: #ffffff;
  --surface: #ffffff;
  --surface-dim: #f3f4f6;
  --on-surface: #111111;
  --on-surface-variant: #4b5563;
  --outline: #9ca3af;
  
  /* Rarity Colors */
  --common: #19DB8A;
  --common-bg: #e6fbf2;
  --epic: #985CF8;
  --epic-bg: #f5f0ff;
  --legendary: #FFB800;
  --legendary-bg: #fffbeb;
  
  /* Typography */
  --font-headline: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;
  
  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --shadow-epic: 0 0 15px rgba(139, 92, 246, 0.3);
  --shadow-legendary: 0 0 20px rgba(245, 158, 11, 0.4);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--background);
  color: var(--on-surface);
  line-height: 1.5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

a {
  color: inherit;
  text-decoration: none;
}

/* NAVBAR */
.navbar {
  background-color: #f2f2f2;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 100;
  padding: var(--space-md) 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.nav-logo {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

#animated-logo {
  mix-blend-mode: multiply;
  filter: brightness(1.06);
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
  color: var(--on-surface-variant);
  transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

/* BUTTONS */
.btn-primary {
  background-color: var(--primary);
  color: white;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  border: none;
  cursor: pointer;
  transition: transform 0.1s, background-color 0.2s;
  box-shadow: 0 4px 0 var(--primary-dark);
}

.btn-primary:hover {
  background-color: #1a4bff;
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--primary-dark);
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--on-surface);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  border: 2px solid var(--surface-dim);
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-secondary:hover {
  background-color: var(--surface-dim);
}

/* HERO SECTION */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  padding: var(--space-xl) 0;
  align-items: center;
}

.hero-title {
  font-family: var(--font-headline);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.text-gradient {
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--on-surface-variant);
  margin-bottom: var(--space-lg);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

/* TICKER */
.loot-ticker {
  background-color: var(--on-surface);
  color: white;
  padding: var(--space-sm) 0;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ticker-label {
  background-color: var(--primary);
  padding: var(--space-xs) var(--space-md);
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.ticker-track {
  flex: 1;
}

.ticker-items {
  display: flex;
  gap: var(--space-xl);
  animation: ticker 20s linear infinite;
  white-space: nowrap;
}

@keyframes ticker {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* CARDS & RARITY */
.floating-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.card-legendary {
  border: 2px solid var(--legendary);
  box-shadow: var(--shadow-legendary);
}

.card-epic {
  border: 2px solid var(--epic);
  box-shadow: var(--shadow-epic);
}

.card-common {
  border: 1px solid var(--common);
  box-shadow: 0 0 12px rgba(25, 219, 138, 0.4);
}

.card-badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 10;
}

.discount-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background-color: #ff4b4b;
  color: white;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 10;
}

.legendary-badge { background-color: var(--legendary-bg); color: var(--legendary); }
.epic-badge { background-color: var(--epic-bg); color: var(--epic); }
.common-badge { background-color: var(--common-bg); color: var(--common); }

/* CATEGORIES */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.category-card {
  background: var(--surface);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--surface-dim);
  transition: transform 0.2s, border-color 0.2s;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.cat-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.cat-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.cat-count {
  font-size: 0.8rem;
  color: var(--on-surface-variant);
}

/* DEALS GRID */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

/* NEWSLETTER */
.newsletter-card {
  background: linear-gradient(135deg, #1a1c1e, #2f3133);
  color: white;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.newsletter-form {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.email-input {
  flex: 1;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: white;
}

/* FOOTER */
.footer {
  background-color: #1a1c1e;
  color: #a1a1aa;
  padding: var(--space-xl) 0 var(--space-lg) 0;
  margin-top: var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
}

.footer h4 {
  color: white;
  margin-bottom: var(--space-md);
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: var(--space-sm);
}

.footer a:hover {
  color: white;
}

/* ADMIN PAGE - PREMIUM GAMIFIED STYLE */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.admin-stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  border: 1px solid var(--surface-dim);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
}

.admin-stat-card:hover {
  transform: translateY(-2px);
}

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: var(--space-xs);
}

.stat-value {
  font-family: var(--font-headline);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--on-surface);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-change {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: rgba(0,0,0,0.05);
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
}

.stat-change.positive { 
  color: #10b981;
  background: #e6f4ea;
}

/* Rarity specific card enhancements */
.admin-stat-card:nth-child(1) { border-top: 3px solid var(--legendary); }
.admin-stat-card:nth-child(2) { border-top: 3px solid var(--epic); }
.admin-stat-card:nth-child(3) { border-top: 3px solid var(--common); }
.admin-stat-card:nth-child(4) { border-top: 3px solid var(--primary); }

/* Forms and Layout */
.admin-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.admin-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--surface-dim);
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.card-header h2 {
  font-family: var(--font-headline);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.search-input {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--outline);
  background: #f9fafb;
  font-size: 0.9rem;
  width: 200px;
  transition: all 0.2s;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(38, 91, 255, 0.1);
  outline: none;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--on-surface-variant);
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--outline);
  background: #f9fafb;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(38, 91, 255, 0.1);
  outline: none;
}

.discount-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  background: #f3f4f6;
  border-radius: var(--radius-md);
  height: 50px;
}

.discount-value {
  font-family: var(--font-headline);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.rarity-auto {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(0,0,0,0.05);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
  .admin-stats-grid { grid-template-columns: 1fr; }
}

.form-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
  margin-top: var(--space-lg);
}

.form-actions button {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  transition: all 0.2s;
}

.form-actions .btn-secondary {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.form-actions .btn-secondary:hover {
  background: #e5e7eb;
}

.form-actions .btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  box-shadow: 0 4px 6px -1px rgba(38, 91, 255, 0.2);
}

.form-actions .btn-primary:hover {
  box-shadow: 0 6px 8px -1px rgba(38, 91, 255, 0.3);
  transform: translateY(-1px);
}

/* Recent Deals List */
.recent-deals-list {
  display: flex;
  flex-direction: column;
}

.admin-deal-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  border-bottom: 1px solid var(--surface-dim);
  transition: background-color 0.2s;
}

.admin-deal-item:hover {
  background: rgba(0,0,0,0.01);
}

.deal-item-title {
  font-weight: 700;
  color: var(--on-surface);
}

.deal-item-meta {
  font-size: 0.8rem;
  color: var(--on-surface-variant);
  margin-top: 2px;
}

.rarity-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.rarity-badge.common { background: #e6f4ea; color: #10b981; }
.rarity-badge.epic { background: #f3e8ff; color: #9333ea; }
.rarity-badge.legendary { background: #fef3c7; color: #d97706; }

.deal-item-price {
  text-align: right;
}

.deal-current-price {
  font-weight: 700;
  color: var(--primary);
}

.deal-original-price {
  font-size: 0.8rem;
  text-decoration: line-through;
  color: var(--on-surface-variant);
}

/* Rarity Selector (Prominent) */
.rarity-group {
  background: #f9fafb;
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-dim);
  margin-bottom: var(--space-lg);
}

.rarity-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.rarity-btn {
  padding: var(--space-md) var(--space-sm);
  border-radius: var(--radius-md);
  border: 2px solid #e5e7eb;
  background: white;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
}

.rarity-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.rarity-btn.common-btn { color: #10b981; }
.rarity-btn.epic-btn { color: #9333ea; }
.rarity-btn.legendary-btn { color: #d97706; }

.rarity-btn.common-btn.active {
  background: #e6f4ea;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.rarity-btn.epic-btn.active {
  background: #f3e8ff;
  border-color: #9333ea;
  box-shadow: 0 0 0 3px rgba(147, 115, 234, 0.2);
}

.rarity-btn.legendary-btn.active {
  background: #fef3c7;
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
}

/* SUBSCRIBE BAR */
.subscribe-bar {
  background: linear-gradient(135deg, var(--secondary) 0%, #7c3aed 100%);
  color: white;
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  position: relative;
  overflow: hidden;
}

.subscribe-bar::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  transform: rotate(45deg);
}

.subscribe-bar-content {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  position: relative;
  z-index: 1;
}

.subscribe-bar-content .material-icons {
  font-size: 24px;
  color: #fffbeb;
  animation: pulse 2s infinite;
}

.subscribe-bar-content span:not(.material-icons) {
  font-weight: 600;
  font-size: 0.95rem;
  flex-grow: 1;
}

.btn-subscribe-inline {
  background: var(--legendary);
  color: #111111;
  border: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.btn-subscribe-inline:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 184, 0, 0.4);
}

.close-bar {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-bar:hover {
  color: white;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

/* OFFERS PAGE - FILTERS & LAYOUT */
.offers-layout {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.deals-wall {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.filters-sidebar {
  width: 280px;
  background: var(--surface);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-dim);
  box-shadow: var(--shadow-sm);
  height: fit-content;
  position: sticky;
  top: 160px;
  margin-top: 80px;
}

.filter-section {
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--surface-dim);
  padding-bottom: var(--space-md);
}

.filter-section:last-child {
  border-bottom: none;
}

.filter-title {
  font-family: var(--font-headline);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--on-surface);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.filter-check {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--on-surface-variant);
  transition: color 0.2s;
}

.filter-check:hover {
  color: var(--on-surface);
}

.filter-check input {
  display: none; /* Hide default */
}

.check-custom {
  width: 18px;
  height: 18px;
  border: 2px solid var(--outline);
  border-radius: 4px;
  display: inline-block;
  position: relative;
  transition: all 0.2s;
}

.filter-check input:checked + .check-custom {
  background: var(--primary);
  border-color: var(--primary);
}

.filter-check input:checked + .check-custom::after {
  content: '✓';
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
}

/* Radio specific */
.check-custom.radio {
  border-radius: 50%;
}

.filter-check input:checked + .check-custom.radio::after {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.check-count {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--outline);
  background: var(--surface-dim);
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

/* Range Slider */
.range-container {
  margin-top: var(--space-sm);
}

.range-slider {
  width: 100%;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-dim);
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--on-surface-variant);
  margin-top: var(--space-xs);
}

.range-current {
  font-weight: 700;
  color: var(--primary);
}

/* Chips */
.category-chips {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.chip {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--surface-dim);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--on-surface-variant);
}

.chip:hover {
  background: var(--surface-dim);
  color: var(--on-surface);
}

.chip-active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Clear Button */
.btn-clear-filters {
  width: 100%;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  border: 1px solid var(--outline);
  background: transparent;
  color: var(--on-surface-variant);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-xs);
  transition: all 0.2s;
}

.btn-clear-filters:hover {
  background: var(--surface-dim);
  color: var(--on-surface);
}

@media (max-width: 480px) {
  .rarity-selector { grid-template-columns: 1fr; }
}

/* MOBILE NAV */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--surface-dim);
  justify-content: space-around;
  padding: var(--space-sm) 0;
  z-index: 100;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
  color: var(--on-surface-variant);
}

.mobile-nav-item.active {
  color: var(--primary);
}

@media (max-width: 768px) {
  /* Layout */
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .mobile-nav { display: flex; }
  body { padding-bottom: 60px; }
  .nav-links { display: none; }
  .newsletter-card { grid-template-columns: 1fr; }
  
  /* Offers Page */
  .offers-layout { flex-direction: column; }
  .filters-sidebar { width: 100%; position: static; margin-bottom: var(--space-lg); }
  
  /* Admin Page */
  .admin-layout { grid-template-columns: 1fr; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .admin-stats-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form button { width: 100%; }
}

/* LIST VIEW STYLES */
.deals-grid.list-view {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.deals-grid.list-view .floating-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  position: relative;
}

.deals-grid.list-view .floating-card > div[style*="background"] {
  height: 100px !important;
  width: 100px !important;
  margin: 0 !important;
  border-radius: var(--radius-md) !important;
  flex-shrink: 0;
}

.deals-grid.list-view .floating-card h4 {
  margin-bottom: 4px !important;
}

.deals-grid.list-view .floating-card .btn-primary {
  margin-top: 0 !important;
  width: auto !important;
  margin-left: auto;
}

/* Efecto para el botón Quitar */
.btn-quitar {
  background: #ff4d4d;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-quitar:hover {
  background: #ff3333;
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(255, 77, 77, 0.4);
}

.btn-quitar:active {
  transform: scale(0.95);
}

/* FILTER DRAWER (MÓVIL) */
.filter-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s;
}
.filter-drawer-overlay.visible {
  display: block;
  opacity: 1;
}

.filter-drawer {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 320px;
  height: 100%;
  background: var(--surface);
  z-index: 201;
  box-shadow: 4px 0 24px rgba(0,0,0,0.18);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.filter-drawer.open {
  left: 0;
}

.filter-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--surface-dim);
  background: var(--surface);
  position: sticky;
  top: 0;
}

.filter-drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  color: var(--on-surface-variant);
  transition: background 0.2s;
}
.filter-drawer-close:hover {
  background: var(--surface-dim);
}

.filter-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md) var(--space-lg);
}

/* Solo mostrar el drawer en móvil */
@media (min-width: 769px) {
  .filter-drawer, .filter-drawer-overlay { display: none !important; }
}

/* Ocultar sidebar original en móvil */
@media (max-width: 768px) {
  .filters-sidebar {
    display: none !important;
  }
  /* Indicar visualmente que el logo es interactivo */
  #logo-btn {
    cursor: pointer;
    position: relative;
  }
  #logo-btn::after {
    content: '⚙️';
    font-size: 0.7rem;
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.7;
  }
}

/* ══════════════════════════════════════════
   AUTH / LOGIN OVERLAY
══════════════════════════════════════════ */
body.auth-locked main,
body.auth-locked .navbar,
body.auth-locked .mobile-nav {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

#login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 20, 0.7);
  backdrop-filter: blur(4px);
  padding: var(--space-md);
  animation: fadeIn 0.3s ease;
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  max-width: 420px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0,0,0,0.35);
  border: 1px solid var(--surface-dim);
  animation: slideUp 0.35s cubic-bezier(.16,1,.3,1);
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.login-logo {
  text-align: center;
  margin-bottom: var(--space-md);
}

.login-title {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  color: var(--on-surface);
  margin-bottom: var(--space-xs);
}

.login-subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: var(--on-surface-variant);
  margin-bottom: var(--space-lg);
}

.login-field {
  margin-bottom: var(--space-md);
}

.login-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--on-surface-variant);
  margin-bottom: var(--space-xs);
}

.login-field input {
  width: 100%;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--outline);
  background: #f9fafb;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(38, 91, 255, 0.1);
  outline: none;
}

.login-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  margin-bottom: var(--space-md);
}

.login-btn {
  width: 100%;
  padding: var(--space-md);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: background-color 0.2s, transform 0.1s;
  box-shadow: 0 4px 0 var(--primary-dark);
  margin-top: var(--space-md);
}

.login-btn:hover:not(:disabled) {
  background: #1a4bff;
}

.login-btn:active:not(:disabled) {
  transform: translateY(2px);
}

.login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--on-surface-variant);
  margin-top: var(--space-lg);
}

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

.spin { animation: spin 1s linear infinite; }

/* Botón de logout en navbar */
.btn-logout {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--outline);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--on-surface-variant);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* ══════════════════════════════════════════
   SHARE BUTTONS & TOAST STYLES
══════════════════════════════════════════ */
.share-container {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.btn-share {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--surface);
  color: var(--on-surface);
}

.btn-share svg {
  transition: transform 0.2s;
}

.btn-share:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.btn-share:hover svg {
  transform: scale(1.1);
}

.btn-share.btn-tg {
  border-color: #229ED9;
  color: #229ED9;
}

.btn-share.btn-tg:hover {
  background: #229ED9;
  color: white;
}

.btn-share.btn-ig {
  border-color: #e1306c;
  color: #e1306c;
}

.btn-share.btn-ig:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-color: transparent;
  color: white;
}

.custom-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface);
  color: var(--on-surface);
  border: 1px solid var(--outline);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 12px 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10000;
  font-weight: 600;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.custom-toast .toast-icon {
  color: var(--primary);
}
