:root {
  color-scheme: light;
  --ink: #172326;
  --muted: #637074;
  --paper: #f4f7f2;
  --white: #ffffff;
  --line: #dce5df;
  --field: #fbfcf8;
  --teal: #0b766f;
  --deep: #103438;
  --leaf: #64aa3b;
  --plum: #8b3fa0;
  --amber: #d7a326;
  --rose: #b24c6f;
  --sky: #e8f6f4;
  --shadow: 0 16px 38px rgba(23, 35, 38, .1);
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(11, 118, 111, .08) 1px, transparent 1px),
    linear-gradient(180deg, #fdfefb 0%, #f2f7ef 46%, #f7f2f8 100%);
  background-size: 28px 28px, auto;
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

img {
  display: block;
}

h1,
h2,
h3,
p {
  margin: 0;
}

p {
  font-size: 16px;
  line-height: 1.55;
}

h1 {
  max-width: 860px;
  font-size: clamp(32px, 5vw, 62px);
  line-height: .98;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(23px, 3vw, 34px);
  line-height: 1.05;
  letter-spacing: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 42px);
  border-bottom: 1px solid rgba(220, 229, 223, .92);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
}

.brand {
  color: var(--ink);
  display: grid;
  gap: 2px;
  text-decoration: none;
}

.brand span {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand small,
.eyebrow,
.panel-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar a,
.topbar button,
.detail button,
.checkout button,
.drawer footer button,
.drawer footer a,
.product button,
.cart-panel button,
.featured-shelf button,
.quick-kits button {
  min-height: 42px;
  border: 1px solid var(--deep);
  border-radius: 8px;
  background: var(--deep);
  color: var(--white);
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 900;
  line-height: 1;
}

.topbar nav a {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
}

.cart-trigger strong {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  margin-left: 5px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--deep);
}

main {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 68px;
}

