:root {
  --bg: #f4faef;
  --card: rgba(255, 255, 255, 0.92);
  --text: #13231b;
  --muted: #66756d;
  --primary: #219653;
  --primary-dark: #116b37;
  --primary-soft: #e8f8ee;
  --accent: #f4b740;
  --danger: #e5484d;
  --border: rgba(28, 84, 54, 0.14);
  --shadow: 0 24px 70px rgba(21, 67, 42, 0.14);
  --shadow-soft: 0 14px 35px rgba(21, 67, 42, 0.1);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(110, 231, 183, 0.28), transparent 32rem),
    radial-gradient(circle at top right, rgba(244, 183, 64, 0.18), transparent 28rem),
    linear-gradient(180deg, #fbfff8 0%, #eef8eb 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(33, 150, 83, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(33, 150, 83, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

/* Navbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px max(18px, calc((100% - 1180px) / 2));
  background: rgba(251, 255, 248, 0.8);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: white;
  background:
    linear-gradient(135deg, var(--primary), #5ecf84);
  box-shadow: 0 12px 28px rgba(33, 150, 83, 0.32);
}

.brand strong {
  display: block;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  transition: 0.25s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.cart-link span {
  min-width: 23px;
  height: 23px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: var(--primary);
  font-size: 0.78rem;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  padding: 48px 0 24px;
  align-items: center;
}

.hero-copy,
.hero-image-card,
.stats article,
.card,
.highlight article,
.form-card,
.checkout-card,
.modal-card {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 54px);
}

.hero-copy::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -100px;
  bottom: -120px;
  border-radius: 50%;
  background: rgba(33, 150, 83, 0.12);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 0.82rem;
  font-weight: 900;
}

.pill.soft {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
}

.hero h1,
.section-head h2,
.auth-title {
  margin: 18px 0 14px;
  font-size: clamp(2.45rem, 6vw, 5.3rem);
  line-height: 0.95;
  letter-spacing: -0.075em;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.hero p,
.section-head p,
.card p,
.highlight p,
.form-card p,
.checkout-card p {
  color: var(--muted);
  line-height: 1.75;
}

.hero-copy > p {
  max-width: 650px;
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.btn,
.card-btn,
.modal-action,
.form-btn,
.qty-btn,
.icon-btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.25s ease;
}

.btn,
.form-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 19px;
}

.btn:hover,
.card-btn:hover,
.modal-action:hover,
.form-btn:hover,
.qty-btn:hover,
.icon-btn:hover {
  transform: translateY(-2px);
}

.btn-primary,
.form-btn.primary,
.card-btn.primary,
.modal-action.primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), #44c96f);
  box-shadow: 0 14px 30px rgba(33, 150, 83, 0.28);
}

.btn-secondary,
.form-btn.secondary,
.card-btn.secondary,
.modal-action.secondary {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.trust-row i {
  color: var(--primary);
}

/* Hero visual */

.hero-visual {
  display: grid;
  gap: 16px;
}

.hero-image-card {
  position: relative;
  padding: 14px;
}

.hero-image-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 22px;
}

.floating-card {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
}

.floating-card small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.floating-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--accent), #ffda75);
}

.crop-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.crop-mini-grid article {
  padding: 16px 10px;
  text-align: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.crop-mini-grid i {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 1.25rem;
}

.crop-mini-grid span {
  font-size: 0.82rem;
  font-weight: 900;
}

/* Stats */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 18px 0 42px;
}

.stats article {
  padding: 24px;
}

.stats i {
  color: var(--primary);
  font-size: 1.4rem;
}

.stats strong {
  display: block;
  margin-top: 12px;
  font-size: 2rem;
  letter-spacing: -0.06em;
}

.stats span {
  color: var(--muted);
  font-weight: 700;
}

/* Catalog */

.catalog {
  padding: 20px 0 48px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 22px;
  margin-bottom: 18px;
}

.section-head.simple {
  align-items: start;
}

.searchbox {
  position: relative;
  width: min(390px, 100%);
}

.searchbox i {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
}

.searchbox input {
  width: 100%;
  padding: 15px 16px 15px 45px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
  outline: none;
  box-shadow: var(--shadow-soft);
}

.searchbox input:focus,
.input-wrap input:focus {
  border-color: rgba(33, 150, 83, 0.55);
  box-shadow: 0 0 0 5px rgba(33, 150, 83, 0.12);
}

.filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  padding: 11px 14px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  font-weight: 900;
  transition: 0.25s ease;
}

.chip:hover,
.chip.active {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), #44c96f);
  box-shadow: 0 12px 25px rgba(33, 150, 83, 0.22);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* Product card */

.card {
  position: relative;
  overflow: hidden;
  padding: 14px;
  transition: 0.28s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 80px rgba(21, 67, 42, 0.18);
}

