@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Spectral:wght@600;700&display=swap');

:root {
  --bg: #f8f5ef;
  --ink: #202620;
  --muted: #5f6b62;
  --brand: #1f7a46;
  --brand-2: #0f4f79;
  --accent: #c8731b;
  --card: #ffffff;
  --line: #d9e2d8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at 20% -10%, #dcefdc 0%, transparent 45%), var(--bg);
  color: var(--ink);
  font-family: 'Outfit', sans-serif;
}

.store-wrap {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.store-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(248, 245, 239, 0.9);
  border-bottom: 1px solid var(--line);
}

.marketplace-strip {
  border-bottom: 1px solid #d7e3d8;
  background: linear-gradient(90deg, #f1f8f2 0%, #eef5fb 100%);
}

.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.55rem 0;
}

.marketplace-pill {
  border: 1px solid #d3e2d6;
  border-radius: 999px;
  background: #fff;
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
  color: #2a4534;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: #17361f;
  font-weight: 800;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #cfe2d1;
}

.store-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.store-nav a {
  text-decoration: none;
  font-weight: 600;
  color: #2d3e30;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
}

.store-nav a:hover {
  background: #e7f4ea;
}

.cart-btn {
  border: 1px solid #cde1d0;
  background: #fff;
  color: #173f26;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.cart-btn span {
  margin-left: 0.35rem;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  font-size: 0.75rem;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 3rem 0 2.4rem;
}

.hero-bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.42;
  pointer-events: none;
}

.shape-a {
  width: 340px;
  height: 340px;
  right: -110px;
  top: -90px;
  background: #84c69f;
}

.shape-b {
  width: 280px;
  height: 280px;
  left: -60px;
  bottom: -110px;
  background: #78b5cf;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1rem;
  align-items: start;
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: #2a6a3f;
  font-weight: 800;
}

.hero h1 {
  font-family: 'Spectral', serif;
  margin: 0.45rem 0 0.7rem;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.1;
}

.hero-sub {
  margin: 0;
  color: #33443a;
  max-width: 760px;
  line-height: 1.6;
}

.hero-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0.58rem 0.95rem;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #2b9f5c);
  color: #fff;
}

.btn-outline {
  background: #fff;
  color: #2c3e31;
  border-color: #cfddd1;
}

