:root {
  color-scheme: light;
  --ink: #10140f;
  --muted: #5b635c;
  --line: #d7ddd4;
  --paper: #f7f8f4;
  --panel: #ffffff;
  --copper: #d96f3d;
  --gold: #c9a227;
  --signal: #167f7a;
  --blue: #2d77a8;
  --danger: #a33a2b;
  --shadow: 0 14px 36px rgba(16, 20, 15, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  padding: 0 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button-link:hover {
  background: #273027;
}

button.secondary {
  background: #fff;
  color: var(--ink);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 244, 0.94);
  padding: 14px clamp(18px, 5vw, 64px);
  backdrop-filter: blur(12px);
}

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

.brand {
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 6px;
  background: var(--ink);
  color: var(--gold);
  font-size: 15px;
  letter-spacing: 0;
}

.site-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  min-height: 36px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover {
  border-color: var(--gold);
  color: var(--ink);
}

.count {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--copper);
  color: #fff;
  font-size: 13px;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 54px;
}

.shop-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 28px;
  align-items: stretch;
  min-height: 230px;
  margin-bottom: 24px;
}

.intro-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 6px solid var(--gold);
  padding: 18px 0 18px 24px;
}

.eyebrow,
.category {
  margin: 0 0 8px;
  color: var(--signal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro-copy h1,
.detail-copy h1,
.content-page h1,
.basket-view h1,
.admin-header h1,
.admin-panel h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 0.98;
  letter-spacing: 0;
}

.intro-copy p:last-child,
.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 19px;
}

.intro-panel {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  justify-content: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
  box-shadow: var(--shadow);
}

.intro-panel span {
  color: var(--copper);
  font-size: 68px;
  font-weight: 900;
  line-height: 1;
}

.intro-panel p {
  margin: 10px 0 0;
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}

.filters button {
  min-height: 38px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.filters button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

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

.product-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.product-image-link {
  display: block;
  aspect-ratio: 1.28;
  background: #e8ede7;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-copy {
  flex: 1;
  padding: 18px 18px 0;
}

.product-copy h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.2;
}

.product-copy h2 a {
  text-decoration: none;
}

.summary {
  margin: 0;
  color: var(--muted);
}

.product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
}

.price {
  font-size: 18px;
}

.add-button {
  min-width: 78px;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 34px;
  align-items: start;
}

.detail-media {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e8ede7;
}

.detail-media img {
  display: block;
  width: 100%;
  aspect-ratio: 1.22;
  object-fit: cover;
}

.detail-copy {
  padding-top: 10px;
}

.detail-copy p {
  color: var(--muted);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
}

.detail-actions strong {
  font-size: 26px;
}

.stock,
.fine-print {
  color: var(--muted);
  font-size: 14px;
}

.basket-view,
.content-page {
  max-width: 840px;
}

.basket-list {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

.basket-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.basket-row img {
  width: 96px;
  height: 74px;
  border-radius: 6px;
  object-fit: cover;
}

.basket-row h2 {
  margin: 0;
  font-size: 18px;
}

.basket-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.quantity {
  display: grid;
  grid-template-columns: 38px 34px 38px;
  align-items: center;
  text-align: center;
}

.quantity button {
  min-width: 38px;
  min-height: 38px;
  padding: 0;
}

.basket-summary {
  display: grid;
  gap: 10px;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.basket-summary p {
  margin: 0;
}

.basket-summary strong {
  font-size: 28px;
}

.content-page {
  border-left: 6px solid var(--blue);
  padding-left: 24px;
}

.content-page p {
  color: var(--muted);
  font-size: 18px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 26px;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 24px clamp(18px, 5vw, 64px);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  margin-left: 12px;
  font-weight: 700;
}

.admin-login,
.admin-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
}

.admin-login {
  max-width: 520px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.admin-header h1,
.admin-panel h1 {
  font-size: 42px;
}

.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 20px;
  box-shadow: var(--shadow);
}

.admin-panel + .admin-panel {
  margin-top: 22px;
}

.admin-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

.admin-form textarea {
  min-height: 104px;
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
}

.check {
  align-content: end;
}

.check input {
  width: auto;
  min-height: 0;
}

.admin-products {
  display: grid;
  gap: 18px;
}

.admin-product {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.admin-product.is-archived {
  opacity: 0.7;
}

.notice {
  border-radius: 6px;
  padding: 12px;
}

.notice.error {
  background: #fff0ee;
  color: var(--danger);
}

@media (max-width: 820px) {
  .site-header,
  .site-footer,
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .shop-intro,
  .product-detail,
  .basket-row {
    grid-template-columns: 1fr;
  }

  .intro-copy h1,
  .detail-copy h1,
  .content-page h1,
  .basket-view h1 {
    font-size: 40px;
  }

  .basket-row img {
    width: 100%;
    height: auto;
    aspect-ratio: 1.6;
  }

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

@media (max-width: 480px) {
  .app-shell,
  .admin-login,
  .admin-shell {
    width: min(100% - 20px, 1120px);
  }

  .site-header {
    padding-inline: 12px;
  }

  .product-actions,
  .detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  button,
  .button-link {
    width: 100%;
  }
}
