:root {
  --bg: #fff8ef;
  --card: #ffffff;
  --text: #122736;
  --muted: #5d7281;
  --primary: #0f8d73;
  --primary-strong: #0a735e;
  --accent: #f5a340;
  --border: #e8ddcf;
  --shadow: 0 14px 34px rgba(18, 39, 54, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fffefb 0%, #fff6e8 45%, #fff0de 100%);
  min-height: 100vh;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 14% 12%, rgba(245, 163, 64, 0.22) 0, transparent 42%),
              radial-gradient(circle at 84% 8%, rgba(15, 141, 115, 0.18) 0, transparent 38%),
              radial-gradient(circle at 72% 82%, rgba(255, 199, 136, 0.16) 0, transparent 45%);
}

.hero {
  text-align: center;
  padding: 2.9rem 1.2rem 1.8rem;
}

.hero-small {
  padding-bottom: 1rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4.2vw, 2.8rem);
  letter-spacing: -0.02em;
}

.hero-tag {
  margin: 0 0 0.6rem;
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-sub {
  margin: 0.8rem auto 0;
  max-width: 780px;
  color: var(--muted);
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 6.3rem;
}

h2 {
  margin: 0 0 0.8rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
}

.tab-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.tab-btn:hover {
  border-color: var(--accent);
}

.tab-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.filters-wrap {
  margin-bottom: 1.4rem;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.filters-header h2 {
  margin: 0;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.filters-grid label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.filters-grid select {
  font: inherit;
}

.tab-select {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  border-radius: 999px;
  padding: 0.55rem 2.1rem 0.55rem 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.tab-select:hover,
#reset-filters:hover {
  border-color: var(--accent);
}

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

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

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

.card-body {
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.store {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.desc {
  margin: 0;
  font-size: 0.93rem;
}

.price {
  margin: 0.3rem 0 0;
  font-weight: 800;
}

.qty-row {
  margin-top: 0.45rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.qty-controls button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.qty-pill {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
}

.cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(18, 39, 54, 0.95);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  backdrop-filter: blur(8px);
}

.cart-items,
.cart-total {
  margin: 0;
}

.cart-total {
  font-weight: 800;
}

.btn-primary {
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #1e3039;
  font-weight: 800;
  text-decoration: none;
  padding: 0.65rem 1rem;
  cursor: pointer;
}

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

.checkout-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1rem;
}

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

.order-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 0.5rem;
}

.order-line-main {
  display: grid;
  gap: 0.45rem;
}

.order-line-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.remove-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.remove-btn:hover {
  border-color: var(--accent);
}

.order-total-row {
  margin-top: 0.8rem;
  display: flex;
  justify-content: space-between;
  font-size: 1.08rem;
}

.form-grid {
  display: grid;
  gap: 0.8rem;
}

.form-grid label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

input {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  font: inherit;
}

.btn-link {
  display: inline-block;
  margin-top: 0.8rem;
  text-decoration: none;
  color: var(--primary-strong);
}

.order-message {
  min-height: 1.2rem;
  color: var(--primary-strong);
  font-weight: 700;
}

@media (min-width: 860px) {
  .checkout-layout {
    grid-template-columns: 1.1fr 1fr;
  }
}