.hero-metrics {
  margin-top: 1rem;
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.hero-metrics div {
  min-width: 110px;
  border: 1px solid #d5e6d7;
  border-radius: 12px;
  padding: 0.5rem 0.65rem;
  background: #fff;
}

.hero-metrics strong {
  display: block;
  color: #114f2d;
  font-size: 1.1rem;
}

.hero-metrics span {
  font-size: 0.78rem;
  color: var(--muted);
}

.hero-card {
  background: #fff;
  border: 1px solid #d8e6da;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 18px 34px rgba(31, 72, 34, 0.11);
  animation: floaty 6s ease-in-out infinite;
}

.hero-card h3 {
  margin-top: 0;
}

.hero-card ul {
  margin: 0.45rem 0 0.8rem 1rem;
  padding: 0;
  color: #26382c;
  line-height: 1.6;
}

.trust-row {
  margin-top: 0.85rem;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.trust-row span {
  border: 1px solid #cde0d0;
  border-radius: 999px;
  background: #f3faf4;
  padding: 0.22rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #1b5a35;
}

.catalog-section,
.checkout-section {
  padding: 1rem 0 2rem;
}

.toolbar {
  display: grid;
  grid-template-columns: 1.45fr 0.9fr 0.9fr auto;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.toolbar input,
.toolbar select,
.checkout-form input,
.checkout-form textarea,
.checkout-form select {
  width: 100%;
  border: 1px solid #cfded1;
  border-radius: 10px;
  background: #fff;
  color: #223328;
  padding: 0.58rem 0.72rem;
  font: inherit;
}

.stock-toggle {
  border: 1px solid #cee0d0;
  border-radius: 10px;
  background: #fff;
  padding: 0.5rem 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: #264331;
}

.status {
  border: 1px solid #d6e7d8;
  background: #f0f9f1;
  color: #1f5e35;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.7rem;
  font-size: 0.88rem;
}

.hidden { display: none !important; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 0.75rem;
}

.product-card {
  background: #fff;
  border: 1px solid #d7e3d8;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(23, 59, 28, 0.07);
  display: grid;
  grid-template-rows: 148px 1fr;
}

.product-media {
  background: linear-gradient(140deg, #e9f5ea, #dcecf4);
  display: grid;
  place-items: center;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-body {
  padding: 0.7rem;
}

.product-top {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
}

.product-title {
  margin: 0;
  font-size: 1rem;
  color: #183821;
}

.chip {
  font-size: 0.72rem;
  font-weight: 700;
  color: #205f39;
  border: 1px solid #cfe4d2;
  background: #eef8f0;
  border-radius: 999px;
  padding: 0.12rem 0.52rem;
}

.product-desc {
  color: #4b5a50;
  font-size: 0.84rem;
  line-height: 1.5;
  min-height: 54px;
}

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0.35rem 0 0.6rem;
}

.price-row strong {
  color: #114927;
  font-size: 1.02rem;
}

.price-row span {
  color: #596a5e;
  font-size: 0.78rem;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0.85rem;
}

.checkout-card,
.summary-card {
  background: #fff;
  border: 1px solid #d5e2d6;
  border-radius: 14px;
  padding: 0.95rem;
}

.checkout-card h2,
.summary-card h3 {
  margin-top: 0;
}

.checkout-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.checkout-form .span-2,
.checkout-form .checkout-actions {
  grid-column: 1 / -1;
}

.checkout-form label {
  display: block;
  font-weight: 700;
  font-size: 0.8rem;
  color: #2f4b38;
  margin-bottom: 0.22rem;
}

.checkout-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.settings-panel {
  margin-top: 0.75rem;
  border: 1px solid #d7e3d8;
  border-radius: 12px;
  padding: 0.75rem;
  background: #f9fdf9;
}

.settings-panel h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.settings-grid label {
  display: block;
  font-weight: 700;
  font-size: 0.8rem;
  color: #2f4b38;
  margin-bottom: 0.22rem;
}

.settings-actions {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.panel-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.section-title {
  margin: 0;
  font-size: 1.25rem;
  color: #163923;
}

.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.7rem;
}

.order-card {
  border: 1px solid #d7e4d8;
  border-radius: 12px;
  background: #fff;
  padding: 0.7rem;
  box-shadow: 0 8px 18px rgba(23, 59, 28, 0.06);
}

.order-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.4rem;
}

.order-meta {
  margin: 0.35rem 0;
  display: grid;
  gap: 0.2rem;
  font-size: 0.82rem;
  color: #415647;
}

.order-items {
  margin: 0.45rem 0;
  padding: 0.45rem;
  border: 1px solid #e0ebe1;
  border-radius: 10px;
  background: #f9fcf9;
  display: grid;
  gap: 0.22rem;
  font-size: 0.82rem;
}

.order-actions {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.14rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.status-pill.pending { background: #fff4de; color: #7b5613; border-color: #edd6a8; }
.status-pill.confirmed { background: #e8f7ec; color: #1e6138; border-color: #c9e5d0; }
.status-pill.cancelled { background: #ffe9e9; color: #8e2424; border-color: #efc5c5; }
.status-pill.completed { background: #e8f0ff; color: #264f88; border-color: #c8daf6; }

.summary-items {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
  border: 1px solid #e1ece2;
  border-radius: 10px;
  background: #f9fcf9;
  padding: 0.45rem 0.55rem;
}

.summary-item small {
  color: #617265;
}

.summary-totals {
  border-top: 1px dashed #cbdbcf;
  padding-top: 0.6rem;
  display: grid;
  gap: 0.33rem;
}

.summary-totals div {
  display: flex;
  justify-content: space-between;
}

.summary-totals .grand {
  border-top: 1px solid #d2e1d3;
  margin-top: 0.34rem;
  padding-top: 0.4rem;
  font-size: 1.06rem;
  color: #123f26;
}

.cart-drawer {
  position: fixed;
  right: -420px;
  top: 0;
  width: min(390px, 95vw);
  height: 100vh;
  background: #fff;
  border-left: 1px solid #d6e3d7;
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.2);
  z-index: 80;
  transition: right 0.25s ease;
  display: grid;
  grid-template-rows: auto 1fr;
}

.cart-drawer.open {
  right: 0;
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem;
  border-bottom: 1px solid #dfebdf;
}

.cart-head h3 {
  margin: 0;
}

.cart-head button {
  border: 1px solid #cadacb;
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  background: #fff;
  cursor: pointer;
}

.cart-list {
  overflow: auto;
  padding: 0.7rem;
  display: grid;
  gap: 0.5rem;
}

.cart-item {
  border: 1px solid #dbe8dc;
  border-radius: 10px;
  padding: 0.5rem;
  background: #fbfefb;
}

.cart-item-top {
  display: flex;
  justify-content: space-between;
  gap: 0.45rem;
}

.cart-item h4 {
  margin: 0;
  font-size: 0.92rem;
}

.cart-actions {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #cbdbcd;
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.remove-btn {
  margin-left: auto;
  border: 1px solid #e1c4c4;
  color: #8a1f1f;
  border-radius: 8px;
  background: #fff;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
}

.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 14, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 70;
}

.cart-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.muted {
  color: var(--muted);
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 1024px) {
  .hero-grid,
  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .marketplace-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .header-row {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.55rem 0;
  }

  .store-nav {
    justify-content: center;
  }

  .toolbar,
  .checkout-form {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .panel-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
