/* --- Navbar hide/reveal on scroll --- */
.topbar {
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.topbar.hide-on-scroll {
  transform: translateY(-100%);
}

/* --- Sticky footer --- */
html, body {
  height: 100%;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1 0 auto;
}
.footer {
  flex-shrink: 0;
}

/* --- Visually hidden (sr-only) utility --- */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
:root {
  --green-900: #143d24;
  --green-800: #1d5b33;
  --green-700: #2a7a44;
  --green-600: #3f9858;
  --green-100: #eef8f0;
  --green-050: #f7fcf8;
  --text-900: #1f2937;
  --text-700: #4b5563;
  --text-500: #6b7280;
  --border: #dbe4dc;
  --white: #ffffff;
  --danger: #b42318;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --radius: 18px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text-900);
  background: #f4f7f5;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: 3rem 0;
}

.bg-soft {
  background: var(--green-050);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 61, 36, 0.94);
  backdrop-filter: blur(12px);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
}

.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  background: white;
  border-radius: 999px;
  padding: 4px;
}

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

.nav-links a {
  opacity: 0.92;
  font-weight: 600;
}

.nav-links a.active,
.nav-links a:hover {
  opacity: 1;
  color: #d9ffe2;
}

.cart-badge-link {
  color: white;
}

.cart-badge {
  background: rgba(255, 255, 255, 0.12);
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  font-size: 0.95rem;
}

.hero-video {
  position: relative;
  min-height: calc(100vh - 78px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-video-element {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.34)),
    linear-gradient(to top, rgba(20, 61, 36, 0.55), rgba(20, 61, 36, 0.15));
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
  padding: 4rem 0;
}

.eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.hero-content h1 {
  max-width: 900px;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.05;
  margin: 0 0 1rem;
}

.hero-content p {
  max-width: 760px;
  font-size: 1.08rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  transition: 0.2s ease;
  font-weight: 700;
}

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

.btn-primary {
  background: var(--green-700);
  color: white;
}

.btn-primary:hover {
  background: var(--green-800);
}

.btn-secondary {
  background: white;
  color: var(--green-900);
  border: 1px solid var(--border);
}

.btn-small {
  min-height: 38px;
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
}

.full {
  width: 100%;
}

.card {
  background: white;
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.feature-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.section-title {
  margin: 0 0 1rem;
}

.page-header {
  margin-bottom: 1.25rem;
}

.filters {
  margin-bottom: 1.5rem;
}

.filters-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 1rem;
}

.input {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.85rem 1rem;
  background: white;
  color: var(--text-900);
}

.textarea {
  min-height: 160px;
  resize: vertical;
  padding-top: 1rem;
}

.results-info {
  margin-bottom: 1rem;
  color: var(--text-700);
  font-weight: 600;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.product-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.product-modal-image-frame {
  position: relative;
}

.product-modal-image-counter {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  background: rgba(20, 30, 24, 0.72);
  color: white;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.product-card.clickable {
  cursor: pointer;
}

.product-card.clickable:hover {
  transform: translateY(-2px);
}

.product-image-wrap {
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, #f8fbf9 0%, #eff6f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.product-image-wrap.is-fading {
  opacity: 0.2;
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.product-title {
  font-size: 1.05rem;
  margin: 0;
}

.product-description {
  color: var(--text-700);
  line-height: 1.55;
  font-size: 0.95rem;
  flex: 1;
}

.product-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  background: var(--green-100);
  color: var(--green-900);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  font-size: 0.84rem;
  font-weight: 700;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

body.modal-open {
  overflow: hidden;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
}

.product-modal.open {
  display: block;
}

.product-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 24, 0.62);
}

.product-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 2rem));
  margin: 4vh auto;
  background: white;
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.product-modal-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.product-modal-image-frame {
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, #f8fbf9 0%, #eff6f1 100%);
  border-radius: 14px;
  padding: 1rem;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.product-modal-image-frame.is-fading {
  opacity: 0.2;
}

.product-modal-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-modal-details {
  display: grid;
  gap: 0.9rem;
}

.product-modal-title {
  margin: 0;
}

.product-modal-description {
  margin: 0;
  color: var(--text-700);
  line-height: 1.6;
}

.close-modal-btn {
  margin-bottom: 0.9rem;
}

.size-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.size-toggle-btn.active {
  background: var(--green-700);
  color: white;
  border-color: var(--green-700);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.selected-products {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.selected-product {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
  background: #fbfdfb;
}

.selected-product h3 {
  font-size: 1rem;
  margin: 0 0 0.4rem;
}

.selected-product p {
  margin: 0.2rem 0;
  color: var(--text-700);
  font-size: 0.94rem;
}

.empty-state {
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--text-500);
  background: #fafcfa;
}

.footer {
  margin-top: 2rem;
  background: var(--green-900);
  color: white;
}

.footer-content {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.notice {
  margin-top: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  font-weight: 700;
}

.notice.success {
  background: #ecfdf3;
  border: 1px solid #b7ebc6;
  color: #136c3d;
}

.notice.error {
  background: #fff1f1;
  border: 1px solid #f5c2c7;
  color: var(--danger);
}

@media (max-width: 1100px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .nav {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.8rem 0;
  }

  .grid-2,
  .contact-layout,
  .filters-grid,
  .products-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .product-actions {
    grid-template-columns: 1fr;
  }

  .product-modal-dialog {
    margin: 3vh auto;
  }

  .product-modal-content {
    grid-template-columns: 1fr;
  }
}