:root {
  color-scheme: light;
  --ink: #14251f;
  --muted: #64736a;
  --line: #dfe6dd;
  --paper: #f7f8f3;
  --panel: rgba(255, 255, 255, 0.9);
  --mint: #e6f4ea;
  --green: #15734f;
  --green-dark: #0f4f3c;
  --blue: #2f6f9f;
  --gold: #d39c34;
  --rose: #c85d5d;
  --cream: #fffdf7;
  --sage: #eef5ed;
  --shadow: 0 24px 60px rgba(20, 37, 31, 0.14);
  --shadow-soft: 0 16px 38px rgba(20, 37, 31, 0.1);
  --font-ui: "Inter", "Aptos", "Segoe UI", sans-serif;
  --font-display: "Inter", "Aptos", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(135deg, rgba(21, 115, 79, 0.1), transparent 28%),
    linear-gradient(220deg, rgba(47, 111, 159, 0.1), transparent 30%),
    linear-gradient(180deg, #fbfbf6 0%, #f2f7ef 52%, #f7f3ea 100%);
  color: var(--ink);
  font-family: var(--font-ui);
}

img,
svg {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  max-width: 100%;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 56px);
  border-bottom: 1px solid rgba(215, 223, 212, 0.85);
  background: rgba(252, 250, 244, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(24, 49, 38, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  overflow: hidden;
  background: white;
  color: white;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 14px 28px rgba(21, 115, 79, 0.24);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand small,
.muted,
.product-meta,
.section-heading p,
.hero p {
  color: var(--muted);
}

.brand span:last-child {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.brand strong,
.brand small {
  overflow-wrap: anywhere;
}

.brand strong,
.hero h1,
.section-heading h2,
.modal-panel h2,
.footer-column h3 {
  font-family: var(--font-display);
  font-weight: 700;
}

.nav-actions,
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.cart-btn,
.link-btn {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.primary-btn {
  background: linear-gradient(135deg, #2d7a59, var(--green));
  color: white;
  box-shadow: 0 12px 24px rgba(34, 92, 67, 0.22);
}

.primary-btn:hover {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
}

.secondary-btn {
  border-color: rgba(34, 92, 67, 0.2);
  background: rgba(255, 255, 255, 0.72);
  color: var(--green-dark);
  backdrop-filter: blur(8px);
}

.secondary-btn.danger {
  border-color: rgba(200, 93, 93, 0.3);
  color: #9a3333;
}

.ghost-btn,
.link-btn {
  background: transparent;
  color: var(--ink);
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-color: rgba(34, 92, 67, 0.12);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.cart-btn span {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #dfc07f, var(--gold));
  color: var(--ink);
  font-size: 0.85rem;
}

.account-btn {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(34, 92, 67, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.account-btn span,
.account-avatar {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: white;
  font-weight: 850;
}

.account-avatar.logo-avatar {
  overflow: hidden;
  background: white;
}

.account-avatar.logo-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-btn span {
  width: 30px;
  height: 30px;
  font-size: 0.78rem;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.google-signin {
  min-height: 42px;
}

.google-note {
  margin: 0;
  font-size: 0.86rem;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-footer {
  margin-top: 24px;
  padding: 42px 0 22px;
  background:
    radial-gradient(circle at bottom right, rgba(49, 95, 141, 0.1), transparent 28%),
    linear-gradient(180deg, #e8efe5, #dde8df);
  border-top: 1px solid var(--line);
}

.site-footer .footer-grid,
.site-footer .footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
}

.footer-brand {
  display: grid;
  gap: 14px;
}

.footer-brand-link {
  width: fit-content;
}

.footer-brand p,
.footer-column p,
.footer-column a,
.footer-link-btn,
.footer-bottom p {
  color: var(--muted);
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-column h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1rem;
}

.footer-column a,
.footer-link-btn {
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  text-decoration: none;
}

.footer-column a:hover,
.footer-link-btn:hover {
  color: var(--green-dark);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(97, 112, 102, 0.18);
  font-size: 0.92rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
  min-height: 520px;
  padding: 44px 0 28px;
}

.hero-copy {
  position: relative;
  min-width: 0;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: -26px auto auto -22px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(203, 163, 92, 0.22), transparent 68%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.45rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero p:not(.eyebrow) {
  max-width: 620px;
  margin: 18px 0;
  font-size: 1.15rem;
  line-height: 1.7;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 120px));
  gap: 12px;
  margin: 24px 0;
}

.hero-stats div {
  padding: 14px;
  border: 1px solid rgba(21, 115, 79, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.hero-stats strong {
  display: block;
  font-size: 1.35rem;
}

.hero-stats span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.market-preview {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(237, 243, 234, 0.96));
  box-shadow: var(--shadow);
}

.preview-card {
  display: grid;
  grid-template-columns: minmax(64px, 82px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

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

.preview-card img {
  width: 100%;
  max-width: 170px;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  justify-self: center;
}

.preview-card span,
.preview-card strong {
  display: block;
}

.listing-toolbar {
  display: grid;
  gap: 14px;
  margin-bottom: 8px;
}

.search-field-wide {
  padding: 16px;
  border: 1px solid rgba(34, 92, 67, 0.22);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(21, 115, 79, 0.18), rgba(47, 111, 159, 0.12));
  box-shadow: 0 18px 36px rgba(24, 49, 38, 0.12);
}

.filters,
.listing-toolbar-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px 170px;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
}

.listing-toolbar-actions {
  grid-template-columns: minmax(180px, 220px) repeat(6, minmax(130px, 1fr));
  align-items: end;
}

.search-field-wide input {
  height: 56px;
  border: 2px solid rgba(34, 92, 67, 0.32);
  background: white;
  font-size: 1.05rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  outline: none;
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(31, 122, 77, 0.12);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 34px 0 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 24px;
  padding-bottom: 56px;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(252, 250, 244, 0.96));
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.product-card.is-sold {
  opacity: 0.78;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(24, 49, 38, 0.12);
}

.product-art {
  position: relative;
  display: grid;
  height: 230px;
  place-items: center;
  background: linear-gradient(145deg, var(--mint), #f3efe3);
}

.product-art img {
  width: min(70%, 210px);
  height: 178px;
  object-fit: contain;
}

.image-count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(20, 37, 31, 0.76);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
}

.product-body {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.product-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.product-card h3 {
  margin: 0;
  font-size: 1.1rem;
  font-family: var(--font-display);
  overflow-wrap: anywhere;
}

.badge {
  align-self: start;
  border-radius: 999px;
  padding: 5px 10px;
  background: #e6eef7;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 850;
}

.status-pill {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 11px;
  background: #e9f7ef;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 850;
}

.status-pill.sold {
  background: #f7e7e7;
  color: #9a3333;
}

.status-pill.reserved {
  background: #fff3d8;
  color: #8b6530;
}

.badge.rent {
  background: #f8edd4;
  color: #8b6530;
}

.price {
  font-size: 1.35rem;
  font-weight: 850;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  min-width: 0;
}

.product-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.seller-rating {
  margin: 0;
  font-size: 0.88rem;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.product-actions button,
.listing-actions button {
  min-width: 0;
}

.preview-cart-btn {
  width: fit-content;
  margin-top: 4px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 42px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: white;
  text-align: center;
}

.load-more-row {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  padding: 6px 0 10px;
}

.load-more-row .secondary-btn {
  min-width: min(260px, 100%);
}

.modal {
  width: min(520px, calc(100% - 28px));
  max-height: min(720px, calc(100dvh - 28px));
  border: 0;
  padding: 0;
  border-radius: 18px;
  background: transparent;
  overflow: auto;
}

.modal::backdrop {
  background: rgba(24, 49, 38, 0.18);
}

.modal-panel {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 250, 244, 0.98));
  box-shadow: var(--shadow);
  min-width: 0;
}

.modal-panel h2 {
  margin: 0;
}

.close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  font-weight: 900;
}

.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.full {
  width: 100%;
}

.cart-items {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow: auto;
}

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

.cart-item h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 1.2rem;
}

.account-modal {
  width: min(760px, calc(100% - 28px));
}

.account-panel {
  gap: 18px;
}

.account-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 42px;
}

.account-avatar {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  font-size: 1rem;
}

.account-head h2,
.account-head p {
  margin: 0;
}

.account-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.tab-btn {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.tab-btn.active {
  background: var(--green);
  color: white;
}

.account-content {
  display: grid;
  gap: 12px;
}

.account-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  min-width: 0;
}

.account-card h3,
.account-card p,
.account-row strong,
.account-row span {
  overflow-wrap: anywhere;
}

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

.admin-stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.admin-stat strong {
  display: block;
  font-size: 1.45rem;
}

.admin-stat span,
.account-section-title {
  color: var(--muted);
}

.account-section-title {
  margin: 8px 0 0;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.account-card h3,
.account-card p {
  margin: 0;
}

.account-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  color: var(--muted);
}

.account-row strong {
  color: var(--ink);
}

.listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-card {
  gap: 14px;
}

.order-main {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  align-items: center;
}

.order-main img {
  width: 86px;
  height: 86px;
  border-radius: 16px;
  object-fit: contain;
  background: var(--sage);
  padding: 10px;
}

.pickup-box {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(21, 115, 79, 0.16);
  border-radius: 14px;
  background: rgba(238, 245, 237, 0.72);
}

.pickup-box h4,
.pickup-box p {
  margin: 0;
}

.order-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.order-timeline span {
  border-radius: 999px;
  padding: 8px 10px;
  background: #eef1ec;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
}

.order-timeline span.done {
  background: #e2f5ea;
  color: var(--green-dark);
}

.chat-messages {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.chat-bubble {
  width: fit-content;
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--sage);
}

.chat-bubble.mine {
  justify-self: end;
  background: #e4edf7;
}

.chat-bubble p {
  margin: 4px 0 0;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(360px, calc(100% - 36px));
  transform: translateY(20px);
  border-radius: 8px;
  padding: 13px 16px;
  background: linear-gradient(135deg, var(--ink), #274637);
  color: white;
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

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

@media (max-width: 860px) {
  .topbar {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 20px;
  }

  .brand {
    flex: 1 1 260px;
  }

  .nav-actions {
    flex: 1 1 420px;
    justify-content: flex-end;
  }

  .hero,
  .filters,
  .listing-toolbar-actions,
  .product-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 28px 0 18px;
    gap: 28px;
  }

  .market-preview {
    width: min(100%, 560px);
  }

  .hero-stats,
  .admin-dashboard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filters,
  .listing-toolbar-actions {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .search-field {
    grid-column: 1 / -1;
  }

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

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

  .site-footer {
    padding-top: 34px;
  }
}

@media (max-width: 560px) {
  body {
    background: linear-gradient(180deg, #fbfbf6 0%, #f2f7ef 58%, #f7f3ea 100%);
  }

  main {
    width: min(100% - 24px, 1180px);
  }

  .topbar {
    position: sticky;
    padding: 12px 14px;
    gap: 10px;
  }

  .brand {
    min-width: 0;
    width: 100%;
    gap: 10px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  .brand strong {
    font-size: 0.98rem;
  }

  .brand small {
    font-size: 0.76rem;
  }

  .nav-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .nav-actions button {
    width: 100%;
    min-height: 40px;
    padding-inline: 12px;
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .nav-actions .ghost-btn {
    display: none;
  }

  .account-btn {
    width: 100%;
  }

  .account-btn span {
    justify-self: center;
  }

  .hero {
    padding-top: 18px;
    gap: 20px;
  }

  .hero-copy::before {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
    line-height: 1.05;
  }

  .hero p:not(.eyebrow) {
    margin: 16px 0 18px;
    font-size: 0.98rem;
  }

  .hero-stats,
  .admin-dashboard {
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero-stats div {
    padding: 10px 8px;
    border-radius: 8px;
  }

  .hero-stats strong {
    font-size: 1.05rem;
  }

  .hero-stats span {
    font-size: 0.68rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
  }

  .hero-actions button {
    width: 100%;
  }

  .market-preview {
    padding: 12px;
    border-radius: 8px;
    gap: 10px;
  }

  .preview-card {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
  }

  .preview-card.main {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .preview-card img {
    max-width: 56px;
    height: 56px;
    justify-self: center;
  }

  .preview-cart-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .section-heading {
    padding-top: 24px;
    gap: 8px;
  }

  .section-heading p {
    margin: 0;
  }

  .section-heading h2 {
    font-size: 1.55rem;
  }

  .search-field-wide {
    padding: 12px;
    border-radius: 8px;
  }

  .search-field-wide input {
    height: 48px;
    font-size: 0.98rem;
  }

  .filters,
  .listing-toolbar-actions {
    grid-template-columns: 1fr;
    padding: 14px;
    border-radius: 8px;
    gap: 10px;
  }

  .listing-toolbar-actions > .primary-btn {
    order: -1;
  }

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

  .product-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .product-art {
    height: clamp(160px, 46vw, 190px);
  }

  .product-art img {
    height: 148px;
  }

  .product-body {
    padding: 16px;
  }

  .product-card {
    border-radius: 8px;
  }

  .product-top {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .price {
    font-size: 1.2rem;
  }

  .two-columns,
  .cart-item {
    grid-template-columns: 1fr;
  }

  .product-meta {
    flex-direction: column;
    align-items: start;
    gap: 6px;
  }

  .modal {
    width: calc(100% - 16px);
    max-width: none;
    max-height: calc(100dvh - 16px);
    margin: 8px auto;
    border-radius: 12px;
  }

  .modal-panel {
    min-height: auto;
    padding: 18px 14px;
    gap: 12px;
    border-radius: 12px;
    max-height: calc(100dvh - 16px);
    overflow: auto;
  }

  .account-modal {
    width: calc(100% - 12px);
  }

  .account-panel {
    max-height: calc(100dvh - 12px);
  }

  .close-btn {
    top: 10px;
    right: 10px;
  }

  .cart-total {
    font-size: 1.05rem;
  }

  .account-head {
    align-items: start;
    padding-right: 40px;
  }

  .account-avatar {
    width: 46px;
    height: 46px;
  }

  .account-head h2 {
    font-size: 1.25rem;
  }

  .account-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .account-tabs {
    display: flex;
    flex-wrap: nowrap;
    margin-inline: -14px;
    padding: 8px 14px;
    overflow-x: auto;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }

  .tab-btn {
    flex: 0 0 auto;
    min-height: 42px;
    border-radius: 8px;
    scroll-snap-align: start;
  }

  .order-main,
  .order-timeline {
    grid-template-columns: 1fr;
  }

  .order-main img {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
  }

  .listing-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .listing-actions button,
  .cart-item button {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
    padding-top: 14px;
    font-size: 0.84rem;
  }

  .footer-grid {
    gap: 14px;
  }

  .site-footer {
    margin-top: 18px;
    padding: 24px 0 16px;
  }

  .footer-brand {
    gap: 10px;
  }

  .footer-brand p,
  .footer-column p,
  .footer-column a,
  .footer-link-btn {
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .footer-column {
    gap: 8px;
  }

  .footer-column h3 {
    margin-bottom: 2px;
    font-size: 0.96rem;
  }

  .toast {
    right: 12px;
    left: 12px;
    bottom: 12px;
    max-width: none;
  }
}

@media (max-width: 400px) {
  .hero h1 {
    font-size: 1.9rem;
  }

  main {
    width: min(100% - 18px, 1180px);
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

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

  .hero-stats,
  .admin-dashboard {
    grid-template-columns: repeat(3, minmax(72px, 1fr));
  }

  .preview-card,
  .preview-card.main {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .preview-card img {
    max-width: 48px;
    height: 48px;
  }

  .section-heading h2 {
    font-size: 1.5rem;
  }

  .modal-panel {
    padding: 16px 12px;
  }

  .account-tabs {
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .product-body {
    padding: 14px;
  }

  .site-footer {
    padding: 20px 0 14px;
  }

  .footer-grid {
    gap: 12px;
  }

  .footer-brand p,
  .footer-column p,
  .footer-column a,
  .footer-link-btn,
  .footer-bottom {
    font-size: 0.86rem;
  }
}
