:root {
  --bg: #f8f3e8;
  --surface: #fffdf8;
  --text: #2d2418;
  --muted: #655a4a;
  --brand: #6b3f11;
  --brand-dark: #4a2b0b;
  --line: #e6dcc7;
  --deep: #24160a;
  --green: #4c7a52;
  --green-soft: #e6f1e7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

h1,
h2,
h3,
.logo {
  font-family: "Cormorant Garamond", serif;
}

.container {
  width: min(1160px, 92%);
  margin: 0 auto;
}

.shop-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(135deg, #ecf5ee, #f7f2e7);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.logo {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  color: var(--brand-dark);
  text-decoration: none;
}

.logo img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #dfd2bc;
}

.shop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: #fffdf9c9;
  border: 1px solid #e7dac4;
  border-radius: 999px;
  flex-wrap: wrap;
}

.shop-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.93rem;
  padding: 10px 13px;
  border-radius: 999px;
  line-height: 1;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.shop-nav a:hover {
  color: var(--green);
  background: var(--green-soft);
}

.shop-nav a[aria-current="page"] {
  color: var(--green);
  font-weight: 700;
  background: var(--green-soft);
}

.cart-btn,
.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
}

.cart-btn {
  background: linear-gradient(135deg, var(--deep), #28462e);
  color: #f7eddd;
}

.cart-btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #f5ddba;
  color: var(--deep);
  margin-left: 6px;
  font-size: 12px;
}

.hero {
  padding: 52px 0 24px;
  background: linear-gradient(135deg, #fff5e0, #fbf5e9);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.hero p {
  color: var(--muted);
  max-width: 76ch;
}

.shop-shell {
  padding: 10px 0 58px;
}

.shell-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}

.filters {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, #fffdf8, #fbf6eb);
  padding: 16px;
  height: fit-content;
  position: sticky;
  top: 90px;
}

.filters h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

.filters label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 0.92rem;
}

.catalog-note {
  margin: 8px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

input,
select {
  width: 100%;
  border: 1px solid #d8ccb7;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fffefb;
}

.results-top {
  margin-bottom: 10px;
  color: var(--muted);
}

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

.product-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf8, #f9f4e9);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f3ebdc;
}

.product-content {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f4e3c7, var(--green-soft));
  color: #35563a;
  font-weight: 700;
}

.price {
  font-weight: 800;
  color: var(--brand-dark);
}

.desc {
  color: var(--muted);
  font-size: 0.9rem;
  min-height: 42px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--green));
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-dark), #3f6444);
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 95vw);
  height: 100dvh;
  background: #fffdf8;
  border-left: 1px solid var(--line);
  z-index: 30;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

.cart-drawer.open {
  transform: translateX(0);
}

.drawer-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-head h2 {
  margin: 0;
}

.drawer-head button {
  border: 0;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
}

.cart-items {
  overflow: auto;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.cart-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 8px;
  align-items: center;
}

.cart-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.qty-controls {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.qty-controls button {
  border: 0;
  background: #f8efdf;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.qty-controls span {
  width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.totals {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  display: grid;
  gap: 8px;
}

.totals > div {
  display: flex;
  justify-content: space-between;
}

.totals .grand {
  font-size: 1.1rem;
}

.cart-drawer > .btn {
  margin: 12px 16px 18px;
}

.overlay {
  position: fixed;
  inset: 0;
  background: #130c0590;
  z-index: 25;
}

.overlay[hidden] {
  display: none !important;
}

.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: 16px;
}

.checkout-modal[hidden] {
  display: none !important;
}

.checkout-card {
  width: min(680px, 100%);
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.checkout-form {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.order-message {
  margin: 0;
  padding: 0 16px 16px;
  font-weight: 700;
  color: #1c6b34;
}

.paypal-section {
  border-top: 1px solid var(--line);
  padding: 10px 16px 16px;
}

#paypalHint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

#paypalButtons {
  display: grid;
  gap: 10px;
}

.paypal-option {
  display: grid;
  gap: 6px;
}

.paypal-option-label {
  margin: 0;
  color: #2e2f2f;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.paypal-option-icon {
  min-width: 26px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eaf2ea;
  border: 1px solid #c2d5c2;
  color: #1c6b34;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}

.paypal-option-text {
  line-height: 1.2;
}

.paypal-region-note {
  margin: 0 0 10px;
  color: #5f5a50;
  font-size: 0.85rem;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 16px;
}

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

@media (max-width: 840px) {
  .nav-wrap {
    min-height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 10px;
  }

  .shop-nav {
    order: 3;
    width: 100%;
    border-radius: 14px;
    justify-content: flex-start;
  }

  .shell-grid {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

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