/* Formularze zamówień — wspólny wygląd (ArtMenu) */

.form-page {
  padding: 2.5rem 0 4rem;
  background: #fafafa;
}

.form-page__inner {
  max-width: 1100px;
}

.form-page-hero__sub {
  margin: .75rem 0 0;
  font-weight: 300;
  letter-spacing: .25em;
  text-transform: uppercase;
  font-size: clamp(.75rem, 2vw, .95rem);
  color: rgba(255,255,255,.85);
}

/* Sezonowy baner zamówienia (Wielkanoc / Boże Narodzenie) */
.form-order-header {
  margin-top: var(--am-header-h);
  background: no-repeat center center;
  background-size: cover;
  background-position: center 45%;
  min-height: clamp(280px, 42vw, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.75rem 1.25rem;
  color: #fff;
}

.form-order-header__overlay {
  background: rgba(0, 0, 0, 0.38);
  padding: 1.5rem 2rem;
  border-radius: 8px;
  max-width: 920px;
}

.form-order-header__logo {
  display: block;
  max-width: 200px;
  width: 100%;
  height: auto;
  margin: 0 auto 1rem;
}

.form-order-header__title {
  font-family: var(--am-display);
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0;
  color: #fff;
}

.form-order-header__sub {
  margin: .65rem 0 0;
  font-weight: 300;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-size: clamp(.72rem, 2vw, .9rem);
  color: rgba(255, 255, 255, .9);
}

.form-notice-wrap {
  margin: 1.25rem auto 0;
}

.form-notice-wrap .form-notice,
.form-notice {
  max-width: 1100px;
  margin: 0 auto 1.5rem;
  padding: 1.1rem 1.35rem;
  background: #fff;
  border: 1px solid var(--am-border);
  border-left: 4px solid var(--am-red);
  font-size: .95rem;
  line-height: 1.55;
  color: var(--am-gray-dark);
  box-sizing: border-box;
}

.form-notice-wrap .form-notice { margin-bottom: 0; }

.form-notice p { margin: 0 0 .5rem; }
.form-notice p:last-child { margin-bottom: 0; }
.form-notice strong { color: var(--am-gray-dark); }

.form-notice--season { border-left-color: var(--am-green); }
.form-notice--closed {
  border-left-color: var(--am-gray-mid);
  text-align: center;
  padding: 2rem 1.25rem;
}

/* Karty / sekcje — nie styluj .summary .container (pasek sticky) */
.form-card,
.form-page .container,
#indywidualna .container,
.login-container {
  background: #fff;
  border: 1px solid var(--am-border);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.75rem;
}

.form-card .section-title,
h1.title,
h2.category-title {
  font-family: var(--am-display);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--am-gray-mid);
  margin: 0 0 1.25rem;
  padding-bottom: .65rem;
  border-bottom: 2px solid var(--am-red);
  text-align: left;
}

h1.title { text-align: center; font-size: clamp(1.35rem, 3vw, 1.75rem); margin-bottom: 1.5rem; }
h2.category-title { margin-top: 2rem; text-align: center; }

.section-title {
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--am-gray-mid);
  margin: 1.25rem 0 .65rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--am-border);
}

.form-card .section-title { border-bottom-color: var(--am-red); }

hr {
  border: 0;
  height: 1px;
  background: var(--am-border);
  margin: 0 0 1.25rem;
}

/* Siatka pól */
.form-grid,
.client-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.25rem;
}

.form-grid .full,
.form-group.full-width { grid-column: 1 / -1; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 0;
}

.form-group label,
.am-form label {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--am-gray);
}

.form-group input,
.form-group select,
.form-group textarea,
#order-form input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
#order-form select,
#order-form textarea,
#form input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
#form select,
#form textarea {
  width: 100%;
  padding: .7rem .85rem;
  border: 1px solid #b7b7b7;
  border-radius: 0;
  font-family: var(--am-font);
  font-size: 1rem;
  color: var(--am-gray-dark);
  background: #fff;
  appearance: auto;
}

#order-form input[type="checkbox"],
#order-form input[type="radio"],
#form input[type="checkbox"],
#form input[type="radio"] {
  width: auto;
  padding: 0;
  border: 0;
  accent-color: var(--am-red);
}

