:root {
  --bg: #f5f2ee;
  --surface: #ffffff;
  --surface-soft: #fbfaf8;
  --ink: #1f2523;
  --muted: #5b6460;
  --green: #2f6f4b;
  --green-2: #3f9a5f;
  --accent: #a86c47;
  --line: #e2dfd8;
  --shadow: 0 18px 40px rgba(24, 36, 30, 0.1);
  --shadow-soft: 0 10px 24px rgba(24, 36, 30, 0.06);
  --radius-lg: 22px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  line-height: 1.52;
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 8%, #f0f5f2 0%, transparent 36%),
    linear-gradient(180deg, #f7f6f3 0%, #f2f1ec 45%, #f4f2ec 100%);
}

.noise-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.2;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.06) 1px,
      transparent 1px,
      transparent 4px
    );
}

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

a {
  color: inherit;
}

main,
header,
footer {
  width: min(1320px, 93%);
  margin-inline: auto;
}

.topbar {
  margin-top: 16px;
  position: sticky;
  top: 12px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 11px 16px;
  border: 1px solid rgba(38, 51, 45, 0.12);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
}

.leaf {
  font-size: 1.05rem;
}

.name {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.34rem;
  letter-spacing: 0.01em;
}

nav {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.header-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: 0.4rem;
}

.header-links a,
footer a {
  color: #2f3a36;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: rgba(248, 242, 234, 0.78);
  border: 1px solid #e7dac8;
}

.header-links a:hover,
footer a:hover {
  border-color: var(--green);
  color: var(--green);
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.58rem;
}

.social-link svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.social-link span {
  white-space: nowrap;
}

nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2f3a36;
}

nav a:hover {
  color: var(--green);
}

.header-cta {
  text-decoration: none;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--green-2));
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.admin-toggle {
  border: 1px solid #cedfd8;
  border-radius: 999px;
  background: #ecf7f1;
  color: #25493b;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
}

.hero {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1rem;
}

.hero-copy,
.hero-art {
  background: #fff;
  border: 1px solid #dfdfd8;
  border-radius: var(--radius-lg);
  padding: clamp(1.05rem, 2vw, 2rem);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  width: 320px;
  aspect-ratio: 1;
  border-radius: 50%;
  inset: auto -130px -80px auto;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.65), transparent 70%);
  pointer-events: none;
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--accent);
}

h1,
h2,
h3 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.08;
}

h1 {
  margin: 0.26rem 0 0.85rem;
  font-size: clamp(2rem, 5.2vw, 3.35rem);
}

h2 {
  margin: 0.22rem 0 0;
  font-size: clamp(1.72rem, 4vw, 2.15rem);
}

h3 {
  margin: 0;
  font-size: 1.3rem;
}

.hero-copy p,
.hero-art p,
.plant-card p,
.trust-item p,
.contact p,
.order-box p {
  margin-top: 0;
  margin-bottom: 0;
  line-height: 1.68;
  color: #3a4440;
}

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

.btn {
  border: 0;
  border-radius: 12px;
  padding: 0.72rem 1rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--green), var(--green-2));
  box-shadow: 0 10px 18px rgba(47, 111, 75, 0.24);
}

.btn-secondary {
  background: #f8f2ea;
  border: 1px solid #e7dac8;
  color: #27433a;
}

