@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@400;500;600&display=swap');

:root{
  --bg: #f3ede1;
  --bg-grain: #ece4d4;
  --panel: #fffcf6;
  --panel-raised: #ffffff;
  --line: #e2d5bd;
  --line-soft: #ece2cc;

  --ink: #2b241c;
  --ink-dim: #7a6d5b;
  --ink-faint: #a89a83;

  --copper: #b5651d;
  --copper-deep: #8a4a12;
  --copper-soft: #f0dcc0;

  --success: #4f7942;
  --success-soft: #e1ecd9;
  --warn: #9c7a1f;
  --warn-soft: #f7ecce;

  --display: 'Fraunces', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --body: 'Inter', system-ui, -apple-system, sans-serif;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(43,36,28,0.06), 0 8px 20px -12px rgba(43,36,28,0.2);
  --shadow-lift: 0 6px 16px rgba(43,36,28,0.1), 0 24px 48px -20px rgba(43,36,28,0.28);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  font-family: var(--body);
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 0%, var(--bg-grain) 0%, transparent 55%),
    var(--bg);
  min-height: 100vh;
}

/* ===================== HEADER ===================== */
header.site-header{
  background: linear-gradient(180deg, #241f18, #1c1812);
  color: #eee2cc;
  padding: 1.4rem 1.6rem;
  border-bottom: 3px solid var(--copper);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
header.site-header .inner{
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
}
.site-title{
  font-family: var(--display); font-weight: 700; font-size: 1.5rem;
  color: #fff3de; text-decoration: none; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 0.5rem;
}
.site-title .mark{ color: var(--copper); }
.site-tagline{ font-family: var(--mono); font-size: 0.75rem; color: #a89a83; margin-top: 0.1rem; letter-spacing: 0.03em; }
nav.category-nav{ display: flex; gap: 1.2rem; flex-wrap: wrap; }
nav.category-nav a{
  color: #cabfa8; text-decoration: none; font-size: 0.88rem; font-family: var(--mono);
  padding: 0.3rem 0; border-bottom: 2px solid transparent; transition: color .15s ease, border-color .15s ease;
}
nav.category-nav a:hover, nav.category-nav a.active{ color: var(--copper); border-bottom-color: var(--copper); }

/* ===================== HERO ===================== */
.hero{
  max-width: 1200px; margin: 0 auto; padding: 3.2rem 1.6rem 1.6rem;
  text-align: center;
}
.hero h1{
  font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0 0 0.6rem; letter-spacing: -0.02em; color: var(--ink);
}
.hero p{ font-size: 1.05rem; color: var(--ink-dim); max-width: 560px; margin: 0 auto; }

/* ===================== SEARCH / FILTER ===================== */
.filter-bar{
  max-width: 1200px; margin: 1.6rem auto 0.6rem; padding: 0 1.6rem;
  display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center;
}
.filter-bar input[type="text"]{
  flex: 1; min-width: 220px; padding: 0.7rem 1rem; border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.95rem; background: var(--panel-raised); font-family: var(--body);
}
.filter-bar input[type="text"]:focus{ outline: none; border-color: var(--copper); box-shadow: 0 0 0 3px var(--copper-soft); }
.filter-bar select{
  padding: 0.7rem 1rem; border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.9rem; background: var(--panel-raised); font-family: var(--body); color: var(--ink);
}

/* ===================== PRODUCT GRID ===================== */
.container{ max-width: 1200px; margin: 0 auto; padding: 1.6rem; }
.grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.4rem; margin-top: 1rem; }

.product-card{
  background: var(--panel-raised); border: 1px solid var(--line-soft); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block;
  transition: transform .18s ease, box-shadow .18s ease;
}
.product-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.product-card .thumb{ width: 100%; aspect-ratio: 4/3; background: var(--bg-grain); overflow: hidden; }
.product-card .thumb img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card .thumb.no-image{ display: flex; align-items: center; justify-content: center; color: var(--ink-faint); font-family: var(--mono); font-size: 0.85rem; }
.product-card .info{ padding: 1.1rem 1.2rem 1.3rem; }
.product-card .cat{ font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--copper); margin-bottom: 0.3rem; }
.product-card h3{ font-family: var(--display); font-weight: 600; font-size: 1.15rem; margin: 0 0 0.35rem; color: var(--ink); }
.product-card .meta{ font-family: var(--mono); font-size: 0.78rem; color: var(--ink-dim); margin-bottom: 0.6rem; }
.product-card .price{ font-family: var(--mono); font-weight: 600; font-size: 1.15rem; color: var(--copper-deep); }
.product-card .badge{
  display: inline-block; font-family: var(--mono); font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.03em; padding: 0.18rem 0.55rem; border-radius: 999px;
  background: var(--success-soft); color: var(--success); margin-left: 0.5rem;
}

.empty-state{ text-align: center; padding: 4rem 1rem; color: var(--ink-faint); }

/* ===================== PAGINATION ===================== */
.pagination{ display: flex; gap: 0.4rem; margin: 2.5rem 0; justify-content: center; }
.pagination a, .pagination span{
  padding: 0.5rem 0.9rem; border-radius: 8px; border: 1px solid var(--line); text-decoration: none;
  color: var(--ink); font-size: 0.9rem; font-family: var(--mono); background: var(--panel-raised);
}
.pagination a:hover{ border-color: var(--copper); color: var(--copper-deep); }
.pagination .current{ background: var(--ink); color: #fdf6e8; border-color: var(--ink); }

/* ===================== PRODUCT DETAIL ===================== */
.breadcrumb{ font-family: var(--mono); font-size: 0.8rem; color: var(--ink-dim); margin-bottom: 1.2rem; }
.breadcrumb a{ color: var(--ink-dim); text-decoration: none; }
.breadcrumb a:hover{ color: var(--copper); }

.product-detail{ display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 800px){ .product-detail{ grid-template-columns: 1fr; } }

.gallery-main{
  width: 100%; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-grain); border: 1px solid var(--line-soft); box-shadow: var(--shadow); cursor: zoom-in;
}
.gallery-main img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumbs{ display: flex; gap: 0.6rem; margin-top: 0.8rem; flex-wrap: wrap; }
.gallery-thumbs img{
  width: 72px; height: 72px; object-fit: cover; border-radius: 8px; cursor: pointer;
  border: 2px solid transparent; transition: border-color .15s ease;
}
.gallery-thumbs img.active, .gallery-thumbs img:hover{ border-color: var(--copper); }

.product-info .cat{ font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--copper); margin-bottom: 0.5rem; }
.product-info h1{ font-family: var(--display); font-weight: 700; font-size: 2rem; margin: 0 0 0.4rem; letter-spacing: -0.01em; }
.product-info .subtitle{ font-family: var(--mono); font-size: 0.9rem; color: var(--ink-dim); margin-bottom: 1rem; }
.product-info .price-row{ display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.4rem; }
.product-info .price{ font-family: var(--mono); font-weight: 700; font-size: 1.8rem; color: var(--copper-deep); }
.product-info .condition-badge{
  font-family: var(--mono); font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.03em; padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--success-soft); color: var(--success);
}
.product-info .description{ font-size: 1rem; line-height: 1.65; color: var(--ink); margin-bottom: 1.6rem; }
.product-info .description p{ margin: 0 0 0.9rem; }

