:root {
  --ink: #11110f;
  --paper: #f4f2e9;
  --white: #fffefa;
  --lime: #d8ff3e;
  --muted: #77776f;
  --line: rgba(17, 17, 15, 0.18);
  --danger: #b62e22;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", Arial, sans-serif;
}

body.layer-open { overflow: hidden; }

[hidden] { display: none !important; }

button,
input,
select { font: inherit; }

button { color: inherit; }

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(104, 130, 0, 0.35);
  outline-offset: 2px;
}

img { display: block; max-width: 100%; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 clamp(18px, 4vw, 64px);
  background: rgba(255, 254, 250, 0.95);
  border-bottom: 1px solid var(--ink);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
  width: max-content;
  color: inherit;
  text-decoration: none;
  line-height: 1;
}

.brand strong {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.09em;
}

.brand span,
.header-note,
.eyebrow,
.results-row,
.product-meta,
.order-code,
.status-pill {
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.brand span { padding-bottom: 3px; font-size: 9px; }

.header-note {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 9px;
}

.header-note i {
  width: 5px;
  height: 5px;
  background: var(--lime);
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.header-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.header-button:hover { background: var(--lime); }

.header-button-icon {
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  font-size: 19px;
  line-height: 1;
}

.cart-button {
  color: var(--lime);
  background: var(--ink);
}

.cart-button:hover { color: var(--ink); }

.cart-button strong {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  color: var(--ink);
  background: var(--lime);
  border-radius: 999px;
  font-size: 10px;
}

.catalog {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(58px, 8vw, 112px) clamp(15px, 4vw, 58px) 80px;
}

.catalog-intro {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 50px;
  align-items: end;
  margin-bottom: 58px;
}

.eyebrow {
  display: block;
  margin-bottom: 22px;
  font-size: 10px;
}

h1 {
  margin: 0;
  font-size: clamp(58px, 7.2vw, 112px);
  line-height: 0.88;
  letter-spacing: -0.075em;
}

h1 em {
  font-family: Georgia, serif;
  font-weight: 400;
}

.catalog-intro p {
  max-width: 420px;
  margin: 0 0 6px;
  color: #55554f;
  font-size: 15px;
  line-height: 1.65;
}

.catalog-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  padding: 20px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.search-box {
  min-width: 280px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--ink);
}

.search-box input {
  width: 100%;
  padding: 10px 2px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.search-box > span:last-child { font-size: 22px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.filters button,
.empty-state button {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.filters button:hover,
.filters button.active {
  color: var(--lime);
  border-color: var(--ink);
  background: var(--ink);
}

.results-row {
  display: flex;
  justify-content: space-between;
  padding: 18px 2px;
  color: var(--muted);
  font-size: 9px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.product-card {
  min-width: 0;
  background: var(--white);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.product-image {
  position: relative;
  aspect-ratio: 1 / 0.9;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f0efe9;
}

.product-image img {
  width: 82%;
  height: 78%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img { transform: scale(1.07); }

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 8px;
  background: var(--lime);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 500;
}

.product-content {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  padding: 17px 16px 18px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 8px;
}

.product-content h2 {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
}

.price strong { font-size: 17px; }
.price s { color: var(--muted); font-size: 10px; }

.add-button {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--lime);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.add-button:hover { transform: rotate(90deg); background: var(--white); }

.buy-button {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.buy-button:hover {
  background: var(--ink);
  color: var(--white);
  transform: translateY(-2px);
}

.empty-state {
  min-height: 320px;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  border-bottom: 1px solid var(--ink);
}

.empty-state:not([hidden]) { display: grid; }
.empty-state strong { font-size: 25px; }
.empty-state p { margin: 0; color: var(--muted); }
.empty-state button { margin-top: 8px; border-color: var(--ink); background: var(--lime); }

.page-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(17, 17, 15, 0.56);
  backdrop-filter: blur(3px);
}

.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: min(480px, 100%);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-left: 1px solid var(--ink);
  box-shadow: -20px 0 50px rgba(17, 17, 15, 0.14);
  overflow: hidden;
}

.account-panel { width: min(650px, 100%); }

.panel-header {
  min-height: 106px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--ink);
}

.panel-header .eyebrow { margin: 0 0 8px; color: var(--muted); }

.panel-header h2 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.icon-button {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.icon-button:hover { background: var(--lime); }

.cart-items,
.account-content {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cart-empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 30px;
  text-align: center;
}

.cart-empty span { font-size: 46px; }
.cart-empty strong { font-size: 22px; }
.cart-empty p { max-width: 280px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.cart-item {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 14px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.cart-item-image {
  width: 92px;
  height: 86px;
  display: grid;
  place-items: center;
  background: #f0efe9;
}

.cart-item-image img { width: 80%; height: 76%; object-fit: contain; mix-blend-mode: multiply; }

.cart-item-info { min-width: 0; }
.cart-item-info h3 { margin: 0 0 8px; font-size: 12px; line-height: 1.35; }
.cart-item-info > span { display: block; margin-bottom: 13px; font-size: 12px; font-weight: 700; }

.quantity-control {
  width: max-content;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.quantity-control button {
  width: 28px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.quantity-control button:hover { background: var(--lime); }
.quantity-control span { min-width: 25px; text-align: center; font-size: 11px; }

.remove-button {
  align-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
}

.cart-footer {
  padding: 21px 25px 18px;
  border-top: 1px solid var(--ink);
  background: var(--paper);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 8px;
  font-size: 12px;
}

.summary-total {
  margin: 16px 0 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button { color: var(--lime); background: var(--ink); }
.primary-button:hover { color: var(--ink); background: var(--lime); }
.primary-button:disabled { opacity: 0.4; cursor: not-allowed; }
.secondary-button { background: transparent; }
.secondary-button:hover { background: var(--lime); }

.panel-note,
.form-disclaimer {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

.login-view {
  min-height: 100%;
  display: grid;
  align-content: center;
  padding: 38px clamp(24px, 8vw, 64px);
}

.login-view h3 { margin: 0 0 10px; font-size: 30px; letter-spacing: -0.045em; }
.login-view > p { margin: 0 0 28px; color: var(--muted); font-size: 13px; line-height: 1.6; }

.login-form { display: grid; gap: 15px; }

.field { display: grid; gap: 7px; }
.field > span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }

.field input,
.field select,
.tracking-form input {
  width: 100%;
  min-height: 47px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: 0;
}

.account-dashboard { padding-bottom: 30px; }

.account-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px;
  background: var(--lime);
  border-bottom: 1px solid var(--ink);
}

.account-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.account-avatar { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; color: var(--lime); background: var(--ink); border-radius: 50%; font-weight: 800; }
.account-identity strong,
.account-identity span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-identity strong { margin-bottom: 3px; font-size: 14px; }
.account-identity span { font-size: 10px; }

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.account-section { padding: 25px 26px 0; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.section-heading h3 { margin: 0; font-size: 19px; letter-spacing: -0.035em; }
.section-heading span { color: var(--muted); font-size: 10px; }

.tracking-form { display: flex; gap: 8px; }
.tracking-form input { min-width: 0; text-transform: uppercase; }
.tracking-form button { width: auto; min-height: 47px; white-space: nowrap; }
.tracking-result { margin-top: 12px; }
.tracking-error { margin: 10px 0 0; color: var(--danger); font-size: 12px; }

.orders-list { display: grid; gap: 12px; }

.order-card { border: 1px solid var(--ink); background: var(--white); }
.order-card.compact .order-products,
.order-card.compact .order-progress { display: none; }

.order-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
}

.order-code { display: block; margin-bottom: 5px; font-size: 10px; font-weight: 500; }
.order-date { color: var(--muted); font-size: 10px; }
.order-total { text-align: right; }
.order-total strong { display: block; font-size: 15px; }

.status-pill {
  display: inline-flex;
  margin-top: 5px;
  padding: 4px 7px;
  background: var(--lime);
  border-radius: 999px;
  font-size: 7px;
  white-space: nowrap;
}

.status-pill.delivered { color: var(--white); background: var(--ink); }

.order-products { display: grid; gap: 6px; padding: 13px 15px; font-size: 10px; border-bottom: 1px solid var(--line); }
.order-product { display: flex; justify-content: space-between; gap: 15px; }
.order-product span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.order-progress { padding: 17px 15px 15px; }
.progress-track { position: relative; height: 3px; margin: 8px 9px 12px; background: #d7d6cf; }
.progress-fill { height: 100%; background: var(--ink); }
.progress-steps { position: absolute; inset: 50% 0 auto; display: flex; justify-content: space-between; transform: translateY(-50%); }
.progress-dot { width: 15px; height: 15px; background: var(--white); border: 2px solid #b7b6af; border-radius: 50%; }
.progress-dot.done { background: var(--lime); border-color: var(--ink); }
.progress-labels { display: grid; grid-template-columns: repeat(4, 1fr); color: var(--muted); font-size: 7px; text-align: center; }
.progress-labels span:first-child { text-align: left; }
.progress-labels span:last-child { text-align: right; }

.delivery-note { margin: 12px 0 0; padding-top: 11px; border-top: 1px dashed var(--line); font-size: 10px; }
.no-orders { margin: 0; padding: 22px; color: var(--muted); background: rgba(17, 17, 15, 0.04); font-size: 12px; text-align: center; }

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  pointer-events: none;
}

.modal-card {
  width: min(680px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--ink);
  box-shadow: 0 24px 70px rgba(17, 17, 15, 0.3);
  pointer-events: auto;
}

.checkout-form { padding: 24px 26px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.field-wide { grid-column: 1 / -1; }

.checkout-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 15px;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}

.checkout-summary span { font-size: 12px; }
.checkout-summary strong { font-size: 24px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  color: var(--lime);
  background: var(--ink);
  border: 1px solid var(--lime);
  box-shadow: 0 10px 30px rgba(17, 17, 15, 0.25);
  font-size: 12px;
  text-align: center;
  transform: translateX(-50%);
}

.payment-return-page {
  min-height: 100dvh;
  background:
    linear-gradient(rgba(17, 17, 15, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 15, 0.055) 1px, transparent 1px),
    var(--paper);
  background-size: 38px 38px;
}

.payment-return-header { grid-template-columns: 1fr auto; }
.payment-return-header .eyebrow { margin: 0; }

.payment-return-main {
  min-height: calc(100dvh - 78px);
  display: grid;
  place-items: center;
  padding: clamp(24px, 6vw, 80px);
}

.payment-return-card {
  width: min(850px, 100%);
  padding: clamp(30px, 7vw, 78px);
  background: var(--white);
  border: 1px solid var(--ink);
  box-shadow: 18px 18px 0 var(--lime);
}

.payment-return-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 38px;
  color: var(--lime);
  background: var(--ink);
  border-radius: 50%;
  font-size: 25px;
  font-weight: 800;
}

.payment-return-card h1 {
  margin-bottom: 30px;
  font-size: clamp(48px, 7vw, 88px);
}

.payment-return-card > p {
  max-width: 630px;
  margin: 0;
  color: #55554f;
  font-size: 15px;
  line-height: 1.7;
}

.payment-return-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 34px;
}

.payment-return-actions a {
  display: grid;
  place-items: center;
  color: inherit;
  text-align: center;
  text-decoration: none;
}

.payment-return-actions .primary-button { color: var(--lime); }
.payment-return-actions .primary-button:hover { color: var(--ink); }

.payment-return-card small {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

@media (max-width: 1080px) {
  .site-header { grid-template-columns: 1fr auto; }
  .header-note { display: none; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .catalog-tools { align-items: stretch; flex-direction: column; }
  .search-box { min-width: 0; width: 100%; }
  .filters { justify-content: flex-start; }
}

@media (max-width: 700px) {
  .site-header { min-height: 68px; gap: 10px; padding: 0 13px; }
  .brand strong { font-size: 27px; }
  .brand span { display: none; }
  .header-button { min-height: 36px; padding: 7px 10px; }
  .header-button-icon,
  #account-button-label { display: none; }
  #account-button::after { content: "Cont"; }
  .catalog { padding-top: 58px; }
  .catalog-intro { grid-template-columns: 1fr; gap: 24px; margin-bottom: 40px; }
  h1 { font-size: clamp(52px, 17vw, 80px); }
  .catalog-intro p { font-size: 14px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .filters button { flex: 0 0 auto; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-content { min-height: 204px; padding: 13px 11px 15px; }
  .product-meta { flex-direction: column; gap: 4px; }
  .product-content h2 { font-size: 12px; }
  .product-actions { align-items: flex-end; }
  .price { display: grid; gap: 2px; }
  .results-row { align-items: flex-start; flex-direction: column; gap: 7px; }
  .panel-header { min-height: 92px; padding: 20px 18px 16px; }
  .panel-header h2 { font-size: 24px; }
  .cart-item { grid-template-columns: 76px 1fr auto; gap: 11px; padding: 15px 17px; }
  .cart-item-image { width: 76px; height: 76px; }
  .cart-footer { padding: 18px 17px 15px; }
  .account-hero,
  .account-section { padding-left: 18px; padding-right: 18px; }
  .tracking-form { align-items: stretch; flex-direction: column; }
  .tracking-form button { width: 100%; }
  .modal-shell { padding: 0; }
  .modal-card { width: 100%; max-height: 100dvh; border: 0; }
  .checkout-form { padding: 20px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .progress-labels { font-size: 6px; }
  .payment-return-header .eyebrow { display: none; }
  .payment-return-main { min-height: calc(100dvh - 68px); padding: 22px; }
  .payment-return-card { padding: 30px 22px; box-shadow: 9px 9px 0 var(--lime); }
  .payment-return-card h1 { font-size: clamp(42px, 13vw, 60px); }
  .payment-return-actions { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-content { min-height: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
