@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Lato:wght@300;400;700&display=swap');

:root {
  --navy: #0F1C3F;
  --linen-base: #F5F2EB;
  --header-bg: #FFFFFF;
  --paper: rgba(255, 255, 255, 0.72);
  --border-soft: rgba(15, 28, 63, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  background-color: var(--linen-base);
  background-image:
    linear-gradient(90deg, rgba(15, 28, 63, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(15, 28, 63, 0.025) 1px, transparent 1px);
  background-size: 4px 4px;
  color: var(--navy);
  font-family: 'Lato', sans-serif;
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, .brand-text { font-family: 'Playfair Display', serif; font-weight: 400; color: var(--navy); }
a { color: var(--navy); text-decoration: none; }

.site-header {
  padding: 0.9rem 2rem;
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border-soft);
}
.site-header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  max-width: 1300px;
  margin: 0 auto;
}
.site-logo { height: 58px; width: auto; object-fit: contain; }
.brand-text { text-align: center; font-size: 1.5rem; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; }
.site-nav { display: flex; justify-content: flex-end; align-items: center; gap: 1.4rem; }
.site-nav a { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; transition: opacity 0.25s; }
.site-nav a:hover { opacity: 0.65; }

.hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 5rem 1rem 3rem; max-width: 840px; margin: 0 auto;
}
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); margin-bottom: 1rem; font-style: italic; line-height: 1.1; }
.hero p { font-size: 1.1rem; font-weight: 300; margin-bottom: 2rem; max-width: 44rem; color: #444; }

.category-filters {
  display: flex; gap: 0.75rem; justify-content: center; margin-bottom: 3rem; flex-wrap: wrap; padding: 0 1rem;
}
.filter-btn {
  background: #fff; border: 1px solid rgba(15,28,63,0.2); padding: 0.5rem 1.4rem;
  border-radius: 30px; cursor: pointer; color: var(--navy); font-size: 0.88rem; transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active { background: var(--navy); color: white; border-color: var(--navy); }

.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2.5rem 1.5rem; max-width: 1200px; margin: 0 auto; padding: 0 2rem 5rem;
}
.product-card {
  display: flex; flex-direction: column; background: #fff; border-radius: 10px;
  border: 1px solid rgba(15,28,63,0.08); overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease; cursor: pointer;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(15,28,63,0.08); }
.product-image-wrapper { position: relative; width: 100%; height: 300px; background: #f4f6f8; overflow: hidden; }
.product-image-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-image-wrapper img { transform: scale(1.04); }
.stock-badge {
  position: absolute; top: 12px; left: 12px; background: rgba(255, 255, 255, 0.95);
  color: var(--navy); padding: 4px 10px; border-radius: 20px; font-size: 0.7rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.product-info { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.3rem; flex-grow: 1; }
.product-title { font-size: 1.05rem; color: var(--navy); font-weight: 600; line-height: 1.35; }
.product-meta { font-size: 0.82rem; color: #666; }
.product-price { font-size: 1.05rem; color: #c04c36; font-weight: 700; margin-top: auto; padding-top: 0.5rem; }

/* Modal Styles */
#product-modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.75); z-index: 10000;
  display: none; align-items: center; justify-content: center; padding: 1.5rem; backdrop-filter: blur(4px);
}
#product-modal {
  background: #fff; border-radius: 12px; max-width: 960px; width: 100%; max-height: 90vh;
  display: flex; flex-direction: row; position: relative; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.pm-close {
  position: absolute; top: 15px; right: 15px; background: #fff; border: none; font-size: 1.5rem;
  cursor: pointer; border-radius: 50%; width: 38px; height: 38px; display: flex;
  align-items: center; justifyContent: center; box-shadow: 0 2px 8px rgba(0,0,0,0.15); z-index: 10;
}
#pm-image-container { flex: 1; background: #f4f6f8; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; }
#pm-main-image { width: 100%; max-height: 420px; object-fit: contain; border-radius: 6px; }
.pm-thumbnails { display: flex; gap: 8px; margin-top: 1rem; overflow-x: auto; max-width: 100%; padding-bottom: 4px; }
.pm-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 2px solid transparent; opacity: 0.7; transition: all 0.2s; }
.pm-thumb.active, .pm-thumb:hover { border-color: var(--navy); opacity: 1; }
#pm-details { flex: 1; padding: 3rem 2rem 2rem; overflow-y: auto; display: flex; flex-direction: column; }

.btn-etsy {
  display: block; width: 100%; background: var(--navy); color: #fff; border: none;
  padding: 1rem; font-size: 1.05rem; font-weight: 600; border-radius: 6px; text-align: center;
  text-decoration: none; transition: background 0.2s; margin-top: 1.5rem;
}
.btn-etsy:hover { background: #1a2c5b; }

.trust-footer { background: #0a132b; color: white; padding: 4rem 2rem 2rem; margin-top: 6rem; }
.trust-footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 3rem; }
.footer-col h4 { font-family: 'Playfair Display', serif; font-size: 1.25rem; margin-bottom: 1.2rem; color: #fff; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 0.75rem; font-size: 0.92rem; }
.footer-col ul li a { color: rgba(255, 255, 255, 0.7); transition: color 0.2s; }
.footer-col ul li a:hover { color: #fff; }

@media(max-width:768px) {
  #product-modal { flex-direction: column; max-height: 100vh; border-radius: 0; height: 100%; }
  #product-modal-overlay { padding: 0; }
  #pm-image-container { min-height: 280px; padding: 1rem; }
  #pm-details { padding: 1.5rem; }
}