/* ═══════════════════════════════════════════════════════════════════════════
   Gift Registry — Site.css
   Warm celebration aesthetic · No external dependencies
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a   { text-decoration: none; }

/* ── Design tokens ─────────────────────────────────────────────────────── */
:root {
  --bg:           #FDFAF7;
  --surface:      #FFFFFF;
  --primary:      #B5784C;
  --primary-dk:   #8B5E3C;
  --primary-lt:   #FAF0E6;
  --text:         #2C1A10;
  --text-2:       #6B5040;
  --text-3:       #9E8070;
  --border:       #EAD9C8;
  --sh1: 0 1px 4px rgba(44,26,16,.07);
  --sh2: 0 4px 20px rgba(44,26,16,.12);
  --sh3: 0 10px 40px rgba(44,26,16,.18);
  --r:   12px;
  --gap: 24px;
  --serif: Georgia,'Times New Roman',serif;
  --sans: 'Segoe UI',system-ui,-apple-system,Helvetica,Arial,sans-serif;

  /* Category badge colours */
  --ck: #4A7640; --bk: #EEF5EB;  /* kitchen  */
  --cd: #7640A0; --bd: #F3EDF8;  /* decor    */
  --co: #2060A0; --bo: #EAF1F8;  /* outdoor  */
  --cb: #206080; --bb: #E8F3F8;  /* bathroom */
  --cl: #A06020; --bl: #F8F0E8;  /* bedding  */
  --cx: #606060; --bx: #F0EFEE;  /* other    */
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

/* ── HEADER ────────────────────────────────────────────────────────────── */
.site-header {
  background: linear-gradient(160deg, #FFF9F4 0%, #F8E8D4 55%, #EEDCBF 100%);
  border-bottom: 3px solid var(--primary);
  text-align: center;
  padding: 52px 24px 44px;
  position: relative;
  overflow: hidden;
}
.site-header::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 15% 85%, rgba(181,120,76,.10) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(181,120,76,.07) 0%, transparent 55%);
  pointer-events: none;
}
.header-inner { position: relative; z-index: 1; }

.header-orn {
  font-size: 1.6rem;
  letter-spacing: 14px;
  color: var(--primary);
  margin-bottom: 14px;
  opacity: .8;
}
.site-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: normal;
  color: var(--primary-dk);
  letter-spacing: .02em;
  line-height: 1.15;
  margin-bottom: 10px;
}
.site-sub {
  font-size: 1.05rem;
  color: var(--text-2);
  letter-spacing: .05em;
  margin-bottom: 32px;
}

/* Header stats */
.header-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--serif);
  font-size: 2.2rem;
  color: var(--primary);
  line-height: 1;
}
.stat-lbl {
  font-size: .75rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: 5px;
}

/* ── CONTROLS BAR ──────────────────────────────────────────────────────── */
.controls-bar {
  background: var(--surface);
  box-shadow: var(--sh2);
  position: sticky;
  top: 0;
  z-index: 200;
  padding: 14px 32px;
}
.controls-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* Search */
.search-wrap { flex: 1 1 240px; position: relative; }
.search-wrap::before {
  content: '\2315';   /* ⌕ search symbol */
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.15rem;
  color: var(--text-3);
  pointer-events: none;
}
#searchInput {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font: .94rem var(--sans);
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
#searchInput:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(181,120,76,.15);
}
#searchInput::placeholder { color: var(--text-3); }

/* Filter selects */
.filter-wrap { display: flex; gap: 10px; flex-wrap: wrap; }

.filter-sel {
  padding: 10px 38px 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font: .9rem var(--sans);
  color: var(--text);
  background: var(--bg) no-repeat right 12px center;
  /* Inline SVG chevron — no file dependency */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23B5784C' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color .2s;
}
.filter-sel:focus { border-color: var(--primary); }

.results-lbl {
  font-size: .85rem;
  color: var(--text-3);
  white-space: nowrap;
  margin-left: auto;
}
#resultCount { font-weight: 600; color: var(--primary); }

/* ── CARD GRID ──────────────────────────────────────────────────────────── */
.card-grid {
  max-width: 1400px;
  margin: 32px auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: var(--gap);
}

.no-results {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-3);
  display: none;
}
.no-results-icon { font-size: 3rem; margin-bottom: 16px; }
.no-results h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--text-2);
  margin-bottom: 8px;
}

/* ── ITEM CARD ───────────────────────────────────────────────────────────── */
a.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: inherit;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease;
}
a.item-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sh3);
}
a.item-card.fulfilled { opacity: .65; }