#order-form input[type="range"],
#form input[type="range"] {
  width: auto;
  flex: 1;
  min-width: 120px;
  padding: 0;
  border: 0;
  accent-color: var(--am-red);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
#order-form input:focus,
#order-form select:focus,
#order-form textarea:focus,
#form input:focus,
#form select:focus,
#form textarea:focus {
  outline: none;
  border-color: var(--am-red);
}

.form-group textarea,
#order-form textarea,
#form textarea { min-height: 90px; resize: vertical; }

.form-group small,
.field-hint { font-size: .8rem; color: var(--am-gray); }

/* Kalendarz (catering / nf) */
.calendar-wrap,
#calendar-container {
  margin-bottom: .5rem;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.calendar-nav button {
  background: #fff;
  border: 1px solid var(--am-border);
  padding: .4rem .85rem;
  cursor: pointer;
  font-family: var(--am-font);
}

.calendar-nav button:hover { border-color: var(--am-red); color: var(--am-red); }

.calendar-nav .month-label {
  font-weight: 700;
  text-transform: capitalize;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

.calendar-table th {
  font-size: .75rem;
  text-transform: uppercase;
  color: var(--am-gray);
  padding: .5rem;
}

.calendar-table td {
  padding: .55rem;
  cursor: default;
}

.calendar-table td.valid {
  cursor: pointer;
}

.calendar-table td.valid:hover { background: rgba(224,43,32,.08); }

.calendar-table td.valid.selected {
  background: var(--am-red);
  color: #fff;
  font-weight: 700;
}

.calendar-table td.disabled { color: #ccc; }

/* Menu — catering */
.category-block h3 {
  font-family: var(--am-display);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--am-gray-mid);
  margin: 0 0 1rem;
}

.menu-item {
  border: 1px solid var(--am-border);
  padding: 1rem;
  margin-bottom: .75rem;
  background: #fff;
}

.menu-item.is-selected { border-color: var(--am-red); }

.menu-item-header {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}

.menu-item-header input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: .2rem;
}

.menu-item-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: .95rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--am-gray-dark);
  cursor: pointer;
  line-height: 1.4;
}

.menu-item-price {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--am-red);
  white-space: nowrap;
}
.menu-item-desc { margin: .5rem 0 0 1.75rem; font-size: .9rem; color: var(--am-gray); }
.menu-item-controls { display: none; align-items: center; gap: .75rem; margin-top: .75rem; padding-left: 1.75rem; }
.menu-item.is-selected .menu-item-controls { display: flex; }

/* Tabela produktów — ofsw / wn */
.product-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  background: #fff;
}

.product-table tr:nth-child(even) { background: #fafafa; }

.product-table th,
.product-table td {
  padding: .85rem .75rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--am-border);
}

.product-table th {
  font-size: .75rem;
  text-transform: uppercase;
  color: var(--am-gray);
  text-align: left;
  background: #f5f5f5;
}

.product-table th:not(:first-child),
.product-table td:not(:first-child) { text-align: right; }

.product-name { font-size: .95rem; color: var(--am-gray-dark); }

.product-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
}

.quantity-container {
  display: flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid var(--am-border);
  padding: .25rem .5rem;
  background: #fff;
}

.quantity-btn {
  background: var(--am-red);
  color: #fff;
  border: 0;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover { background: #c4241a; }

.quantity-display {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
}

.quantity-input { display: none; }

.switcher {
  width: 18px;
  height: 18px;
  accent-color: var(--am-red);
  cursor: pointer;
}

/* Podsumowanie */
.summary-table {
  width: 100%;
  border-collapse: collapse;
}

.summary-table th,
.summary-table td {
  padding: .65rem .5rem;
  border-bottom: 1px solid var(--am-border);
  text-align: left;
}

.summary-table th {
  font-size: .75rem;
  text-transform: uppercase;
  color: var(--am-gray);
}

.summary-table .num { text-align: right; }

.summary-total,
.order-summary .total {
  text-align: right;
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 1rem;
  color: var(--am-gray-dark);
}

.order-summary {
  margin: 2rem 0;
  padding: 1.25rem;
  background: #fafafa;
  border: 1px solid var(--am-border);
}

.order-summary h3 {
  font-family: var(--am-display);
  font-size: 1rem;
  text-transform: uppercase;
  margin: 0 0 .75rem;
  color: var(--am-gray-mid);
}

.order-summary ul { margin: 0; padding-left: 1.2rem; }

/* Pasek dolny (sticky) */
.summary,
.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: var(--am-black);
  color: #fff;
  padding: .9rem 1.25rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,.25);
  border: 0;
  margin: 0;
}

