:root {
  --christmas-red: #c0392b;
  --christmas-dark-red: #962d22;
  --christmas-green: #27ae60;
  --christmas-dark-green: #1e8449;
  --gold: #d4af37;
  --cream-bg: #f9f6f0;
  --paper-bg: #ffffff;
  --text-dark: #2c3e2d;
  --text-muted: #667868;
  --border-color: #e5ded3;
  --shadow-polaroid: 0 10px 25px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background-color: var(--cream-bg);
  color: var(--text-dark);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* --- Snow Canvas --- */
#snow-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* --- Scrapbooking Sticker Background --- */
.scrapbook-bg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.scrap-sticker {
  position: absolute;
  filter: drop-shadow(1px 3px 4px rgba(0, 0, 0, 0.08));
  user-select: none;
}

main {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 64px);
}

.hero,
.board-container,
.auth-page-container,
.admin-container {
  position: relative;
  z-index: 1;
}

/* --- Top Navigation Bar --- */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: #ffffff;
  border-bottom: 2px dashed #decbb5;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--christmas-red);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  background: #f0ebe1;
  padding: 3px;
  border-radius: 20px;
  border: 1px solid #decbb5;
}

.lang-btn {
  padding: 5px 12px;
  border-radius: 16px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
}

.lang-btn.active {
  background: var(--christmas-red);
  color: #fff;
  box-shadow: 0 2px 6px rgba(192, 57, 43, 0.3);
}

.nav-btn {
  background: none;
  border: 1px solid #decbb5;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 0.85rem;
  color: var(--text-dark);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.nav-btn:hover {
  background: #e8ded2;
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  padding: 40px 20px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.7rem;
  font-weight: 800;
  color: var(--christmas-red);
  text-shadow: 1px 2px 2px rgba(0,0,0,0.06);
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 30px;
}

/* --- Board Container (Grid) --- */
.board-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 80px;
}

.gift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

/* Gift Cards */
.gift-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid var(--border-color);
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}

.gift-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

.gift-card.booked {
  cursor: pointer;
  background: #f4f4f4;
  border-color: #dcdcdc;
}

.gift-card.booked:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.10);
}

.gift-card.booked .gift-card-img,
.gift-card.booked .multi-option-img {
  filter: grayscale(100%);
  opacity: 0.45;
}

.gift-card.booked .gift-card-title {
  color: #8c918e;
}

.gift-card.booked .gift-card-desc {
  color: #a6aba8;
}

.gift-card.booked .btn-details-booked {
  background: #eaeaea;
  color: #666;
}

.gift-card.booked .btn-details-booked:hover {
  background: #d8d8d8;
  color: #333;
}

/* Red Booker Name Overlay (NOT greyed out) */
.booked-name-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-4deg);
  background: rgba(255, 255, 255, 0.95);
  color: #d62828;
  border: 2.5px solid #d62828;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1.05rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(214, 40, 40, 0.22);
  z-index: 6;
  max-width: 88%;
  word-break: break-word;
}

.gift-card-img-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  background: #f7f3ed;
  overflow: hidden;
}

.gift-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform 0.3s;
}

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

/* Multi-Options Frame inside Card */
.multi-options-frame {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 8px 6px;
  gap: 4px;
}

.multi-option-slot {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.multi-option-img-box {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 8px;
  padding: 4px;
  border: 1px solid #ede5d8;
}

.multi-option-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.multi-option-placeholder {
  font-size: 2.2rem;
}

.multi-option-price {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--christmas-red);
  background: #ffffff;
  border: 1px solid #f0d7d4;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.multi-or-badge {
  align-self: center;
  flex-shrink: 0;
  background: var(--christmas-green);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 10px;
  letter-spacing: 0.4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Single Product Price Below Photo */
.gift-price-bar {
  padding: 8px 18px 0;
  display: flex;
  align-items: center;
}

.gift-price-tag {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--christmas-red);
  background: #fef0ee;
  border: 1px solid #f6d5d1;
  padding: 3px 10px;
  border-radius: 12px;
}

.gift-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.gift-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.gift-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 14px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gift-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f0ebe1;
  padding-top: 12px;
}

.btn-details {
  background: #f4ece1;
  color: var(--christmas-red);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  text-align: center;
}

.btn-details:hover {
  background: var(--christmas-red);
  color: #fff;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 40, 30, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  position: relative;
  padding: 30px;
  border: 2px solid var(--border-color);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  background: #f0ebe1;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: var(--christmas-red);
  color: #fff;
}

.modal-header-img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #fdfbf7;
  border-radius: 10px;
  margin-bottom: 16px;
  padding: 10px;
}

.modal-title {
  font-size: 1.6rem;
  color: var(--christmas-red);
  margin-bottom: 8px;
  padding-right: 40px;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Stores List */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--christmas-dark-green);
  margin: 18px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.store-links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.store-link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: #fbf9f5;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #ebdccb;
}