.hero-metrics {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.hero-metrics div {
  border: 1px solid #e6dfd3;
  border-radius: 12px;
  background: #fff;
  padding: 0.88rem;
}

.hero-metrics strong {
  display: block;
  font-size: 1.34rem;
  line-height: 1.1;
}

.hero-metrics span {
  color: var(--muted);
  font-size: 0.85rem;
}

.card-panel {
  border: 1px solid #e2dfd8;
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 0.95rem;
}

.card-panel h2 {
  margin: 0 0 0.45rem;
}

.card-panel li {
  margin: 0.5rem 0;
}

section {
  margin-top: 1.15rem;
}

.section-head h2 {
  margin: 0.15rem 0 0;
}

.filters {
  margin: 0.75rem 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip {
  border: 1px solid #d6d0c6;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  background: #f3ece3;
  font-weight: 700;
  cursor: pointer;
}

.chip:hover {
  color: var(--green);
}

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

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

.plant-card {
  border: 1px solid #ddd8d0;
  border-radius: var(--radius-lg);
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  box-shadow: var(--shadow);
}

.plant-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 42px rgba(28, 38, 33, 0.13);
}

.gallery {
  position: relative;
}

.gallery-frame {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #eef3f0;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 34, 28, 0.64);
  color: #fff;
  line-height: 1;
  font-size: 1rem;
  z-index: 4;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.gallery-arrow.prev {
  left: 8px;
}

.gallery-arrow.next {
  right: 8px;
}

.gallery-arrow.hidden {
  display: none;
}

.gallery-arrow:hover {
  background: rgba(20, 34, 28, 0.82);
}

.gallery-image {
  position: absolute;
  inset: 0;
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.gallery-image.active {
  opacity: 1;
  transform: scale(1);
}

.gallery-dots {
  border-top: 1px solid #e6ddd0;
  padding: 0.42rem;
  background: #fff;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}

.gallery-dot {
  border: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #cdd7d2;
  cursor: pointer;
  padding: 0;
}

.gallery-dot.active {
  width: 18px;
  background: var(--green);
}

.plant-body {
  padding: 0.95rem;
  display: grid;
  gap: 0.5rem;
}

.price {
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 800;
}

.meta {
  margin-top: 0.35rem;
  display: grid;
  gap: 0.55rem;
}

.meta-actions,
.marketplace-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.trust {
  border: 1px solid #ddd8d0;
  border-radius: var(--radius-lg);
  padding: 1rem;
  background: #fff;
  display: grid;
  gap: 0.85rem;
}

.trust-item {
  border: 1px solid #e0ddd6;
  border-radius: 14px;
  background: #fffaf3;
  padding: 0.95rem;
}

.trust-item h3 {
  margin-top: 0;
  margin-bottom: 0.45rem;
  font-size: 1.2rem;
}

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

.contact,
.order-box {
  border: 1px solid #ddd8d0;
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 1rem;
}

.order-box {
  background: #faf5ef;
}

.order-form {
  display: grid;
  gap: 0.7rem;
}

.order-form label {
  display: grid;
  gap: 0.3rem;
  font-weight: 700;
}

input,
textarea {
  margin-top: 0.18rem;
  border: 1px solid #d6cab9;
  border-radius: 10px;
  padding: 0.62rem;
  color: inherit;
  font: inherit;
  background: #fff;
}

.cart-line {
  margin: 0.48rem 0;
}

#checkoutBtn {
  margin-top: 0.15rem;
}

.market-checkout {
  margin-top: 0.85rem;
  border: 1px solid #ebdfcf;
  border-radius: 14px;
  background: #fff8eb;
  padding: 0.75rem;
}

.market-title {
  margin: 0 0 0.45rem;
  font-weight: 800;
}

.market-links {
  display: grid;
  gap: 0.45rem;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.product-modal[hidden] {
  display: none;
}

.product-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 24, 18, 0.7);
}

.product-modal-panel {
  position: relative;
  width: min(540px, 94%);
  max-width: 540px;
  max-height: 88vh;
  margin: 2.2vh auto;
  border-radius: 14px;
  overflow: auto;
  background: #fff;
  border: 1px solid #ddd9d1;
  padding: 0.85rem;
  box-shadow: 0 24px 60px rgba(18, 31, 25, 0.3);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.product-modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: 1px solid #dfd0bb;
  border-radius: 50%;
  background: #fff;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 3;
}

.modal-tagline {
  margin: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent);
}

.product-modal-price {
  margin: 0.2rem 0 0;
  font-size: 1.32rem;
}

.product-modal-description {
  margin: 0.6rem 0 0;
  max-height: min(24vh, 170px);
  overflow: auto;
  padding-right: 0.45rem;
}

.product-modal-description::-webkit-scrollbar {
  width: 8px;
}

.product-modal-description::-webkit-scrollbar-thumb {
  background-color: rgba(47, 111, 75, 0.35);
  border-radius: 999px;
}

.product-modal-price strong {
  color: var(--accent);
}

.product-modal-gallery .gallery {
  border: 1px solid #e0e8e3;
  border-radius: 15px;
  overflow: hidden;
}

.product-modal-actions {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-modal-actions .btn {
  flex: 1;
}

.product-modal-form label {
  display: grid;
  gap: 0.24rem;
  margin-bottom: 0.65rem;
  font-weight: 700;
}

.product-modal-form input,
.product-modal-form textarea {
  margin-top: 0;
}

.modal-overlay,
.product-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 24, 18, 0.7);
}

