/* =====================================================
   Gastro & Events page
   ===================================================== */

:root {
  --gastro-control-radius: 14px;
}

.page--gastro {
  min-height: 100vh;
  padding-top: calc(60px + 78px);
  color: black;
}

.gastro-hero {
  width: min(1040px, 92vw);
  margin: 0 auto clamp(1.5rem, 4vw, 3rem);
  color: black;
  text-align: center;
}

.gastro-hero .headline-large {
  margin-bottom: clamp(0.85rem, 2vw, 1.3rem);
}

.gastro-hero__copy {
  max-width: 640px;
  margin: 0 auto;
  color: black;
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  line-height: 1.42;
}

.gastro-panel {
  width: min(1040px, 92vw);
  margin: 0 auto var(--spacing-xl);
  padding: clamp(0.75rem, 2vw, 1.25rem);
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 28px;
  background: white;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.12);
  backdrop-filter: none;
}

.gastro-panel p {
  color: rgba(0, 0, 0, 0.58);
}

.gastro-panel > .gastro-choice-grid {
  margin-bottom: clamp(0.8rem, 2vw, 1.25rem);
}

.gastro-form {
  display: flex;
  flex-direction: column;
  gap: clamp(0.8rem, 2vw, 1.25rem);
}

.gastro-card {
  width: 100%;
  margin: 0;
  padding: clamp(1.15rem, 3vw, 2rem);
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  background: white;
  box-shadow: none;
}

.gastro-card--primary {
  border-color: rgba(0, 0, 0, 0.1);
  background: white;
}

.gastro-card__header,
.gastro-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-m);
}

.gastro-card__title {
  display: block;
  margin: 0;
  color: black;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.12;
  text-align: left;
  text-transform: uppercase;
}

.gastro-card__copy {
  display: block;
  margin: 0.4rem 0 0;
  color: rgba(0, 0, 0, 0.56);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  line-height: 1.35;
  text-align: left;
}

.gastro-card__badge {
  flex: 0 0 auto;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(90, 255, 21, 0.28);
  color: black;
  font-size: var(--font-size-small);
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gastro-field-grid,
.gastro-submit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.6vw, 1.55rem);
  margin-top: clamp(1.2rem, 3vw, 1.85rem);
}

.gastro-field-grid .form-field--full {
  grid-column: 1 / -1;
}

.gastro-submit-grid {
  align-items: end;
}

.form-clue,
.gastro-contact-hint {
  min-height: 1.1em;
  margin: 0.35rem 0 0;
  color: rgba(0, 0, 0, 0.58);
  font-size: var(--font-size-small);
  line-height: 1.3;
  text-align: left;
}

.gastro-form .form-label {
  color: black;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.gastro-form .form-input {
  min-height: 46px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: var(--gastro-control-radius);
  background: #f5f5f7;
  color: black;
  padding: 0.62rem 0.9rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.gastro-form .form-input:focus {
  border-color: rgba(0, 0, 0, 0.28);
  background: white;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
}

.gastro-form .form-input::placeholder {
  color: rgba(0, 0, 0, 0.38);
}

.form-field.has-error .form-input {
  border-color: rgba(0, 0, 0, 0.28);
  background: white;
}

.form-field.has-error .form-clue {
  color: black;
  font-weight: 700;
}

.gastro-panel .form-feedback--error {
  border-color: rgba(0, 0, 0, 0.18);
  background: #f5f5f7;
  color: black;
}

.gastro-panel .form-feedback--success {
  border-color: rgba(0, 0, 0, 0.18);
  background: #f5f5f7;
  color: black;
}

.gastro-contact-hint {
  color: rgba(0, 0, 0, 0.64);
}

.gastro-card.gastro-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1rem);
  border: 0;
  padding: 0;
  background: transparent;
}

.gastro-choice-grid > legend {
  grid-column: 1 / -1;
  margin-bottom: var(--spacing-xs);
}

.gastro-choice {
  display: flex;
  position: relative;
  min-height: 132px;
  cursor: pointer;
}

.gastro-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gastro-choice__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  padding: clamp(1rem, 2.4vw, 1.45rem);
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: var(--gastro-control-radius);
  background: #f5f5f7;
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.gastro-choice__body * {
  cursor: pointer;
}

.gastro-choice input:checked + .gastro-choice__body {
  border-color: transparent;
  background: black;
  color: white;
  box-shadow: none;
}

.gastro-choice input:checked + .gastro-choice__body .gastro-choice__title,
.gastro-choice input:checked + .gastro-choice__body .gastro-choice__text {
  color: white;
}

.gastro-choice:hover .gastro-choice__body {
  transform: translateY(-2px);
}

.gastro-choice__title {
  margin: 0 0 0.45rem;
  color: black;
  font-size: clamp(0.98rem, 1.55vw, 1.16rem);
  line-height: 1.15;
  text-transform: uppercase;
}

.gastro-choice__text {
  margin: 0;
  color: rgba(0, 0, 0, 0.68);
  font-size: var(--font-size-regular);
  line-height: 1.35;
}

.gastro-collapsible {
  padding: 0;
  overflow: hidden;
}

.gastro-toggle-row {
  width: 100%;
  padding: clamp(1.15rem, 3vw, 2rem);
  box-sizing: border-box;
  cursor: pointer;
}

.gastro-toggle-row * {
  cursor: pointer;
}

.gastro-toggle-row:focus-visible {
  outline: 3px solid rgba(0, 0, 0, 0.16);
  outline-offset: -6px;
}

