/* ====================================
   Shadows & Hue — Light Mint Studio
   Cleaned + Grid-locked
   ==================================== */

:root {
  /* Light palette */
  --bg-top: #f9fff7;
  --bg-mid: #f3ffe9;
  --bg-mid2: #eefce2;
  --bg-bottom: #e8fce9;

  --text-main: #1f1f1f;
  --text-muted: #4e4e4e;

  --mint-primary: #CDEB89;     /* highlight */
  --mint-soft: #E9FFD1;
  --mint-deep: #2F9B58;

  --doublemint-red: #C1282D;
  --border-light: #d7e8d4;

  --card-bg: #ffffff;

  /* Gallery sizing knobs */
  --thumb-radius: 12px;
  --tile-radius: 14px;
  --tile-pad: 12px;

  /* This controls “how big the grid feels” on desktop */
  --grid-min: 160px;   /* lower = more columns */
  --grid-max: 210px;   /* upper cap per tile */
}

/* Global layout */

html { font-size: 16px; }

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;

  background: linear-gradient(
    180deg,
    var(--bg-top) 0%,
    var(--bg-mid) 45%,
    var(--bg-mid2) 70%,
    var(--bg-bottom) 100%
  );
}

/* Typography defaults */

h1, h2, h3, p { margin: 0; }
p + p { margin-top: 0.75rem; }

a {
  color: var(--mint-deep);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* Header */

header {
  padding: 32px 32px 24px;
  text-align: center;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-light);
}

header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.0rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint-deep);
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Cards */

.card {
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border-light);
  padding: 1.5rem 1.75rem;
  margin: 1.25rem auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.intro-card p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* Section headings */

.gallery-section {
  margin: 0 0 1rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--mint-deep);
}

/* ====================================
   Gallery Grid (the main fix)
   ==================================== */

.gallery {
  display: grid;

  /* True “tile grid” feel: tiles don’t expand infinitely */
  grid-template-columns: repeat(auto-fill, minmax(var(--grid-min), var(--grid-max)));
  gap: 1rem;

  /* This prevents stretched “feed” look */
  justify-content: start;     /* left-align the grid */
  align-items: start;
}

.tile {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--tile-radius);
  padding: var(--tile-pad);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition:
    transform 0.2s ease-out,
    border-color 0.2s ease-out,
    box-shadow 0.2s ease-out;
}

.tile:hover {
  transform: translateY(-4px);
  border-color: var(--mint-primary);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.15),
    0 0 0 2px rgba(193, 40, 45, 0.15);
}

/* Thumbnail frame: consistent shape */
.thumb-frame {
  width: 100%;
  aspect-ratio: 3 / 4;              /* nice “gallery print” ratio */
  border-radius: var(--thumb-radius);
  overflow: hidden;
  background: #f3f7f0;
  border: 1px solid var(--border-light);
}

.thumb-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;                 /* fills frame, crops edges if needed */
}

.tile-title {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-main);
}

/* ====================================
   Piece page
   ==================================== */

.piece-card {
  max-width: 900px;
  margin: 2.5rem auto;
  padding-bottom: 2rem;
}

.piece-title {
  text-align: center;
  margin-bottom: 1.2rem;
  font-size: 2rem;
  color: var(--mint-deep);
  font-family: 'Playfair Display', serif;
}

.piece-image-wrapper {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
  margin-bottom: 1.5rem;
}

.piece-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.piece-description {
  line-height: 1.6;
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.price {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--mint-deep);
  text-align: center;
}

/* Buy button */
.buy-button,
.buy-btn {
  display: inline-block;
  margin: 24px auto 0;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--mint-primary);
  border: none;
  color: #0c3014;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    background 0.2s ease-out,
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out;
}

.buy-button:hover,
.buy-btn:hover {
  background: var(--doublemint-red);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(193,40,45,0.25);
}

button.buy-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ====================================
   Navbar
   ==================================== */

.navbar {
  background: #ffffffe6;
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(6px);
}

.navbar-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.4rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mint-deep);
  text-decoration: none;
}

.navbar-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.navbar-links a {
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-main);
  text-decoration: none;
}

.navbar-links a:hover { color: var(--mint-deep); }

/* Mobile toggle */

.navbar-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-light);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
}

@media (max-width: 700px) {
  header h1 {
    font-size: 2.3rem;
    letter-spacing: 0.1em;
  }

  .navbar-links {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    padding-top: 0.5rem;
  }

  .navbar-links.show { display: flex; }
  .navbar-toggle { display: inline-block; }

  /* On small screens, slightly bigger tiles are okay */
  :root { --grid-min: 160px; --grid-max: 1fr; }
}

/* Footer */

.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 1.25rem 2.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}
