@import url("https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700;900&family=Source+Sans+3:wght@300;400;600;700&display=swap");

:root {
  --primary-green: #154734;
  --dark-green: #0d2e22;
  --mid-green: #1e6349;
  --gold: #C69214;
  --gold-light: #e0a81a;
  --off-white: #f5f3ef;
  --light-gray: #e8e5df;
  --body-text: #1c1a18;
}

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

body {
  font-family: "Source Sans 3", sans-serif;
  color: var(--body-text);
  background: var(--off-white);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Merriweather", serif;
  color: var(--primary-green);
}

a { color: var(--mid-green); text-decoration: none; }
a:hover { color: var(--gold); }

/* Utility Bar */
.utility-bar {
  background: var(--dark-green);
  padding: 4px 0;
  font-size: 0.8rem;
}
.utility-bar .container {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
}
.utility-bar a {
  color: rgba(255,255,255,0.8);
  font-size: 0.8rem;
}
.utility-bar a:hover { color: var(--gold-light); }

/* Header */
.site-header {
  background: var(--primary-green);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-family: "Merriweather", serif;
  font-size: 1.4rem;
  font-weight: 700;
}
.logo-badge {
  width: 44px;
  height: 44px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Merriweather", serif;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--primary-green);
}
.main-nav { display: flex; gap: 24px; align-items: center; }
.main-nav a {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.main-nav a:hover { color: var(--gold-light); }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(circle, rgba(198,146,20,0.15) 1px, transparent 1px);
  background-size: 20px 20px;
  transform: rotate(15deg) scale(1.5);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  color: white;
  font-size: 2.8rem;
  margin-bottom: 16px;
  max-width: 700px;
}
.hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.2rem;
  margin-bottom: 32px;
  max-width: 600px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary-green);
  color: white;
}
.btn-primary:hover { background: var(--mid-green); color: white; }
.btn-gold {
  background: var(--gold);
  color: var(--primary-green);
}
.btn-gold:hover { background: var(--gold-light); color: var(--primary-green); }
.btn-sm { padding: 8px 20px; font-size: 0.9rem; }

/* Section */
.section { padding: 60px 0; }
.section-title {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2rem;
  position: relative;
  padding-bottom: 16px;
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 60px; height: 3px;
  background: var(--gold);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.product-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.product-card-img {
  width: 100%;
  height: 200px;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--primary-green);
}
.product-card-body { padding: 16px; }
.product-card-body h3 { font-size: 1.1rem; margin-bottom: 8px; }
.product-card-body .category {
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.product-card-body .price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: 12px;
}

/* Category Tiles */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.category-tile {
  background: var(--primary-green);
  color: white;
  padding: 32px 20px;
  border-radius: 8px;
  text-align: center;
  font-family: "Merriweather", serif;
  font-size: 1.1rem;
  transition: background 0.2s;
}
.category-tile:hover { background: var(--mid-green); color: white; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--primary-green);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--light-gray);
  border-radius: 4px;
  font-size: 1rem;
  font-family: "Source Sans 3", sans-serif;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--mid-green);
}

.form-card {
  max-width: 480px;
  margin: 40px auto;
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.form-card h2 { text-align: center; margin-bottom: 24px; }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-weight: 500;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* Table */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
th {
  background: var(--primary-green);
  color: white;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}
td { padding: 12px 16px; border-bottom: 1px solid var(--light-gray); }
tr:hover { background: rgba(21,71,52,0.03); }

/* Reviews */
.review-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.review-card .meta { font-size: 0.85rem; color: #888; margin-bottom: 8px; }
.review-card .stars { color: var(--gold); }

/* Cart */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: white;
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.cart-total {
  text-align: right;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-top: 20px;
}

/* Newsletter */
.newsletter {
  background: var(--primary-green);
  padding: 60px 0;
  text-align: center;
}
.newsletter h2 { color: white; margin-bottom: 8px; }
.newsletter p { color: rgba(255,255,255,0.8); margin-bottom: 24px; }
.newsletter-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  gap: 8px;
}
.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
}

/* Footer */
.site-footer {
  background: var(--dark-green);
  color: rgba(255,255,255,0.7);
  padding: 40px 0 20px;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 30px;
}
.footer-section h4 {
  color: var(--gold);
  margin-bottom: 12px;
  font-size: 1rem;
}
.footer-section a {
  display: block;
  color: rgba(255,255,255,0.7);
  margin-bottom: 6px;
  font-size: 0.9rem;
}
.footer-section a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
}

/* Admin Dashboard */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.stat-card {
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-align: center;
}
.stat-card .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-green);
}
.stat-card .label {
  font-size: 0.9rem;
  color: #888;
  margin-top: 4px;
}

/* Search */
.search-bar {
  display: flex;
  gap: 8px;
  max-width: 500px;
  margin: 0 auto 40px;
}
.search-bar input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--light-gray);
  border-radius: 4px;
  font-size: 1rem;
}

/* Product Detail */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 40px 0;
}
.product-detail-img {
  background: var(--light-gray);
  border-radius: 8px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--primary-green);
}
.product-detail-info h1 { font-size: 1.8rem; margin-bottom: 12px; }
.product-detail-info .price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: 20px;
}

/* Divider */
.green-divider {
  height: 4px;
  background: linear-gradient(90deg, var(--primary-green), var(--gold), var(--primary-green));
  margin: 0;
}

/* Flag banner (admin) */
.flag-banner {
  background: var(--gold);
  color: var(--primary-green);
  padding: 16px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 1rem;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .newsletter-form { flex-direction: column; }
  .footer-content { flex-direction: column; }
}
