/* Guarantee [hidden] always hides, even against our own display:flex/grid
   rules below (same CSS specificity, so cascade order would otherwise
   decide it — don't rely on that). */
[hidden] { display: none !important; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* --- Header -------------------------------------------------------------- */
.site-header {
  background: var(--color-accent);
  color: var(--color-on-accent);
  padding: var(--space-md) 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: var(--weight-bold);
  font-size: var(--text-lead);
  color: var(--color-on-accent);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgb(255 255 255 / 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lead);
}

.header-link {
  color: var(--color-on-accent);
  font-weight: var(--weight-medium);
  font-size: var(--text-body);
  opacity: 0.9;
}
.header-link:hover { color: var(--color-on-accent); opacity: 1; }

/* --- Hero ------------------------------------------------------------------ */
.hero {
  background: var(--color-surface);
  padding: var(--space-2xl) 0;
  text-align: center;
}

.hero h1 { margin-bottom: var(--space-md); }

.hero-lead {
  font-size: var(--text-lead);
  line-height: var(--leading-lead);
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto var(--space-lg);
}

/* --- Sections --------------------------------------------------------------- */
section.page-section {
  padding: var(--space-xl) 0;
}

.section-heading {
  margin-bottom: var(--space-lg);
  text-align: center;
}

/* --- Item grid --------------------------------------------------------------- */
.item-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 480px) {
  .item-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .item-grid { grid-template-columns: repeat(4, 1fr); }
}

.item-card {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  box-shadow: var(--shadow-sm);
}

.item-card .item-type {
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
}

.item-card .item-name {
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  font-weight: var(--weight-semibold);
}

.item-card .item-price {
  font-size: var(--text-lead);
  font-weight: var(--weight-bold);
  color: var(--color-accent);
}

.item-card .item-price span {
  font-size: var(--text-caption);
  color: var(--color-text-muted);
  font-weight: var(--weight-regular);
}

/* --- Buttons ------------------------------------------------------------------ */
.btn {
  border: 1px solid transparent;
  padding: 0 var(--space-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
}
.btn-primary:hover { background: var(--color-accent-hover); }
.btn-primary:disabled { background: var(--color-border-strong); cursor: not-allowed; }

.btn-secondary {
  background: var(--color-surface-raised);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}
.btn-secondary:hover { background: var(--color-surface); }

/* --- Booking panel (overlay) --------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgb(15 24 32 / 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}

@media (min-width: 768px) {
  .overlay { align-items: center; }
}

.overlay[hidden] { display: none; }

.booking-panel {
  background: var(--color-bg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
  .booking-panel { border-radius: var(--radius-lg); }
}

.booking-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  gap: var(--space-md);
}

.booking-panel-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: var(--text-lead);
  padding: var(--space-sm);
}
.booking-panel-close:hover { color: var(--color-text); }

.field-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.field-group label {
  font-size: var(--text-caption);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
}

.field-group input {
  min-height: var(--touch-target);
  padding: 0 var(--space-md);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  font-size: var(--text-body);
  font-family: inherit;
  background: var(--color-surface-raised);
  color: var(--color-text);
}

.field-group input:focus-visible {
  border-color: var(--color-accent);
}

.date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* --- Feedback states (Recognize -> Diagnose -> Recover) ------------------------ */
.feedback {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid;
  margin-bottom: var(--space-md);
  font-size: var(--text-body);
}

.feedback-icon { flex-shrink: 0; font-size: var(--text-lead); line-height: 1; }

.feedback-success {
  background: var(--color-success-subtle);
  border-color: var(--color-success);
  color: var(--color-success);
}

.feedback-error {
  background: var(--color-danger-subtle);
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.feedback-loading {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
  color: var(--color-text-muted);
}

/* --- Footer --------------------------------------------------------------------- */
.site-footer {
  background: var(--color-surface);
  padding: var(--space-xl) 0;
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-caption);
}

.site-footer a { color: var(--color-accent); font-weight: var(--weight-medium); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
