:root {
  --deep-green: #0f2d1e;
  --accent-green: #1e5c3a;
  --leaf: #3fa06f;
  --sunset: #f5a623;
  --peach: #ffb679;
  --off-white: #f9f7f4;
  --card: #ffffff;
  --charcoal: #1d1d1f;
  --gray: #6f6f73;
  --border: rgba(15, 45, 30, 0.12);
  --card-shadow: 0 24px 45px rgba(15, 45, 30, 0.08);
}

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

body {
  margin: 0;
  font-family: 'Open Sans', Arial, sans-serif;
  color: var(--charcoal);
  background: var(--off-white);
}

h1,
h2,
h3,
h4 {
  font-family: 'Playfair Display', serif;
  color: var(--deep-green);
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
  color: var(--gray);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--gray);
}

.center {
  text-align: center;
}

.small {
  font-size: 0.85rem;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--leaf);
  margin-bottom: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.btn.primary {
  background: linear-gradient(135deg, var(--sunset), #f0601d);
  color: #fff;
  box-shadow: 0 16px 30px rgba(240, 96, 29, 0.25);
}

.btn.ghost {
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  background: transparent;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(15, 45, 30, 0.96);
  color: #fff;
  z-index: 20;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1.5rem;
}

.logo {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  color: #fff;
}

.logo-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.logo-tagline {
  font-size: 0.75rem;
  opacity: 0.8;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-weight: 600;
}

.nav a {
  color: #fff;
  position: relative;
  padding-bottom: 0.25rem;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--sunset);
  transition: width 0.2s ease;
}

.nav a:hover::after {
  width: 100%;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sunset);
  color: #fff;
  font-size: 0.85rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.3rem;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 28px;
  height: 3px;
  background: #fff;
  border-radius: 999px;
}

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(120deg, #143c2a 55%, #1b5537);
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: #fff;
  margin-bottom: 1rem;
}

.hero .lead {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Sections */
section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

/* Categories */
.categories {
  background: #fff;
  padding: 3rem 0;
}

.category-filter {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.search-input {
  padding: 0.85rem 1.5rem;
  border: 2px solid var(--border);
  border-radius: 999px;
  font-size: 1rem;
  min-width: 300px;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--leaf);
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.chip {
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  border-color: var(--leaf);
  background: rgba(63, 160, 111, 0.05);
}

.chip.active {
  background: var(--deep-green);
  color: #fff;
  border-color: var(--deep-green);
}

/* Products Section */
.products-section {
  background: linear-gradient(180deg, #fff, #fef4e8);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  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 32px 60px rgba(15, 45, 30, 0.12);
}

.product-card img {
  height: 200px;
  width: 100%;
  object-fit: cover;
}

.product-card .product-image-placeholder {
  height: 200px;
  width: 100%;
  background: linear-gradient(135deg, var(--leaf), var(--accent-green));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 3rem;
}

.product-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}

.product-body h3 {
  font-size: 1.1rem;
  margin: 0;
}

.product-body p {
  font-size: 0.9rem;
  margin: 0;
  flex-grow: 1;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
}

.price {
  font-weight: 700;
  color: var(--deep-green);
  font-size: 1.2rem;
}

.btn.pill {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  background: #0b1f13;
  color: rgba(255, 255, 255, 0.85);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

/* Skeleton */
.skeleton {
  min-height: 320px;
  border-radius: 24px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.modal-content {
  position: relative;
  background: #fff;
  border-radius: 24px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  z-index: 101;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
}

.modal-body {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.modal-left {
  flex: 0 0 280px;
}

.modal-left img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 20px;
}

.modal-right {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.modal-info .product-price {
  font-size: 1.3rem;
  margin: 0.5rem 0;
}

.modal-uoms h4,
.modal-specs h4 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.modal-specs ul {
  list-style: disc;
  margin: 0;
  padding-left: 1.25rem;
  color: var(--gray);
}

.modal-specs li {
  margin-bottom: 0.5rem;
}

.uom-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.uom-option {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.uom-option:hover {
  border-color: var(--leaf);
}

.uom-option input {
  width: 18px;
  height: 18px;
}

.uom-option-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.uom-option-label {
  font-weight: 600;
}

.uom-option-price {
  font-size: 0.85rem;
  color: var(--deep-green);
}

.uom-selected {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.uom-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(63, 160, 111, 0.05);
  border-radius: 12px;
  flex-wrap: wrap;
}

.uom-row-info {
  flex: 1;
  min-width: 100px;
}

.uom-row-info strong {
  display: block;
}

.uom-row-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.2s;
}

.qty-btn:hover {
  border-color: var(--leaf);
  background: rgba(63, 160, 111, 0.1);
}

.uom-row-total {
  font-weight: 700;
  color: var(--deep-green);
  font-size: 1.1rem;
  min-width: 80px;
  text-align: right;
}

/* Responsive */
@media (max-width: 920px) {
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    background: rgba(15, 45, 30, 0.98);
    flex-direction: column;
    padding: 6rem 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    min-width: 250px;
  }

  .nav.open {
    transform: translateX(0);
  }

  .nav-toggle {
    display: flex;
  }

  .search-input {
    min-width: 200px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 3rem 0;
  }

  .hero-actions {
    flex-direction: column;
  }

  .category-filter {
    flex-direction: column;
    align-items: center;
  }

  .search-input {
    width: 100%;
    min-width: auto;
  }

  .modal-body {
    flex-direction: column;
  }

  .modal-left {
    flex: 1 1 100%;
  }

  .modal-left img {
    height: 200px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}