:root {
  --bg: #eef6fb;
  --ink: #142a3b;
  --card: #ffffff;
  --line: #d4e4f0;
  --accent: #207c9f;
  --danger: #b32020;
  --ok: #0c8f55;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: linear-gradient(180deg, #f8fdff, var(--bg));
  color: var(--ink);
  min-height: 100vh;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

header.site {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

nav a {
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

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

.product h3 {
  margin-bottom: 0.4rem;
}

.product-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.7rem;
  border: 1px solid var(--line);
  background: #eaf3f8;
}

.muted {
  color: #506274;
}

.price {
  margin-top: 0.4rem;
  font-weight: 700;
}

.flash {
  padding: 0.65rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.flash.ok {
  background: #e3fff1;
  border: 1px solid #b6f0d1;
  color: var(--ok);
}

.flash.error {
  background: #ffebeb;
  border: 1px solid #f2c5c5;
  color: var(--danger);
}

form {
  display: grid;
  gap: 0.55rem;
}

input,
textarea,
select,
button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem;
  font: inherit;
}

button {
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.inline {
  display: inline;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 0;
}

.total {
  font-size: 1.05rem;
  font-weight: 700;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.5rem;
}

footer {
  text-align: center;
  color: #597082;
  font-size: 0.9rem;
  margin-top: 1.1rem;
}

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .grid { grid-template-columns: 1fr; }
  header.site { flex-direction: column; align-items: flex-start; }
}
