:root {
  --bg: #faf7f4;
  --bg-soft: #f3efe9;
  --surface: #ffffff;
  --ink: #3a3432;
  --ink-muted: #6e6662;
  --ink-faint: #9a918c;
  --pink: #f1b1d1;
  --pink-deep: #d48998;
  --aubergine: #6b4f5b;
  --aubergine-soft: #8a6a76;
  --line: #e4ddd6;
  --line-strong: #cfc5bc;
  --green: #2f6b4f;
  --green-dot: #3d8b66;
  --link: #6b5b8c;
  --shadow: 0 12px 40px rgba(58, 52, 50, 0.12);
  --radius: 2px;
  --font-display: "Josefin Sans", "Source Sans 3", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --max: 920px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(232, 168, 180, 0.18), transparent 55%),
    linear-gradient(180deg, #fcfaf8 0%, var(--bg) 40%, #f6f1ec 100%);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.app {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 7rem;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.title {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6.5vw, 3.35rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--pink);
}

.intro {
  margin: 0 auto 1.15rem;
  max-width: 40rem;
  font-size: 0.92rem;
  line-height: 1.55;
  font-weight: 400;
  color: var(--ink);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem 0.35rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.82rem;
  color: var(--ink);
  font-weight: 400;
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--green-dot);
  flex-shrink: 0;
}

/* Order bar */
.order-bar {
  margin: 0 auto 2.75rem;
  max-width: 34rem;
  text-align: center;
}

.fulfillment {
  display: inline-flex;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
}

.fulfill-btn {
  min-width: 7.5rem;
  padding: 0.55rem 1.1rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.fulfill-btn:hover {
  border-color: var(--aubergine-soft);
}

.fulfill-btn.is-active {
  background: var(--bg-soft);
  border-color: var(--aubergine);
  color: var(--aubergine);
}

.meta-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.meta-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  max-width: 100%;
  font-size: 0.86rem;
  color: var(--ink-muted);
  text-align: left;
}

.meta-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  margin-top: 0.12rem;
  color: var(--aubergine-soft);
}

.meta-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.4rem;
  line-height: 1.4;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font-size: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--aubergine);
}

/* Catalog */
.catalog {
  text-align: center;
}

.cat-heading {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.15rem);
  font-weight: 500;
  color: var(--aubergine);
  letter-spacing: 0.02em;
}

.cat-sub {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--aubergine-soft);
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  text-align: left;
}

@media (min-width: 700px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.95rem 1rem;
  }
}

.product-card {
  display: grid;
  grid-template-columns: 1fr minmax(88px, 38%);
  min-height: 118px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.25s ease;
  animation: cardIn 0.45s ease both;
}

.product-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 24px rgba(58, 52, 50, 0.08);
  transform: translateY(-1px);
}

.product-card:focus-visible {
  outline: 2px solid var(--aubergine);
  outline-offset: 2px;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-info {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 0.9rem 0.8rem;
  min-width: 0;
}

.product-name {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

.product-subtitle {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink-muted);
}

.product-desc {
  margin: 0;
  flex: 1;
  font-size: 0.75rem;
  line-height: 1.4;
  font-weight: 300;
  color: var(--ink-faint);
  overflow: visible;
}

.product-price {
  margin-top: 0.55rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}

.product-media {
  position: relative;
  background: var(--bg-soft);
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.04);
}

/* Cart FAB */
.cart-fab {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem 0.7rem 0.85rem;
  background: var(--aubergine);
  color: #fff;
  border: 0;
  border-radius: 999px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.cart-fab:hover {
  background: #5a404c;
  transform: translateY(-2px);
}

.cart-fab svg {
  width: 1.25rem;
  height: 1.25rem;
}

.cart-fab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--pink);
  color: var(--aubergine);
  font-size: 0.72rem;
  font-weight: 700;
}

.cart-fab-total {
  font-size: 0.88rem;
  font-weight: 600;
}

/* Modals */
.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@media (min-width: 640px) {
  .modal {
    align-items: center;
    padding: 1.5rem;
  }
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 32, 30, 0.42);
  animation: fadeIn 0.2s ease;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  max-height: min(92dvh, 92vh, 760px);
  overflow: auto;
  background: var(--surface);
  border-radius: 12px 12px 0 0;
  box-shadow: var(--shadow);
  padding: 1.35rem 1.25rem 1.5rem;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  animation: slideUp 0.28s ease;
}

@media (min-width: 640px) {
  .modal-panel {
    border-radius: 10px;
  }
}

