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

:root {
  --bg:      #f8f6f2;
  --text:    #1a1a1a;
  --muted:   #6b6b6b;
  --accent:  #2c2c2c;
  --border:  #e0ddd8;
  --white:   #ffffff;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Georgia', serif;
  line-height: 1.6;
}

/* ── HEADER ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--text);
  font-style: italic;
}

nav a {
  margin-left: 2rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}
nav a:hover, nav a.active { color: var(--text); }

/* ── SOCIAL ICONS ── */
.social-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.social-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.social-links a:hover { color: var(--text); }

/* ── GALLERY GRID ── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.card {
  cursor: pointer;
  background: var(--white);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.card-img-wrap {
  background: #f0ede8;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.card img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  display: block;
}

.card-info {
  padding: 1rem 1rem 0.75rem;
  border-top: 1px solid var(--border);
}

.card-title {
  font-size: 1rem;
  font-style: italic;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.card-buy {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-bottom: 0.25rem;
}

/* ── POPUP ── */
.popup {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 1rem;
  min-width: 220px;
  z-index: 300;
}
.popup.open { display: block; }

.popup-title {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.buy-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-buy {
  display: block;
  text-align: center;
  padding: 0.6rem 1rem;
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn-buy:hover, .btn-buy.primary {
  background: var(--accent);
  color: var(--white);
}

/* ── ABOUT PAGE ── */
.about-wrap {
  max-width: 760px;
  margin: 5rem auto;
  padding: 0 2rem;
}
.about-wrap h1 {
  font-size: 2rem;
  font-weight: normal;
  margin-bottom: 2rem;
}
.about-wrap p {
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  header { padding: 1rem 1.25rem; }
  .gallery { padding: 1.25rem; gap: 1rem; }
  .modal { grid-template-columns: 1fr; }
  .modal-img { max-height: 50vh; }
}
