/* ===================================================
   Verjaardaglijstje Suzan — Complete Stylesheet
   =================================================== */

/* --- CSS Variables --- */
:root {
  --purple: #7c3aed;
  --purple-dark: #5b21b6;
  --pink: #db2777;
  --pink-light: #f9a8d4;
  --green: #16a34a;
  --green-light: #bbf7d0;
  --amber: #d97706;
  --amber-light: #fef3c7;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--gray-100);
  color: var(--gray-900);
  min-height: 100vh;
  line-height: 1.5;
}

/* === HEADER === */
header {
  background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 100%);
  color: var(--white);
  text-align: center;
  padding: 48px 24px 40px;
  position: relative;
  overflow: hidden;
}

.header-inner {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.header-emoji {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 12px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

header h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-sub {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 480px;
  margin: 0 auto;
}

/* === TIP BAR === */
.tip-bar {
  background: var(--amber-light);
  border-left: 4px solid var(--amber);
  color: #78350f;
  padding: 14px 20px;
  font-size: 0.92rem;
  max-width: 900px;
  margin: 20px auto 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

/* === FILTER PANEL === */
.filters-wrapper {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.filters-wrapper .container {
  padding: 16px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.filter-group:last-child { margin-bottom: 0; }

.filter-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 70px;
  white-space: nowrap;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-btn, .cat-btn {
  padding: 6px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--gray-700);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
}

.filter-btn:hover, .cat-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: #f5f3ff;
}

.filter-btn.active, .cat-btn.active {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  border-color: transparent;
  color: var(--white);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(124,58,237,0.35);
}

/* === DUAL RANGE SLIDER === */
.slider-group {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.slider-group .filter-label { min-width: auto; }

.range-wrap {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 36px;
  display: flex;
  align-items: center;
}

.range-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--gray-200);
  border-radius: var(--radius-pill);
  pointer-events: none;
}

.range-fill {
  position: absolute;
  height: 6px;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  border-radius: var(--radius-pill);
  pointer-events: none;
}

.range-wrap input[type="range"] {
  position: absolute;
  width: 100%;
  height: 6px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
  outline: none;
}

.range-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--purple);
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: border-color 0.15s, transform 0.1s;
}

.range-wrap input[type="range"]::-webkit-slider-thumb:hover {
  border-color: var(--pink);
  transform: scale(1.15);
}

.range-wrap input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--purple);
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* === TOGGLE + COUNT === */
.toggle-group { justify-content: space-between; }

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--gray-700);
  cursor: pointer;
  user-select: none;
}

.toggle-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--purple);
  cursor: pointer;
  flex-shrink: 0;
}

.result-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

/* === MAIN / GIFT GRID === */
main.container {
  padding-top: 24px;
  padding-bottom: 48px;
}

.gifts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .gifts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .gifts-grid { grid-template-columns: 1fr; }
}

/* === GIFT CARD === */
.gift-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.15s;
  border: 1.5px solid transparent;
}

.gift-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.gift-card.purchased {
  opacity: 0.65;
  background: var(--gray-50);
}

.gift-card.purchased:hover {
  transform: none;
  box-shadow: var(--shadow-md);
}

.card-top {
  padding: 16px 16px 10px;
  flex: 1;
}

.card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-price {
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
  color: var(--purple-dark);
  border: 1px solid #ddd6fe;
}

.badge-category {
  background: var(--gray-100);
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
}

.badge-purchased {
  background: var(--green-light);
  color: var(--green);
  border: 1px solid #86efac;
}

.gift-name {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
  line-height: 1.35;
}

.gift-card.purchased .gift-name {
  text-decoration: line-through;
  color: var(--gray-400);
}

.gift-desc {
  font-size: 0.83rem;
  color: var(--gray-500);
  line-height: 1.55;
}

/* === CARD BOTTOM === */
.card-bottom {
  padding: 12px 16px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shop-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--purple);
  text-decoration: none;
  padding: 4px 10px;
  border: 1.5px solid #ddd6fe;
  border-radius: var(--radius-pill);
  transition: all 0.15s;
  background: #f5f3ff;
}

.shop-link:hover {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
}

.btn-buy {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.btn-buy:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-buy:disabled {
  background: var(--gray-300);
  color: var(--gray-500);
  cursor: not-allowed;
  transform: none;
}

.empty-msg {
  text-align: center;
  color: var(--gray-400);
  font-size: 1.1rem;
  padding: 60px 20px;
  grid-column: 1/-1;
}

.hidden { display: none !important; }

/* === FOOTER === */
footer {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 20px 16px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--gray-400);
}