.card-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
}

.card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: 0.4s ease;
}

.card:hover .card-image {
  transform: scale(1.045);
}

.card-icon {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: rgba(33, 150, 83, 0.94);
  backdrop-filter: blur(12px);
}

.badge {
  position: absolute;
  right: 14px;
  top: 14px;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  font-weight: 900;
}

.card-body {
  padding: 18px 5px 4px;
}

.card h3 {
  margin: 10px 0 8px;
  font-size: 1.18rem;
  letter-spacing: -0.03em;
}

.card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 0.76rem;
  font-weight: 900;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}

.price {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.rating {
  color: #f6a800;
  font-size: 0.85rem;
  font-weight: 900;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.card-btn,
.modal-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 13px;
}

/* Highlight */

.highlight {
  padding: 18px 0 50px;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.highlight article {
  padding: 28px;
}

.highlight article i {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: white;
  background: linear-gradient(135deg, var(--primary), #44c96f);
}

.highlight h3 {
  margin-bottom: 8px;
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 20, 14, 0.62);
  backdrop-filter: blur(10px);
}

.modal.hidden {
  display: none;
}

.modal-card {
  position: relative;
  width: min(860px, 100%);
  padding: 18px;
  animation: pop 0.2s ease;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
}

.modal-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 22px;
  align-items: center;
}

.modal-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 24px;
}

.modal-info {
  padding: 16px;
}

.modal-info h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.06em;
  margin: 14px 0;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.detail-list p {
  margin: 0;
  color: var(--muted);
}

.detail-list strong {
  color: var(--text);
}

/* Cart */

.cart-page {
  padding: 42px 0 70px;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 22px;
  align-items: start;
}

.cart-list {
  display: grid;
  gap: 14px;
}

.cart-row {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.cart-img {
  width: 86px;
  height: 86px;
  border-radius: 20px;
  object-fit: cover;
}

.cart-row h3 {
  margin: 0 0 6px;
}

.cart-row p {
  margin: 0;
  color: var(--muted);
}

.cart-actions {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: var(--primary-soft);
}

.qty-btn,
.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--primary-dark);
  background: white;
}

.icon-btn.danger {
  color: white;
  background: var(--danger);
}

.checkout-card {
  position: sticky;
  top: 96px;
  padding: 24px;
}

.checkout-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.checkout-line.total {
  border-bottom: 0;
  font-size: 1.35rem;
  font-weight: 900;
}

.empty-state {
  padding: 34px;
  text-align: center;
}

.empty-state i {
  font-size: 2.4rem;
  color: var(--primary);
}

/* Auth pages */

.auth-body {
  min-height: 100vh;
}

.auth-shell {
  min-height: calc(100vh - 82px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 44px 0;
}

.auth-panel {
  padding: clamp(28px, 5vw, 48px);
  border-radius: var(--radius);
  color: white;
  background:
    linear-gradient(135deg, rgba(17, 107, 55, 0.96), rgba(68, 201, 111, 0.88)),
    url("../assets/images/hero-banner.jpg") center / cover;
  box-shadow: var(--shadow);
}

.auth-panel h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.075em;
}

.auth-panel p {
  line-height: 1.8;
  opacity: 0.9;
}

.auth-benefits {
  display: grid;
  gap: 13px;
  margin-top: 28px;
}

.auth-benefits span {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
}

.form-card {
  padding: clamp(24px, 4vw, 38px);
}

.form-card h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.065em;
}

.form-grid {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.form-grid label {
  font-weight: 900;
  font-size: 0.9rem;
}

.input-wrap {
  position: relative;
}

.input-wrap i {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: var(--primary);
}

.input-wrap input {
  width: 100%;
  padding: 15px 16px 15px 45px;
  border: 1px solid var(--border);
  border-radius: 17px;
  outline: none;
  background: white;
}

/* Footer and toast */

.footer {
  padding: 28px 0 36px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: center;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 999px;
  color: white;
  background: #13231b;
  box-shadow: var(--shadow);
  transition: 0.25s ease;
  font-weight: 800;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Responsive */

@media (max-width: 980px) {
  .hero,
  .auth-shell,
  .cart-layout,
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .grid,
  .stats,
  .highlight-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .searchbox {
    width: 100%;
  }

  .checkout-card {
    position: static;
  }
}

@media (max-width: 680px) {
  .topbar {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
  }

  .nav a {
    flex: 1;
    justify-content: center;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .grid,
  .stats,
  .highlight-grid,
  .crop-mini-grid {
    grid-template-columns: 1fr;
  }

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

  .cart-row {
    grid-template-columns: 1fr;
  }

  .cart-img {
    width: 100%;
    height: 180px;
  }

  .cart-actions {
    justify-items: start;
  }
}