.specs-box{
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 1.3rem 1.4rem; margin-bottom: 1.4rem;
}
.specs-box h2{ font-family: var(--display); font-weight: 600; font-size: 1.15rem; margin: 0 0 0.8rem; }
.specs-box .spec-row{
  display: flex; justify-content: space-between; padding: 0.5rem 0; font-size: 0.9rem;
  border-bottom: 1px dashed var(--line-soft);
}
.specs-box .spec-row:last-child{ border-bottom: none; }
.specs-box .spec-row .label{ color: var(--ink-dim); font-family: var(--mono); }
.specs-box .spec-row .value{ font-weight: 600; text-align: right; }
.specs-box .spec-list{ font-size: 0.92rem; line-height: 1.7; }
.specs-box .spec-list li{ margin-bottom: 0.2rem; }

.contact-cta{
  background: var(--copper); color: #fff8ec; border-radius: var(--radius);
  padding: 1.3rem 1.4rem; text-align: center;
}
.contact-cta a{
  display: inline-block; margin-top: 0.7rem; background: #fff8ec; color: var(--copper-deep);
  padding: 0.7rem 1.4rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 0.92rem;
}

/* ===================== LIGHTBOX ===================== */
#lightboxOverlay{
  display: none; position: fixed; inset: 0; background: rgba(20,15,10,0.9);
  z-index: 1000; align-items: center; justify-content: center; cursor: zoom-out; padding: 2rem;
}
#lightboxOverlay img{ max-width: 92vw; max-height: 92vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }

/* ===================== FOOTER ===================== */
footer.site-footer{
  margin-top: 3rem; padding: 2rem 1.6rem; text-align: center;
  color: var(--ink-faint); font-family: var(--mono); font-size: 0.8rem;
  border-top: 1px solid var(--line-soft);
}