.store-info {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.store-name {
  font-weight: 700;
  color: var(--text-dark);
}

.store-price {
  font-weight: 700;
  color: var(--christmas-red);
  background: #fef0ee;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.95rem;
}

.btn-visit {
  background: var(--christmas-green);
  color: white;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 14px;
  transition: background 0.2s;
}

.btn-visit:hover {
  background: var(--christmas-dark-green);
}

/* Alternative Model Cards inside Modal */
.alternatives-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.alt-card {
  border: 2px solid #e2d9cd;
  border-radius: 10px;
  padding: 14px;
  background: #fdfcf9;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, background-color 0.2s;
}

.alt-card.selected {
  border-color: var(--christmas-red);
  background: #fff9f8;
}

.alt-card-main {
  display: flex;
  gap: 16px;
}

.alt-choice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f3ede4;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.alt-card.selected .alt-choice-bar {
  background: #fdeceb;
  color: var(--christmas-red);
}

.alt-inline-booking {
  padding-top: 8px;
  border-top: 1px dashed #e2b8b5;
}

.modal-booked-banner {
  background: #fdf2f2;
  border: 2px solid #d62828;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 18px;
  text-align: center;
}

.booked-banner-name {
  color: #d62828;
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.booked-banner-note {
  color: #7a5c5c;
  font-size: 0.82rem;
}

.alt-thumb {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  padding: 4px;
  border: 1px solid #ebe3d6;
}

.alt-details {
  flex-grow: 1;
  min-width: 0;
}

.alt-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

/* Booking Box */
.booking-box {
  background: #fcf4f4;
  border: 2px dashed var(--christmas-red);
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
  text-align: center;
}

.booking-box h4 {
  color: var(--christmas-red);
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.booking-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.booking-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
}

.booking-input {
  flex-grow: 1;
  padding: 10px 16px;
  border: 1px solid #d4a5a5;
  border-radius: 20px;
  font-size: 0.95rem;
  outline: none;
}

.booking-input:focus {
  border-color: var(--christmas-red);
}

.btn-book {
  background: var(--christmas-red);
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-book:hover {
  background: var(--christmas-dark-red);
}

/* Feedback banners */
.alert-box {
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-top: 12px;
  display: none;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* --- Auth & Simple Pages --- */
.auth-page-container {
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.auth-card {
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  max-width: 420px;
  width: 100%;
  text-align: center;
  border: 1px solid var(--border-color);
}

.auth-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.form-group {
  margin: 20px 0;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #decbb5;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
}

.form-control:focus {
  border-color: var(--christmas-red);
}

.btn-primary {
  width: 100%;
  padding: 12px;
  background: var(--christmas-red);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--christmas-dark-red);
}

/* Admin Styles */
.admin-container {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px 60px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #decbb5;
}

.admin-section {
  background: white;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.admin-table th, .admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #ebdccb;
  font-size: 0.9rem;
}

.admin-table th {
  background: #f7f3ed;
  font-weight: 700;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.btn-danger {
  background: #e74c3c;
  color: white;
}

.btn-info {
  background: #3498db;
  color: white;
}

/* --- First-Time Welcome / Help Instructions --- */
.welcome-help-btn {
  display: inline-block;
  margin-top: 4px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid #e0d4c3;
  background: rgba(255, 255, 255, 0.92);
  color: var(--christmas-dark-green);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.welcome-help-btn:hover {
  background: #ffffff;
  border-color: var(--christmas-green);
}

.welcome-modal-content {
  max-width: 560px;
}

.welcome-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--christmas-red);
  margin-bottom: 8px;
  padding-right: 28px;
}

.welcome-intro {
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 18px;
}

.welcome-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.welcome-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #faf6f0;
  border: 1px solid #eadfce;
  border-radius: 12px;
  padding: 14px;
}

.welcome-step-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--christmas-red);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-step-body > strong {
  display: block;
  font-size: 1.05rem;
  color: var(--christmas-dark-green);
  margin-bottom: 4px;
}

.welcome-step-body p {
  font-size: 0.96rem;
  line-height: 1.45;
  color: #3d352e;
  margin: 0;
}

.welcome-note {
  background: #eef5f0;
  border: 1px solid #cde0d2;
  color: #244a32;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.92rem;
  line-height: 1.4;
  margin-bottom: 18px;
}

.btn-welcome-start {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  background: var(--christmas-green);
  color: #ffffff;
  font-size: 1.08rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-welcome-start:hover {
  background: var(--christmas-dark-green);
}

/* --- Floating Bottom-Right Language Bubble --- */
.lang-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lang-fab-trigger {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #e5d8c6;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  font-size: 1.55rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.lang-fab-trigger:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.lang-fab-menu {
  display: none;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.98);
  border: 1.5px solid #e5d8c6;
  border-radius: 28px;
  padding: 8px 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.lang-fab.open .lang-fab-menu {
  display: flex;
}

.lang-fab-option {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.lang-fab-option:hover {
  background: #f5efe6;
  transform: scale(1.1);
}

.lang-fab-option.active {
  background: #fdedec;
  box-shadow: inset 0 0 0 2px var(--christmas-red);
}

@media (max-width: 600px) {
  .hero-title { font-size: 2rem; }
  .booking-form { flex-direction: column; }
  .modal-overlay { padding: 10px; }
  .modal-content { padding: 20px 16px; }
  .modal-title { font-size: 1.35rem; }
  .alt-card { flex-direction: column; }
  .alt-card-main { flex-direction: column; gap: 12px; }
  .alt-thumb { width: 100%; height: 150px; }
  .store-link-row { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px; }
  .store-info { justify-content: space-between; flex-wrap: wrap; gap: 6px; }
  .btn-visit { text-align: center; }
  .top-nav { padding: 10px 14px; }
}