.summary-content {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .85rem 1.5rem;
  background: transparent;
  border: 0;
  padding: 0;
}

.summary__hint {
  margin: 0;
  font-size: .9rem;
  font-weight: 400;
  color: rgba(255, 255, 255, .72);
  letter-spacing: .02em;
}

.summary__total {
  margin: 0;
  font-size: 1.05rem;
  color: #fff;
  white-space: nowrap;
}

.summary__total strong,
.summary .finalPrice {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.price-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.sticky-bar {
  display: none;
  justify-content: space-between;
  align-items: center;
}

.sticky-bar.visible { display: flex; }

body.has-sticky,
body.form-app:has(.summary) { padding-bottom: 88px; }

/* Zgody / RODO */
.agreements,
.legal-block {
  margin: 1.5rem 0;
  font-size: .9rem;
  line-height: 1.55;
}

.agreements .form-group,
.legal-block label {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.agreements input,
.legal-block input { width: auto; margin-top: .2rem; flex-shrink: 0; }

#invoiceForm {
  border: 1px solid var(--am-border);
  padding: 1rem;
  margin: 1rem 0;
  background: #fafafa;
}

#invoiceForm h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 1rem;
  text-align: left;
  color: var(--am-gray-mid);
}

/* Przyciski */
.btn,
.btn-primary,
#submit-order,
.summary .btn,
.price-info .btn,
.sticky-bar .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .75rem 1.5rem;
  border: 0;
  border-radius: 2px;
  font-family: var(--am-font);
  font-weight: 300;
  font-size: .95rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff !important;
  background: var(--am-red);
  cursor: pointer;
  transition: background .2s ease;
}

.btn:hover,
.btn-primary:hover:not(:disabled),
.summary .btn:hover { background: #c4241a; }

.btn-primary:disabled,
#submit-order:disabled { opacity: .45; cursor: not-allowed; }

.form-actions { text-align: center; margin-top: 1.5rem; }

/* Komunikaty */
.error-messages,
.alert-error,
.form-msg {
  background: #fff5f5;
  border-left: 4px solid var(--am-red);
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
}

.error,
.alert-error { color: #a94442; }

.alert-success,
.form-msg--ok {
  background: #f3faf5;
  border-left-color: var(--am-green);
}

.order-closed-message {
  text-align: center;
  padding: 3rem 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.order-closed-message h2 {
  font-family: var(--am-display);
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--am-gray-mid);
}

.thanks-box {
  text-align: center;
  padding: 3rem 1rem;
}

.thanks-box h2 {
  font-family: var(--am-display);
  font-size: 1.5rem;
  text-transform: uppercase;
  color: var(--am-gray-mid);
}

.content-wrap { max-width: none; padding: 0; }

/* Motywy sezonowe (ofsw) */
.theme-christmas .form-notice { border-left-color: var(--am-red); }
.theme-christmas h1.title,
.theme-christmas h2.category-title { border-bottom-color: var(--am-red); }
.theme-christmas .quantity-btn { background: var(--am-red); }

.theme-easter .form-notice { border-left-color: var(--am-green); }
.theme-easter h1.title,
.theme-easter h2.category-title { border-bottom-color: var(--am-green); }
.theme-easter .quantity-btn { background: var(--am-green); }
.theme-easter .quantity-btn:hover { background: var(--am-green-hover); }

@media (max-width: 768px) {
  .form-grid,
  .client-info { grid-template-columns: 1fr; }
  .sticky-bar.visible { display: flex; }
  .summary-content {
    flex-direction: column;
    text-align: center;
    gap: .65rem;
  }
  .price-info {
    margin-left: 0;
    justify-content: center;
    width: 100%;
  }
  .summary__hint { font-size: .8rem; }
  .form-order-header { min-height: 240px; padding: 2rem 1rem; }
  .form-order-header__overlay { padding: 1rem 1.15rem; }
  .form-order-header__logo { max-width: 150px; }
}
