/* CANVA STYLE REPLACEMENT POINT
   Canva styling for the guest wishlist page (index.php).
*/

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Montserrat', sans-serif;
  background-color: #fbf7f2;
  color: #222;
  line-height: 1.6;
}

html, body, .page-wrapper { height: 100%; width: 100%; }
.page-wrapper { overflow: auto; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  background: linear-gradient(135deg, #5f7161 0%, #6b8068 100%);
  color: #fbf7f2;
  padding: 48px 0 40px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.header-text { flex: 1; min-width: 280px; }

h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 1rem;
  font-weight: 300;
  opacity: 0.95;
  max-width: 560px;
}

.search-box { flex: 0 0 300px; position: relative; }

.search-box input {
  width: 100%;
  padding: 12px 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 25px;
  background: rgba(255,255,255,0.15);
  color: #fbf7f2;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.search-box input::placeholder { color: rgba(251,247,242,0.7); }

.search-box input:focus {
  outline: none;
  background: rgba(255,255,255,0.25);
  border-color: #d4af37;
}

/* Category filters */
.filters {
  padding: 32px 0;
  border-bottom: 1px solid rgba(95,113,97,0.15);
}

.filter-pills {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-pill {
  padding: 10px 24px;
  border: 2px solid #5f7161;
  border-radius: 25px;
  background: transparent;
  color: #5f7161;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-pill:hover {
  background: rgba(95,113,97,0.1);
  transform: translateY(-2px);
}

.filter-pill.active {
  background: #5f7161;
  color: #fbf7f2;
  box-shadow: 0 4px 12px rgba(95,113,97,0.3);
}

/* Gift grid */
.gifts-section { padding: 48px 0 40px; }

.gifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.gift-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  position: relative;
}

.gift-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.gift-card.reserved::before {
  content: 'Reserved';
  position: absolute;
  top: 20px;
  right: -30px;
  background: #d4af37;
  color: white;
  padding: 6px 40px;
  font-size: 0.85rem;
  font-weight: 600;
  transform: rotate(45deg);
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.gift-card.reserved { opacity: 0.82; }

.gift-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: linear-gradient(135deg, #f0ece5 0%, #e8e3d9 100%);
  display: block;
}

.gift-content { padding: 24px; }

.gift-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}

.gift-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #222;
  line-height: 1.3;
}

.category-badge {
  background: #5f7161;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.gift-description {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 18px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gift-actions { display: flex; gap: 12px; }

.btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  display: inline-block;
  user-select: none;
}

.btn-secondary {
  background: transparent;
  border: 2px solid #5f7161;
  color: #5f7161;
}

.btn-secondary:hover { background: rgba(95,113,97,0.1); }

.btn-primary {
  background: linear-gradient(135deg, #d4af37 0%, #c9a332 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(212,175,55,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212,175,55,0.4);
}

.btn-primary:disabled,
.btn-primary[disabled] {
  background: #ccc !important;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.reserved-by {
  margin-top: 14px;
  font-size: 0.85rem;
  color: #7a3b3b;
  background: rgba(212,175,55,0.12);
  padding: 10px 12px;
  border-radius: 10px;
}

/* Footer */
.footer-note {
  padding: 16px 0 54px;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
}

.footer-note .admin-link {
  display: inline-block;
  margin-left: 10px;
}

.footer-note a {
  color: #5f7161;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(95,113,97,0.3);
}

.footer-note a:hover {
  border-bottom-color: rgba(95,113,97,0.8);
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
  color: #666;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(95,113,97,0.15);
  border-radius: 16px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;            /* app.js toggles inline display */
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  background: white;
  border-radius: 16px;
  padding: 40px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 12px 48px rgba(0,0,0,0.2);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(0,0,0,0.05);
  color: #222;
}

.modal h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: #222;
  margin-bottom: 24px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #d4af37;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #5f7161;
}

.checkbox-group label { margin: 0; cursor: pointer; font-weight: 400; }

.notice {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #666;
  min-height: 18px;
}

.notice.ok { color: #2f7a3a; }
.notice.error { color: #c93232; }

.modal-note {
  background: rgba(95,113,97,0.1);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #5f7161;
  margin-top: 10px;
  border-left: 3px solid #5f7161;
}

.btn-full { width: 100%; margin-top: 14px; }

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  .header-content { flex-direction: column; }
  .search-box { flex: 1; width: 100%; }
  .gifts-grid { grid-template-columns: 1fr; }
  .modal { padding: 32px 24px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .gifts-grid { grid-template-columns: repeat(2, 1fr); }
}
