/* === Basis & Reset === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #fff8f0;
  color: #2b1810;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* === Topbar / Warenkorb-Icon === */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 248, 240, 0.95);
  backdrop-filter: blur(8px);
}

.menu-button,
.cart-button {
  position: relative;
  background: none;
  border: none;
  font-size: 28px;
  padding: 6px;
  cursor: pointer;
  color: #2b1810;
}
.cart-button {
font-size: 20px;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #c0392b;
  color: white;
  font-size: 12px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* === Swiper / Pizza-Karten === */
.main-swiper {
  width: 100%;
}

.swiper-slide {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8px 20px 28px;
}

.pizza-card {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.pizza-name {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  flex: 1;
  text-align: center;
}

.pizza-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  display: block;
}

.name-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nav-arrow {
  background: none;
  border: none;
  font-size: 44px;
  line-height: 1;
  font-weight: 700;
  color: #2b1810;
  cursor: pointer;
  padding: 0 8px;
  transition: color 0.15s;
}

.nav-arrow:hover {
  color: #e67e22;
}

.swiper-slide:first-child .nav-arrow-prev,
.swiper-slide:last-child .nav-arrow-next {
  visibility: hidden;
}

.pizza-ingredients {
  font-size: 16px;
  color: #555;
  margin: 0;
  width: 100%;
  text-align: center;
}

.pizza-price {
  font-size: 24px;
  font-weight: 700;
  color: #c0392b;
  margin: 0;
}

.add-buttons {
  width: 100%;
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.add-button {
  flex: 1;
  background: #e67e22;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.size-label {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cart-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.size-price {
  font-weight: 700;
  white-space: nowrap;
}

.add-button:hover {
  background: #d35400;
}

.add-button:active {
  transform: scale(0.98);
}

.add-button.added {
  background: #27ae60;
}

.swiper-pagination{
  margin-top:50px;
}

.swiper-pagination-bullet {
  background: #c0392b;
}

/* === Fehlerzustand === */
.error-state {
  max-width: 480px;
  margin: 40px auto;
  padding: 24px;
  text-align: center;
}

.error-state pre {
  background: #2b1810;
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  display: inline-block;
}

.error-state code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* === Modal === */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal[hidden] {
  display: none;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
}

.modal h2 {
  margin: 0 0 16px;
  text-align: center;
}

.cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

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

.cart-item-price {
  white-space: nowrap;
}

.cart-item-remove {
  background: none;
  border: none;
  color: #c0392b;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s;
}

.cart-item-remove:hover {
  background: #fde8e4;
}

.order-note-label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-size: 14px;
  color: #555;
  font-weight: 600;
}

.order-note {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
  color: #2b1810;
  background: #fff;
}

.order-note:focus {
  outline: none;
  border-color: #e67e22;
}

.delivery-options {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.delivery-option {
  flex: 1;
  background: #fff;
  color: #2b1810;
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.delivery-option:hover {
  border-color: #e67e22;
}

.delivery-option.is-selected {
  background: #e67e22;
  color: #fff;
  border-color: #e67e22;
}

.delivery-fields {
  margin-top: 8px;
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-col {
  display: flex;
  flex-direction: column;
}

.form-col-grow {
  flex: 2;
}

.form-col-narrow {
  flex: 1;
}

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 18px;
  font-weight: 700;
  margin-top: 8px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.btn-primary {
  background: #e67e22;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary {
  background: transparent;
  color: #555;
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 12px;
  font-size: 15px;
  cursor: pointer;
}

.empty-cart,
.confirmation {
  text-align: center;
  padding: 16px 0;
}

.order-number {
  font-size: 32px;
  font-weight: 700;
  color: #c0392b;
  margin: 12px 0;
}

/* === Menü-Liste === */
.menu-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.menu-list li {
  border-bottom: 1px solid #eee;
}

.menu-list li:last-child {
  border-bottom: none;
}

.menu-list .menu-heading {
  font-size: 24px;
  font-weight: 700;
  text-align: left;
  padding: 16px 8px 8px;
  border-bottom: none;
  color: #2b1810;
}

.menu-list .menu-heading:first-child {
  padding-top: 0;
}


.menu-list button {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-size: 18px;
  padding: 16px 8px;
  cursor: pointer;
  color: #2b1810;
  font-family: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.menu-prices {
  font-weight: 600;
  color: #555;
  font-size: 15px;
  white-space: pre;
}

.menu-list button:hover,
.menu-list button:focus-visible {
  background: #fff8f0;
  outline: none;
}