.admin-link {
  font-size: 0.78rem;
  color: var(--gray-400);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--gray-200);
  transition: all 0.15s;
}

.admin-link:hover {
  color: var(--purple);
  border-color: var(--purple);
  background: #f5f3ff;
}

/* === MODAL === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  padding: 28px;
  width: 100%;
  max-width: 440px;
  animation: slideUp 0.2s ease;
}

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

.modal-box h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--gray-900);
}

.modal-gift-name {
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 18px;
  font-size: 1rem;
  padding: 10px 14px;
  background: #f5f3ff;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--purple);
}

.modal-box label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.modal-box input[type="text"] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--gray-900);
  outline: none;
  transition: border-color 0.15s;
  margin-bottom: 18px;
}

.modal-box input[type="text"]:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-primary {
  flex: 1;
  padding: 11px 20px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  padding: 11px 20px;
  background: var(--white);
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-secondary:hover {
  border-color: var(--gray-400);
  background: var(--gray-50);
}

.btn-whatsapp {
  flex: 1;
  padding: 11px 20px;
  background: #25d366;
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity 0.15s, transform 0.1s;
}

.btn-whatsapp:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-danger {
  padding: 11px 20px;
  background: #dc2626;
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-danger:hover { opacity: 0.85; }

/* === ADMIN PAGE === */
body.admin-page { background: var(--gray-100); }

.admin-header { text-align: left; padding: 32px 24px; }
.admin-header .header-inner { text-align: left; }
.admin-header h1 { font-size: 1.8rem; font-weight: 800; }
.admin-header .header-sub { text-align: left; margin: 4px 0 16px; }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.25);
  color: var(--white);
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1.5px solid rgba(255,255,255,0.4);
  transition: all 0.15s;
}

.btn-back:hover { background: rgba(255,255,255,0.4); }

.admin-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding: 20px 0 0;
}

.gift-form-panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 24px;
  margin-bottom: 24px;
  border: 1.5px solid #ddd6fe;
}

.gift-form-panel h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--gray-900);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field.full { grid-column: 1 / -1; }

.form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-field input, .form-field textarea, .form-field select {
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--gray-900);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
  background: var(--white);
}

.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

.form-field textarea { resize: vertical; min-height: 70px; }

.link-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.link-row input {
  flex: 1;
  min-width: 100px;
  padding: 7px 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
}

.link-row input:focus { border-color: var(--purple); }

.btn-remove-link {
  padding: 7px 10px;
  background: #fee2e2;
  color: #dc2626;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  transition: background 0.15s;
}

.btn-remove-link:hover { background: #fca5a5; }

.btn-small-outline {
  padding: 7px 14px;
  background: transparent;
  color: var(--purple);
  border: 1.5px solid var(--purple);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 4px;
}

.btn-small-outline:hover { background: #f5f3ff; }

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-gift-row {
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1.5px solid var(--gray-100);
  transition: box-shadow 0.15s;
}

.admin-gift-row:hover { box-shadow: var(--shadow-md); }

.admin-gift-info { flex: 1; min-width: 0; }

.admin-gift-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-gift-meta {
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-top: 3px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-gift-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-edit {
  padding: 7px 14px;
  background: #ede9fe;
  color: var(--purple-dark);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-edit:hover { background: #ddd6fe; }

.btn-delete {
  padding: 7px 14px;
  background: #fee2e2;
  color: #b91c1c;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-delete:hover { background: #fca5a5; }

/* === CATEGORY BADGES === */
.cat-creatief  { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.cat-bewegen   { background: #dcfce7; color: #14532d; border-color: #86efac; }
.cat-bouwen    { background: #fff7ed; color: #7c2d12; border-color: #fed7aa; }
.cat-fantasie  { background: #fce7f3; color: #831843; border-color: #fbcfe8; }
.cat-buiten    { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.cat-water     { background: #eff6ff; color: #1e3a5f; border-color: #bfdbfe; }
.cat-kamer     { background: #f5f3ff; color: #4c1d95; border-color: #ddd6fe; }
.cat-boeken    { background: #fdf4ff; color: #701a75; border-color: #f0abfc; }

/* === RESPONSIVE === */
@media (max-width: 640px) {
  header { padding: 36px 16px 28px; }
  .header-emoji { font-size: 2.5rem; }
  .filters-wrapper .container { padding: 12px; }
  .filter-group { margin-bottom: 8px; }
  .filter-label { min-width: 60px; font-size: 0.78rem; }
  .filter-btn, .cat-btn { font-size: 0.78rem; padding: 5px 10px; }
  main.container { padding-top: 16px; padding-bottom: 32px; }
  .admin-toolbar { flex-direction: column; align-items: flex-start; }
}
