@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --border: #e6e8ef;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(37, 99, 235, 0.18);
  --text: #0f172a;
  --text-muted: #64748b;
  --radius: 12px;
  --font: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}

nav a:hover {
  background: var(--border);
  color: var(--accent);
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
}

.nav-cart-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.hero {
  text-align: center;
  padding: 4rem 0;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 520px;
  margin: 0 auto 2rem;
}

.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.cta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.2s, transform 0.2s;
}

.cta-card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 30px var(--accent-glow);
  transform: translateY(-2px);
}

.cta-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.cta-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--border);
  color: var(--accent);
}

.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}

.form-section h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

input, select, textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  margin-bottom: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.szablony-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.szablon-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.szablon-card:hover {
  border-color: var(--accent);
}

.szablon-card .thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--border) 0%, var(--accent) 40%, var(--surface) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(15, 23, 42, 0.75);
  font-size: 2.5rem;
}

.szablon-card .body {
  padding: 1.25rem;
}

.szablon-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.szablon-card .cena {
  color: var(--accent);
  font-weight: 600;
  font-size: 1.1rem;
}

.szablon-card .kategoria {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.wymiary-szablon {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 0.35rem 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.wymiary-szablon label {
  margin: 0;
  color: var(--text-muted);
}

.wymiary-szablon input {
  margin: 0;
  padding: 0.4rem 0.5rem;
  font-size: 0.9rem;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.alert-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #15803d;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #b91c1c;
}

.page-title {
  margin-bottom: 2rem;
}

.koszyk-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.koszyk-item:last-child {
  border-bottom: none;
}

.summary {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-weight: 600;
  font-size: 1.1rem;
}

.szablon-upload-box .upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
}

.upload-area {
  width: 220px;
  min-height: 180px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
}

.upload-placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
  margin: 0;
}

.upload-preview {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
}

.wymiary-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 140px;
}

.wymiary-block label {
  margin: 0;
}

.wymiary-block .btn {
  margin-top: 0.5rem;
}

.koszyk-item-szablon {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.koszyk-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.menu-kategorie {
  position: absolute;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem;
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.12);
  min-width: 220px;
}

.menu-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.menu-item:hover {
  background: rgba(37, 99, 235, 0.12);
  color: var(--accent);
}

.kategoria-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.muted {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.kategoria-wybrana {
  font-weight: 600;
  margin-top: 0.25rem;
}
