:root {
  --blue-900: #003f73;
  --blue-800: #005a9c;
  --blue-700: #0073b5;
  --blue-600: #008dcc;
  --blue-100: #e8f6fb;
  --green-600: #4fb33f;
  --green-500: #62bd46;
  --green-100: #eaf7e4;
  --ink: #263645;
  --muted: #657384;
  --line: #d9e2e9;
  --panel: #ffffff;
  --surface: #f4f7f9;
  --shadow: 0 16px 40px rgba(0, 63, 115, 0.12);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--surface);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--surface);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 18px;
  color: #ffffff;
  background: linear-gradient(180deg, var(--blue-800), var(--blue-900));
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--blue-900);
  background: #ffffff;
  font-weight: 800;
  font-size: 24px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 22px;
  line-height: 1;
}

.brand small {
  margin-top: 3px;
  color: #d7eef8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 8px;
  margin-top: 36px;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: #d7eef8;
  background: transparent;
  text-align: left;
}

.nav-button:hover,
.nav-button.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.delivery-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 42px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.delivery-card span {
  display: block;
  margin-top: 4px;
  color: #d7eef8;
  font-size: 13px;
  line-height: 1.4;
}

.main-panel {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 76px;
  padding: 14px 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.mobile-brand {
  display: none;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 620px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.icon-button,
.account-button,
.filter-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.account-button,
.filter-button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 999px;
  padding: 0 14px;
  font-weight: 700;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 26px;
  margin: 28px 30px 20px;
  padding: 30px;
  overflow: hidden;
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(0, 63, 115, 0.97), rgba(0, 141, 204, 0.86)),
    #005a9c;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue-600);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-band .eyebrow {
  color: #b7ebff;
}

.hero-band h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(28px, 4vw, 50px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-band p:not(.eyebrow) {
  max-width: 650px;
  margin: 16px 0 0;
  color: #e7f7fd;
  font-size: 17px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
}

.primary-button {
  border: 0;
  color: #ffffff;
  background: var(--green-600);
}

.primary-button:hover {
  background: #3fa830;
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--blue-800);
  background: #ffffff;
}

.hero-image {
  min-height: 230px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(0, 63, 115, 0), rgba(0, 63, 115, 0.32)),
    url('https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=1200&q=80')
      center/cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0 30px 20px;
}

.metric-card,
.cart-panel,
.cards-panel,
.delivery-panel,
.catalog-panel,
.history-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 6px 22px rgba(0, 63, 115, 0.05);
}

.metric-card {
  display: flex;
  gap: 12px;
  min-height: 112px;
  padding: 18px;
}

.metric-card svg {
  color: var(--blue-700);
}

.metric-card span,
.metric-card small {
  color: var(--muted);
}

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

.metric-card strong {
  margin: 5px 0;
  font-size: 20px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 20px;
  margin: 0 30px 34px;
}

.catalog-panel {
  min-width: 0;
  padding: 22px;
}

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

.section-header.compact {
  margin-bottom: 14px;
}

.section-header h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: 0;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
}

.filters {
  border-right: 1px solid var(--line);
  padding-right: 18px;
}

.filter-group + .filter-group {
  margin-top: 24px;
}

.filter-title {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-link {
  display: flex;
  justify-content: space-between;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.filter-link:hover,
.filter-link.active {
  color: var(--blue-800);
  background: var(--blue-100);
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0;
  color: var(--ink);
  font-size: 14px;
}

.checkbox-line input {
  accent-color: var(--blue-700);
}

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

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.favorite-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--blue-800);
  background: rgba(255, 255, 255, 0.93);
}

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--blue-100);
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px;
}

.product-brand {
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 800;
}

.product-body h3 {
  min-height: 44px;
  margin: 6px 0;
  font-size: 16px;
  line-height: 1.35;
}

.product-body p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
  margin-bottom: 12px;
}

.tag-row span {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--blue-800);
  background: var(--blue-100);
  font-size: 11px;
  font-weight: 700;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
}

.price-row span,
.product-body small {
  color: var(--muted);
  font-size: 12px;
}

.product-body small {
  display: block;
  margin-top: 6px;
}

.quantity-row {
  display: grid;
  grid-template-columns: 40px 34px 1fr;
  align-items: center;
  gap: 8px;
  padding: 0 14px 14px;
}

.quantity-row span {
  text-align: center;
  font-weight: 800;
}

.quantity-button,
.add-button,
.cart-line button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.quantity-button {
  width: 40px;
  height: 38px;
  border: 1px solid var(--line);
  color: var(--blue-800);
  background: #ffffff;
}

.add-button {
  gap: 7px;
  min-height: 38px;
  border: 0;
  color: #ffffff;
  background: var(--blue-600);
  font-weight: 800;
}

.right-rail {
  display: grid;
  gap: 16px;
}

.cart-panel,
.cards-panel,
.delivery-panel {
  padding: 18px;
}

.cart-lines {
  display: grid;
  gap: 10px;
}

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

.cart-line strong,
.cart-line span {
  display: block;
}

.cart-line strong {
  font-size: 14px;
  line-height: 1.3;
}

.cart-line span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.cart-line button {
  width: 34px;
  height: 34px;
  border: 0;
  color: #ffffff;
  background: var(--green-600);
}

.cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 16px 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.cart-total span {
  color: var(--muted);
}

.cart-total strong {
  font-size: 22px;
}

.full {
  width: 100%;
}

.payment-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 74px;
  margin-bottom: 10px;
  padding: 14px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue-800), var(--blue-600));
}

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

.payment-card span {
  color: #d7eef8;
  font-size: 12px;
}

.payment-card strong {
  margin-top: 7px;
  font-size: 19px;
}

.payment-card em {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--blue-900);
  background: #ffffff;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.route-card {
  padding: 14px;
  border-radius: 8px;
  background: var(--green-100);
}

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

.route-card span {
  color: var(--green-600);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.route-card strong {
  margin-top: 6px;
}

.route-card p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.history-panel {
  margin: 0 30px 34px;
  padding: 22px;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.history-date {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.history-info strong {
  display: block;
  margin: 5px 0;
  font-size: 16px;
}

.history-info p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.history-eta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  color: var(--green-600);
  background: var(--green-100);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.eta-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--green-600);
  font-size: 11px;
}

.buy-again-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 46px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: var(--green-600);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 22px rgba(79, 179, 63, 0.32);
}

.buy-again-button:hover {
  background: #3fa830;
}

@media (max-width: 1260px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .right-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .mobile-brand {
    display: flex;
  }

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

@media (max-width: 860px) {
  .topbar {
    flex-wrap: wrap;
    padding: 14px 18px;
  }

  .search-box {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }

  .hero-band,
  .status-grid,
  .content-grid,
  .history-panel {
    margin-left: 18px;
    margin-right: 18px;
  }

  .hero-band {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .hero-image {
    min-height: 190px;
  }

  .status-grid,
  .right-rail {
    grid-template-columns: 1fr;
  }

  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .filters {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: 14px;
  }
}

@media (max-width: 620px) {
  .topbar-actions {
    margin-left: 0;
  }

  .account-button {
    max-width: 148px;
    overflow: hidden;
    white-space: nowrap;
  }

  .hero-band h1 {
    font-size: 30px;
  }

  .hero-actions,
  .section-header {
    align-items: stretch;
    flex-direction: column;
  }

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

  .metric-card {
    min-height: 96px;
  }

  .history-row {
    flex-direction: column;
    align-items: stretch;
  }

  .buy-again-button {
    width: 100%;
  }
}