/* Photo area */
.card-photo {
  height: 200px;
  background: linear-gradient(135deg, #F6ECE0 0%, #EDD9C0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.card-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
a.item-card:hover .card-photo img { transform: scale(1.04); }

.no-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
}
.no-photo-icon { font-size: 2.4rem; opacity: .45; }
.no-photo-txt {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Badges overlay on photo */
.card-badges {
  position: absolute;
  bottom: 8px; left: 8px;
  display: flex; gap: 5px; flex-wrap: wrap;
}

/* ── BADGES ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-kitchen  { background: var(--bk); color: var(--ck); }
.badge-decor    { background: var(--bd); color: var(--cd); }
.badge-outdoor  { background: var(--bo); color: var(--co); }
.badge-bathroom { background: var(--bb); color: var(--cb); }
.badge-bedding  { background: var(--bl); color: var(--cl); }
.badge-other    { background: var(--bx); color: var(--cx); }
.badge-high     { background: #FDEAE8; color: #C0321A; }
.badge-medium   { background: #FFF3E0; color: #B06000; }
.badge-low      { background: #F0F0F0; color: #707070; }

/* Card body */
.card-body {
  padding: 15px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.card-store {
  font-size: .75rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .07em;
}
.card-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: normal;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-price {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--primary);
  margin-top: auto;
  padding-top: 6px;
}
.card-price.tbc {
  font-family: var(--sans);
  font-size: .88rem;
  font-style: italic;
  color: var(--text-3);
}

/* Availability bar */
.card-avail {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
  font-size: .75rem;
  color: var(--text-3);
}
.avail-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-ok   { background: #5A9A4A; }
.dot-part { background: #E09020; }
.dot-done { background: #CC3333; }

.avail-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.avail-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--primary);
}
.avail-fill.done { background: #CC3333; }

/* ═══════════════════════════════════════════════════════════════════════════
   DETAIL PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.detail-topbar {
  background: linear-gradient(160deg, #FFF9F4 0%, #F8E8D4 100%);
  border-bottom: 3px solid var(--primary);
  padding: 20px 32px;
}
.detail-topbar-inner { max-width: 1200px; margin: 0 auto; }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: 7px;
  padding: 8px 18px;
  font-size: .9rem;
  font-weight: 500;
  transition: background .18s, color .18s;
}
.btn-back:hover { background: var(--primary); color: #fff; }

.detail-main {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 32px 60px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: start;
}

/* Photo panel */
.detail-photo-wrap {
  background: linear-gradient(135deg, #F6ECE0 0%, #EDD9C0 100%);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-photo-wrap img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.detail-no-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-3);
}
.detail-no-photo-icon { font-size: 4rem; opacity: .35; }
.detail-no-photo-txt  { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; }

/* Info panel */
.detail-info { display: flex; flex-direction: column; gap: 14px; }
.detail-badges { display: flex; gap: 8px; flex-wrap: wrap; }

.detail-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: normal;
  color: var(--text);
  line-height: 1.22;
}
.detail-store {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
}
.detail-price {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--primary);
}
.detail-price.tbc {
  font-family: var(--sans);
  font-size: 1rem;
  font-style: italic;
  color: var(--text-3);
}

/* Availability callout */
.detail-avail {
  background: var(--primary-lt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .92rem;
}
.detail-avail.fulfilled {
  background: #FDF0EE;
  border-left-color: #CC3333;
}
.detail-avail-icon { font-size: 1.4rem; }

/* Field grid */
.detail-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}
.dfield {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.dfield-label {
  display: block;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
  margin-bottom: 4px;
}
.dfield-value {
  font-size: .92rem;
  color: var(--text);
  font-weight: 500;
  word-break: break-word;
}
.dfield-value.empty {
  color: var(--text-3);
  font-style: italic;
  font-weight: normal;
}

/* Notes box */
.detail-notes {
  background: var(--bg);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 14px 16px;
  font-size: .88rem;
  color: var(--text-2);
  line-height: 1.65;
}
.detail-notes-label {
  display: block;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
  margin-bottom: 6px;
  font-weight: 600;
}

/* Barcode */
.detail-barcode {
  font-family: 'Courier New', monospace;
  font-size: .82rem;
  color: var(--text-3);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  display: inline-block;
}

/* ── FOOTER ─────────────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 28px 24px;
  margin-top: 48px;
  border-top: 1px solid var(--border);
  font-size: .8rem;
  color: var(--text-3);
  letter-spacing: .03em;
}

/* ── UTILITY ────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-photo-wrap { aspect-ratio: 16/9; }
}
@media (max-width: 700px) {
  .controls-bar { padding: 12px 16px; }
  .filter-wrap  { width: 100%; }
  .filter-sel   { flex: 1; min-width: 120px; }
  .card-grid    { padding: 0 16px; gap: 16px; }
  .detail-main  { padding: 0 16px 40px; }
  .detail-fields { grid-template-columns: 1fr; }
  .header-stats { gap: 28px; }
}
@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  .detail-topbar { padding: 16px; }
}

/* ── PRINT ──────────────────────────────────────────────────────────────── */
@media print {
  .controls-bar, .btn-back, .site-footer { display: none; }
  .card-grid { grid-template-columns: repeat(3,1fr); gap: 12px; }
  a.item-card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}