.order-desk {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.desk-intro {
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 285px;
  padding: clamp(22px, 4vw, 42px);
  border-left: 8px solid var(--teal);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.desk-intro p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
}

.desk-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.desk-status div {
  display: grid;
  gap: 6px;
  min-height: 132px;
  align-content: center;
  padding: 18px;
  background: var(--white);
}

.desk-status span {
  color: var(--plum);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.desk-status strong {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.workflow-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.workflow-board article {
  display: grid;
  gap: 8px;
  min-height: 126px;
  align-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.workflow-board strong {
  font-size: 20px;
}

.workflow-board p {
  color: var(--muted);
  font-size: 14px;
}

.buying-shell {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(230px, 280px);
  gap: 16px;
  align-items: start;
}

.cart-panel,
.filters,
.detail,
.checkout,
.drawer-box,
.product,
.featured-shelf {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.cart-panel {
  position: sticky;
  top: 82px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 20px;
  min-height: 460px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.cart-panel strong {
  display: block;
  margin-top: 8px;
  color: var(--teal);
  font-size: 34px;
}

.cart-panel p {
  color: var(--muted);
  font-size: 14px;
}

.cart-panel button {
  border-color: var(--plum);
  background: var(--plum);
}

.cart-mini {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: 250px;
  overflow: auto;
  padding-right: 4px;
}

.cart-mini-empty {
  color: var(--muted);
  font-size: 13px;
}

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

.cart-mini-item img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.cart-mini-item strong {
  display: -webkit-box;
  margin: 0 0 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cart-mini-item span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.catalog-workbench {
  display: grid;
  gap: 12px;
}

.quick-kits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.quick-kits button {
  background: #f8fbf5;
  color: var(--ink);
  border-color: var(--line);
}

.quick-kits button.is-active {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

.catalog-layout {
  display: grid;
  gap: 14px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  padding: 14px;
}

.filters-title {
  align-self: center;
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

input,
select {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  padding: 0 12px;
}

.switch-row {
  grid-template-columns: 18px 1fr;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
}

.switch-row input {
  min-height: 18px;
  width: 18px;
  accent-color: var(--teal);
}

.catalog-area {
  display: grid;
  gap: 10px;
}

.catalog-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 6px 4px;
}

.catalog-head p:last-child {
  max-width: 390px;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.catalog-grid {
  display: grid;
  gap: 10px;
}

.product {
  position: relative;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  overflow: hidden;
  min-height: 166px;
  box-shadow: 0 10px 22px rgba(23, 35, 38, .05);
}

.product.is-highlight::before {
  content: "Destaque";
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  border-radius: 999px;
  background: var(--amber);
  color: var(--deep);
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 900;
}

.product img,
.fallback-image {
  width: 100%;
  height: 100%;
  min-height: 166px;
  object-fit: contain;
  background: linear-gradient(135deg, #ffffff, var(--sky));
}

.product-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, auto);
  gap: 8px 14px;
  align-items: center;
  padding: 14px;
}

.product h3 {
  min-height: 0;
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.product p {
  grid-column: 1;
  color: var(--muted);
  font-size: 14px;
}

.product-meta,
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-meta {
  grid-column: 1;
}

.product-meta span,
.product-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: #f7fbf3;
}

.product-tags {
  grid-column: 1;
}

.price {
  color: var(--rose);
  font-size: 24px;
  font-weight: 900;
}

.product .price {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  white-space: nowrap;
}

.product-actions {
  display: grid;
  grid-column: 2;
  grid-row: 3 / span 2;
  gap: 8px;
  justify-self: stretch;
}

.product-actions button:first-child {
  background: transparent;
  color: var(--ink);
}

.product-actions button:last-child,
.featured-shelf button,
.detail button,
.checkout button,
.drawer footer a {
  border-color: var(--teal);
  background: var(--teal);
}

.featured-shelf {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.featured-shelf img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
}

.featured-shelf strong {
  font-size: 20px;
  line-height: 1.12;
}

.featured-shelf p {
  color: var(--muted);
  font-size: 14px;
}

.featured-shelf .price {
  font-size: 26px;
}

.detail,
.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 24px;
}

.detail button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.checkout {
  grid-template-columns: minmax(240px, .8fr) minmax(260px, 1.2fr);
  align-items: start;
}

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

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

.checkout form button,
.checkout output {
  grid-column: 1 / -1;
}

.checkout output {
  min-height: 28px;
  color: var(--teal);
  font-weight: 900;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  justify-content: end;
  background: rgba(16, 52, 56, .52);
}

.drawer.is-open {
  display: flex;
}

.drawer-box {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(450px, 100%);
  height: 100%;
  border-radius: 0;
  border-right: 0;
}

.drawer header,
.drawer footer {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.drawer header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.drawer header button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

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

.cart-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.cart-item img {
  width: 74px;
  height: 74px;
  border-radius: 8px;
  object-fit: contain;
  background: #f6fbf2;
}

.cart-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.25;
}

.quantity-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.quantity-row button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-weight: 900;
}

.quantity-row button:last-child {
  width: auto;
  padding: 0 10px;
}

.drawer footer {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.total-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
}

.drawer footer button {
  background: transparent;
  color: var(--ink);
}

.drawer footer a {
  text-align: center;
}

@media (max-width: 1180px) {
  .order-desk,
  .buying-shell {
    grid-template-columns: 1fr;
  }

  .cart-panel,
  .featured-shelf {
    position: static;
  }

  .featured-shelf {
    grid-template-columns: 160px minmax(0, 1fr);
    align-items: center;
  }

  .featured-shelf .panel-label,
  .featured-shelf button {
    grid-column: 1 / -1;
  }

  .switch-row {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .topbar,
  .topbar nav {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .cart-trigger {
    grid-column: 1 / -1;
  }

  main {
    width: min(100% - 24px, 1320px);
    padding-top: 16px;
  }

  .desk-intro {
    min-height: 0;
    padding: 22px;
  }

  .desk-status,
  .workflow-board,
  .filters,
  .checkout,
  .checkout form,
  .detail,
  .featured-shelf {
    grid-template-columns: 1fr;
  }

  .product {
    grid-template-columns: 88px minmax(0, 1fr);
    min-height: 0;
  }

  .product img,
  .fallback-image {
    min-height: 142px;
  }

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

  .product .price,
  .product-actions,
  .product p,
  .product-meta,
  .product-tags {
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
  }

  .catalog-head {
    display: grid;
  }

  .catalog-head p:last-child {
    text-align: left;
  }
}
