:root {
  --pink: #ff8fab;
  --pink-dark: #ff6b8a;
  --cream: #fff5f7;
  --milk: #fffaf0;
  --brown: #5c4033;
  --green: #7ec8a3;
  --shadow: 0 8px 24px rgba(255, 107, 138, 0.15);
  --radius: 16px;
}

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

body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: linear-gradient(160deg, #fff5f7 0%, #ffeef2 40%, #fffaf0 100%);
  color: var(--brown);
  min-height: 100vh;
  line-height: 1.5;
}

/* NAV */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.5rem;
  background: white;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 1.25rem;
}

.logo {
  font-size: 1.8rem;
}

.brand-text strong {
  color: var(--pink-dark);
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav-btn {
  background: transparent;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--brown);
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn:hover {
  background: var(--cream);
}

.nav-btn.primary {
  background: var(--pink);
  color: white;
}

.nav-btn.primary:hover {
  background: var(--pink-dark);
}

.badge {
  background: var(--pink-dark);
  color: white;
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  margin-left: 0.2rem;
}

/* PAGES */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

.hidden {
  display: none !important;
}

/* HERO */
.hero {
  text-align: center;
  padding: 2rem 1rem;
}

.hero h1 {
  font-size: 2.4rem;
  color: var(--pink-dark);
  margin-bottom: 0.4rem;
}

.hero p {
  color: #8a6a5c;
  font-size: 1.1rem;
}

/* FILTERS */
.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filters input,
.filters select {
  padding: 0.7rem 1rem;
  border: 2px solid #ffd6e0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  background: white;
  outline: none;
  transition: border 0.2s;
}

.filters input:focus,
.filters select:focus {
  border-color: var(--pink);
}

.filters input {
  flex: 1;
  min-width: 200px;
}

/* PRODUCTS GRID */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.4rem;
}

.product-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(255, 107, 138, 0.22);
}

.product-emoji {
  font-size: 4.5rem;
  text-align: center;
  padding: 1.5rem 1rem;
  background: linear-gradient(135deg, #fff0f3, #fffaf0);
}

.product-info {
  padding: 1rem 1.2rem 1.3rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-info h3 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.product-info .desc {
  font-size: 0.9rem;
  color: #8a6a5c;
  margin-bottom: 0.6rem;
  flex: 1;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.price {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--pink-dark);
}

.stock {
  font-size: 0.85rem;
  color: #888;
}

.stock.low {
  color: #e74c3c;
  font-weight: 700;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.3rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn.primary {
  background: var(--pink);
  color: white;
}

.btn.primary:hover {
  background: var(--pink-dark);
}

.btn.secondary {
  background: #f0e6e0;
  color: var(--brown);
}

.btn.danger {
  background: #ff6b6b;
  color: white;
}

.btn.full {
  width: 100%;
}

.btn.link {
  background: none;
  color: var(--pink-dark);
  text-decoration: underline;
  margin-top: 0.8rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* CART */
#cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: white;
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cart-item .emoji {
  font-size: 2.5rem;
}

.cart-item .info {
  flex: 1;
}

.cart-item .qty-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-item .qty-controls button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--cream);
  font-weight: 700;
  cursor: pointer;
}

.cart-summary {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: right;
}

.cart-summary p {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

/* FORMS */
.form-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 480px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #ffd6e0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--pink);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.checkbox label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  cursor: pointer;
}

.checkbox input {
  width: auto;
}

.switch-auth {
  text-align: center;
  margin-top: 1.2rem;
  font-size: 0.95rem;
}

.switch-auth a {
  color: var(--pink-dark);
  font-weight: 700;
  text-decoration: none;
}

.switch-auth a:hover {
  text-decoration: underline;
}

.code-input {
  font-size: 1.8rem !important;
  letter-spacing: 0.5rem;
  text-align: center;
  font-weight: 800;
}

.sms-info {
  margin-bottom: 0.5rem;
  text-align: center;
}

.sms-demo {
  background: #fff3cd;
  border: 1px dashed #ffc107;
  padding: 0.7rem;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brown);
  color: white;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  z-index: 999;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  transition: opacity 0.3s, transform 0.3s;
}

.toast.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
}

.toast.success {
  background: var(--green);
}

.toast.error {
  background: #e74c3c;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: #aaa;
  font-size: 0.9rem;
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #aaa;
}

.empty-state .big {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
}

/* ORDERS / HISTORIA ZAKUPÓW */
#orders-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.order-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.3rem;
  background: linear-gradient(135deg, #fff0f3, #fffaf0);
  border-bottom: 1px solid #ffd6e0;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.order-header .order-id {
  font-weight: 800;
  color: var(--pink-dark);
}

.order-header .order-date {
  font-size: 0.9rem;
  color: #8a6a5c;
}

.order-header .order-status {
  background: var(--green);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.order-items {
  padding: 1rem 1.3rem;
}

.order-item-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f5e8ec;
}

.order-item-row:last-child {
  border-bottom: none;
}

.order-item-row .emoji {
  font-size: 1.8rem;
}

.order-item-row .name {
  flex: 1;
  font-weight: 600;
}

.order-item-row .qty-price {
  color: #8a6a5c;
  font-size: 0.95rem;
}

.order-footer {
  display: flex;
  justify-content: flex-end;
  padding: 0.9rem 1.3rem;
  background: #fafafa;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--pink-dark);
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .navbar {
    flex-direction: column;
    gap: 0.7rem;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .form-row {
    flex-direction: column;
  }
}