.gastro-collapsible__body {
  padding: 0 clamp(1.15rem, 3vw, 2rem) clamp(1.15rem, 3vw, 2rem);
  animation: gastroReveal 0.24s ease-out both;
}

@keyframes gastroReveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toggle-switch {
  flex: 0 0 auto;
  display: inline-flex;
  cursor: pointer;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-switch__track {
  position: relative;
  width: 54px;
  height: 32px;
  border-radius: 999px;
  background: #d8d8dc;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  transition: background-color var(--transition-fast);
}

.toggle-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  transition: transform var(--transition-fast);
}

.toggle-switch input:checked + .toggle-switch__track {
  background: black;
}

.toggle-switch input:checked + .toggle-switch__track::after {
  transform: translateX(22px);
}

.gastro-quantity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1rem);
}

.gastro-quantity {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: var(--spacing-s);
  min-height: 118px;
  padding: clamp(0.8rem, 2vw, 1rem);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--gastro-control-radius);
  background: #f5f5f7;
}

.gastro-quantity__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
}

.gastro-quantity__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gastro-quantity__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: var(--radius-full);
  font-size: var(--font-size-small);
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gastro-quantity__content {
  display: grid;
  gap: var(--spacing-xs);
  min-width: 0;
}

.gastro-quantity label {
  color: black;
  font-size: var(--font-size-regular);
  font-weight: bold;
  line-height: 1.15;
  text-align: left;
  text-transform: uppercase;
}

.gastro-quantity label small {
  margin-left: 0.35em;
  font-size: var(--font-size-small);
  font-weight: normal;
  white-space: nowrap;
}

.gastro-quantity__amount {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  justify-self: start;
}

.gastro-quantity input {
  width: 5.5rem;
  max-width: 100%;
  box-sizing: border-box;
}

.gastro-quantity__amount span {
  color: rgba(0, 0, 0, 0.62);
  font-size: var(--font-size-regular);
  line-height: 1;
  white-space: nowrap;
}

.gastro-quantity-note {
  grid-column: 1 / -1;
  margin: 0;
  color: rgba(0, 0, 0, 0.58);
  font-size: var(--font-size-small);
  line-height: 1.35;
  text-align: left;
}

.gastro-quantity--total {
  grid-column: 1 / -1;
  display: block;
  min-height: 0;
  border-color: rgba(0, 0, 0, 0.1);
  background: white;
}

.gastro-quantity--total .gastro-quantity__content {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--spacing-xs) var(--spacing-m);
}

.gastro-quantity__total-label,
.gastro-quantity__total-value,
.gastro-quantity__bottle-total,
.gastro-quantity__minimum {
  margin: 0;
}

.gastro-quantity__total-label,
.gastro-quantity__total-value {
  color: black;
  font-size: var(--font-size-big);
  font-weight: bold;
  text-transform: uppercase;
}

.gastro-quantity__bottle-total {
  flex-basis: 100%;
  color: rgba(0, 0, 0, 0.64);
  font-size: var(--font-size-regular);
  text-align: right;
}

.gastro-quantity__bottle-total strong {
  color: black;
}

.gastro-quantity__minimum {
  flex-basis: 100%;
  color: rgba(0, 0, 0, 0.64);
  font-size: var(--font-size-regular);
  text-align: left;
}

.gastro-quantity__minimum.is-reached {
  color: black;
  font-weight: 700;
}

.gastro-form__actions {
  display: flex;
  justify-content: flex-end;
}

.gastro-form__actions .button {
  min-height: 52px;
  width: min(100%, 320px);
  border-color: transparent;
  background: black;
  color: white;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.gastro-form__actions .button:hover {
  border-color: transparent;
  background: #f5f5f7;
  color: black;
}

.gastro-form__actions .button:disabled {
  opacity: 0.55;
  cursor: wait;
}

#gastroFeedback {
  width: 100%;
  margin: 0;
}

@media (max-width: 860px) {
  .page--gastro {
    padding-top: 84px;
  }

  .gastro-hero,
  .gastro-panel {
    width: min(100%, calc(100vw - var(--spacing-s)));
  }

  .gastro-panel {
    padding: 0.7rem;
    border-radius: 22px;
  }

  .gastro-card {
    padding: clamp(1rem, 4vw, 1.45rem);
    border-radius: 18px;
  }

  .gastro-card.gastro-choice-grid {
    padding: 0;
  }

  .gastro-card__header,
  .gastro-toggle-row {
    align-items: flex-start;
  }

  .gastro-field-grid,
  .gastro-submit-grid,
  .gastro-choice-grid,
  .gastro-quantity-grid {
    grid-template-columns: 1fr;
  }

  .gastro-choice {
    min-height: 0;
  }

  .gastro-choice__body {
    min-height: 112px;
  }

  .gastro-quantity--total {
    grid-column: auto;
  }

  .gastro-form__actions,
  .gastro-form__actions .button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .page--gastro {
    padding-top: 72px;
  }

  .gastro-hero {
    margin-bottom: var(--spacing-s);
  }

  .gastro-hero__copy {
    font-size: 1rem;
  }

  .gastro-card {
    padding: 1rem;
  }

  .gastro-card.gastro-choice-grid {
    padding: 0;
  }

  .gastro-toggle-row {
    padding: 1rem;
  }

  .gastro-collapsible__body {
    padding: 0 1rem 1rem;
  }

  .gastro-card__badge {
    display: none;
  }

  .gastro-quantity {
    grid-template-columns: 68px minmax(0, 1fr);
    min-height: 96px;
  }

  .gastro-quantity__media {
    width: 68px;
    height: 68px;
  }
}
