/* ===== Kalkulator Stali STAM ===== */
:root {
  --stam-red: #a8150a;
  --stam-red-light: #fff3f2;
  --grey-border: #d6d6d6;
  --grey-text: #666;
}

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

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #fafafa;
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Nagłówek ---------- */
.appbar {
  background: var(--stam-red);
  color: #fff;
  padding: 14px 16px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}
.appbar h1 { font-size: 20px; font-weight: bold; }

/* ---------- Treść ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

.subtitle {
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  color: var(--grey-text);
  margin: 8px 0 16px;
}

/* ---------- Siatka kategorii ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

.cat-card {
  background: #fff;
  border: 1px solid var(--grey-border);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  transition: box-shadow .15s, transform .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.cat-card:hover {
  box-shadow: 0 3px 10px rgba(168,21,10,.25);
  transform: translateY(-2px);
}
.cat-card img { max-height: 72px; max-width: 100%; object-fit: contain; }
.cat-card span {
  color: var(--stam-red);
  font-weight: bold;
  font-size: 13px;
}

/* ---------- Kalkulator ---------- */
.calc-box { max-width: 480px; margin: 0 auto; }

.drawing-card {
  background: #fff;
  border: 1px solid var(--grey-border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.drawing-card img { max-height: 160px; max-width: 100%; object-fit: contain; }

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}
.row label {
  flex: 1;
  text-align: right;
  font-weight: bold;
  font-size: 14px;
}
.row input[type="text"], .row select {
  width: 110px;
  padding: 8px;
  border: 1px solid var(--grey-border);
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
  background: #fff;
}
.row select { width: 190px; text-align: left; }
.row .unit { width: 44px; color: var(--grey-text); font-size: 13px; }

/* ---------- Wyniki ---------- */
.results-panel {
  background: var(--stam-red-light);
  border: 1.5px solid var(--stam-red);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 16px;
}
.results-title {
  text-align: center;
  font-weight: bold;
  color: var(--stam-red);
  font-size: 15px;
}
.results-panel hr { border: none; border-top: 1px solid #e5b8b4; margin: 10px 0; }
.res-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}
.res-row .res-label { flex: 1; text-align: right; font-weight: bold; font-size: 14px; }
.res-row .res-value {
  width: 110px;
  text-align: center;
  font-weight: bold;
  color: var(--stam-red);
  font-size: 14px;
}
.res-row .res-unit { width: 44px; color: var(--grey-text); font-size: 13px; }
.res-row.highlight .res-label,
.res-row.highlight .res-value { font-size: 16px; }

/* ---------- Info ---------- */
.info-box {
  background: #f0f0f0;
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--grey-text);
  white-space: pre-line;
}

/* ---------- Baner ---------- */
.banner {
  background: var(--stam-red);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.banner-title {
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: .5px;
  text-decoration: underline;
}
.banner-services {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.2px;
}
.banner-btn {
  width: 230px;
  text-align: center;
  background: #fff;
  color: var(--stam-red);
  font-weight: bold;
  font-size: 13px;
  padding: 10px 0;
  border-radius: 20px;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0,0,0,.25);
  transition: background .15s;
}
.banner-btn:hover { background: #ffe3e0; }

/* ---------- Przycisk powrotu ---------- */
.back-btn {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--stam-red);
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}
.back-btn:hover { text-decoration: underline; }