.product-modal-panel,
.modal-panel {
  position: relative;
  width: min(540px, 94%);
  max-width: 540px;
  max-height: 88vh;
  margin: 2.2vh auto;
  overflow: auto;
  background: #fff;
  border: 1px solid #ddd9d1;
  border-radius: 14px;
  padding: 0.85rem;
  box-shadow: 0 24px 60px rgba(18, 31, 25, 0.3);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.product-modal-close,
.modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: 1px solid #dfd0bb;
  border-radius: 50%;
  background: #fff;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 3;
}

.product-modal-actions,
.modal-actions {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-modal-actions .btn,
.modal-actions .btn {
  flex: 1;
}

.product-modal-form label,
.product-form label {
  display: grid;
  gap: 0.24rem;
  margin-bottom: 0.65rem;
  font-weight: 700;
}

.product-modal-form input,
.product-modal-form textarea,
.product-form input,
.product-form textarea {
  margin-top: 0;
}

.product-modal-gallery,
.modal-gallery {
  margin-top: 0.65rem;
  display: flex;
  justify-content: center;
}

.product-modal-gallery .gallery {
  border: 1px solid #e0e8e3;
  border-radius: 15px;
  overflow: hidden;
  width: min(100%, 300px);
  max-width: 300px;
  max-height: 300px;
  background: #f4f5f2;
  margin-inline: auto;
}

.product-modal-gallery .gallery-frame {
  position: relative;
  width: 100%;
  height: min(28vh, 240px);
  max-width: 300px;
  aspect-ratio: unset;
  min-height: 180px;
}

.product-modal-gallery .gallery-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #f4f5f2;
  cursor: default;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.product-modal-price,
.product-price {
  margin: 0.2rem 0 0;
  font-size: 1.32rem;
}

.product-modal-price strong,
.product-price strong {
  color: var(--accent);
}

#toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #173025;
  color: #fff;
  padding: 0.68rem 0.9rem;
  border-radius: 10px;
  transform: translateY(120%);
  opacity: 0;
  transition: 0.24s ease;
  z-index: 50;
}

#toast.show {
  transform: translateY(0);
  opacity: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 {
  animation-delay: 0.12s;
}

.delay-2 {
  animation-delay: 0.24s;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

footer {
  text-align: center;
  color: #5f6863;
  padding: 2rem 0;
  display: grid;
  gap: 0.65rem;
}

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

@media (max-width: 920px) {
  .hero,
  .contact,
  .grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    width: min(1320px, 95%);
    border-radius: 16px;
    flex-wrap: wrap;
    padding: 10px;
  }

  .admin-toggle {
    order: 3;
    width: 100%;
  }

  .header-links {
    order: 2;
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .hero-metrics,
  .meta-actions,
  .marketplace-links {
    grid-template-columns: 1fr;
  }

  .product-modal-panel,
  .modal-panel {
    width: min(96vw, 520px);
    max-height: 92vh;
    padding: 0.7rem;
  }

  .product-modal-gallery .gallery {
    width: min(100%, 280px);
    max-width: 280px;
    max-height: 260px;
  }

  .product-modal-gallery .gallery-frame {
    height: min(30vh, 200px);
    min-height: 120px;
    max-width: 280px;
  }
}

@media (min-width: 1400px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

