/* ==========================================================================
   1. CSS Variables & Base Styles
   ========================================================================== */
:root {
  --bg-color: #faf6f0;
  --card-bg: #ffffff;
  --text-primary: #2d2a26;
  --text-muted: #666059;
  --border-color: #e3dad0;
  
  /* Brand Earth Tones */
  --accent-wood: #8c5a3c;
  --accent-wood-hover: #70452d;
  --accent-felt: #4a7c59;
  --accent-felt-hover: #375e43;
  --saw-metal: #a8b2b7;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Common Typography & Layout Elements */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  color: var(--accent-wood);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  font-weight: 600;
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

/* Button Component */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--accent-wood);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color 0.2s ease, transform 0.1s ease;
  border: none;
  cursor: pointer;
}

.button:hover {
  background-color: var(--accent-wood-hover);
}

.button.secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.button.secondary:hover {
  background-color: var(--border-color);
}

.button.felt-button {
  background-color: var(--accent-felt);
  width: 100%;
}

.button.felt-button:hover {
  background-color: var(--accent-felt-hover);
}

/* ==========================================================================
   2. Header & Navigation
   ========================================================================== */
.site-header {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1;
}

.brand-sub {
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: var(--accent-wood);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--accent-wood);
}

.menu-button {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

/* Mobile Nav Toggle */
@media (max-width: 768px) {
  .menu-button {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-color);
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }

  .site-nav.is-open {
    display: flex;
  }
}

/* ==========================================================================
   3. Hero Section & CSS Woodworking Illustration
   ========================================================================== */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-copy .lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

/* Hero Logo Area */
.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.hero-logo {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.05));
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 1.5rem;
  }
}

/* ==========================================================================
   4. Crafts & Product Grid
   ========================================================================== */
.section-heading {
  margin-bottom: 2.5rem;
  max-width: 650px;
}

.currency-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.5rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

/* Product Image Frame */
.product-image-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%; /* Consistent 1:1 square ratio for card alignment */
  background-color: #f2ece4; /* Warm, consistent background fill around non-square photos */
  overflow: hidden;
}

.product-image-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Displays full photo without cropping any edges */
  padding: 0.5rem; /* Optional subtle inner padding so tight crops don't touch card edges */
}

/* Sold Item & Image Overlay Styling */
.product-card.is-sold {
  opacity: 0.85;
}

/* Grayscales and slightly darkens sold photos */
.product-card.is-sold .product-image-wrap img {
  filter: grayscale(80%);
}

/* Semi-transparent overlay centered across the photo */
.sold-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* "SOLD" text badge centered over the image */
.sold-overlay span {
  background-color: rgba(45, 42, 38, 0.9);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 3px;
  padding: 0.5rem 1.75rem;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Disabled button state at bottom of card */
.button.sold-button {
  background-color: #e0d8cd;
  color: #777067;
  cursor: default;
  width: 100%;
  pointer-events: none;
}

.image-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

.product-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.product-price {
  font-weight: 700;
  color: var(--accent-wood);
  white-space: nowrap;
}

.product-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

/* ==========================================================================
   5. About & Contact Sections
   ========================================================================== */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  border-top: 1px solid var(--border-color);
}

.about-copy p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.contact-section {
  border-top: 1px solid var(--border-color);
}

.contact-card {
  background-color: #f1e9dd;
  padding: 2.5rem;
  border-radius: 12px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .about-section {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ==========================================================================
   6. Footer
   ========================================================================== */
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.site-footer strong {
  color: var(--text-primary);
  display: block;
}

/* Shipping Info Banner */
.shipping-info {
  margin-bottom: 3rem; /* Increased spacing before product grid */
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color); /* Subtle divider */
  font-size: 0.85rem; /* Smaller text */
  color: var(--text-muted);
}

.shipping-location {
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.shipping-details {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

.shipping-details li {
  position: relative;
}

.shipping-details li:not(:last-child)::after {
  content: "•";
  margin-left: 1.25rem;
  color: var(--border-color);
}

@media (max-width: 600px) {
  .shipping-details {
    flex-direction: column;
    gap: 0.2rem;
  }
  .shipping-details li:not(:last-child)::after {
    display: none;
  }
}