.modal-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink-faint);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.modal-close:hover {
  color: var(--ink);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Product modal */
.product-modal {
  width: min(100%, 480px);
  padding: 0;
}

.pm-media {
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
  overflow: hidden;
}

.pm-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pm-body {
  padding: 1.15rem 1.25rem 1.4rem;
}

.pm-body h2 {
  margin: 0 0 0.45rem;
  padding-right: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--aubergine);
}

.pm-desc {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-muted);
  font-weight: 300;
  white-space: pre-line;
}

.pm-price {
  margin: 0 0 1.1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.qty-row label {
  font-size: 0.9rem;
  font-weight: 500;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
}

.qty-control button {
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  background: var(--bg-soft);
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--aubergine);
}

.qty-control input {
  width: 2.6rem;
  height: 2.2rem;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  -moz-appearance: textfield;
}

.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Time / cart forms */
.time-modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  max-height: min(92dvh, 92vh);
  padding: 0;
  overflow: hidden;
}

.time-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 1.25rem 1.15rem 0.75rem;
  padding-right: max(1.15rem, env(safe-area-inset-right));
  padding-left: max(1.15rem, env(safe-area-inset-left));
}

.time-modal-footer {
  flex-shrink: 0;
  padding: 0.75rem 1.15rem calc(0.85rem + env(safe-area-inset-bottom));
  padding-right: max(1.15rem, env(safe-area-inset-right));
  padding-left: max(1.15rem, env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.time-modal-footer .btn-primary {
  margin-top: 0;
  min-height: 3rem;
  font-size: 1rem;
}

.time-modal h2,
.cart-modal h2,
.success-modal h2 {
  margin: 0 0 0.5rem;
  padding-right: 2rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 5vw, 1.7rem);
  font-weight: 600;
  color: var(--aubergine);
}

.tm-hint {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink-muted);
  font-weight: 300;
}

.field-label {
  display: block;
  margin: 0.85rem 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--aubergine-soft);
}

.field-input {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  font-size: 16px; /* verhindert iOS-Zoom */
  line-height: 1.3;
  outline: none;
  transition: border-color 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}

.field-input:focus {
  border-color: var(--aubergine);
}

input[type="date"].field-input {
  min-height: 3rem;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(5.5rem, 0.85fr) 1.4fr;
  gap: 0.65rem;
}

.time-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.time-slot {
  min-height: 2.75rem;
  padding: 0.55rem 0.35rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.time-slot:hover {
  border-color: var(--aubergine-soft);
}

.time-slot.is-active {
  background: var(--aubergine);
  border-color: var(--aubergine);
  color: #fff;
}

.time-slot:focus-visible {
  outline: 2px solid var(--aubergine);
  outline-offset: 2px;
}

.btn-primary {
  display: block;
  width: 100%;
  margin-top: 1.15rem;
  padding: 0.85rem 1rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--aubergine);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-primary:hover:not(:disabled) {
  background: #5a404c;
}

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

  .field-row {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 640px) {
  .time-modal {
    width: min(100%, 440px);
    max-height: min(85vh, 720px);
    border-radius: 10px;
  }

  .time-slot-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

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

/* Cart */
.cart-modal {
  width: min(100%, 480px);
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.cart-empty {
  padding: 1.5rem 0;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.92rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.7rem;
  align-items: start;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.cart-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.cart-item-name {
  margin: 0 0 0.2rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.cart-item-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.cart-item-actions button {
  width: 1.6rem;
  height: 1.6rem;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  line-height: 1;
  color: var(--aubergine);
}

.cart-item-price {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.cart-remove {
  border: 0 !important;
  background: transparent !important;
  color: var(--ink-faint) !important;
  font-size: 0.75rem !important;
  width: auto !important;
  height: auto !important;
  text-decoration: underline;
  cursor: pointer;
}

.cart-summary {
  margin-bottom: 1rem;
}

.cart-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 600;
}

.cart-line.muted {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ink-faint);
}

.cart-line.muted.warn {
  color: #a35a4a;
}

.checkout-form h3 {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--aubergine);
}

.checkout-form textarea {
  resize: vertical;
  min-height: 4rem;
}

/* Success */
.success-modal {
  text-align: center;
  padding-top: 2rem;
}

.success-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.85rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(61, 139, 102, 0.12);
  color: var(--green);
  font-size: 1.4rem;
  font-weight: 700;
}

.success-modal p {
  margin: 0 0 0.5rem;
  color: var(--ink-muted);
  font-weight: 300;
  line-height: 1.5;
}

/* Wix iframe: reduce outer chrome */
@media (max-width: 480px) {
  .app {
    padding-top: 1.5rem;
  }
}
