/**
 * Cito Booking — frontend styles.
 *
 * Self-contained and theme agnostic. Two things to know:
 *
 * 1. Layout width. Block themes constrain direct children of the post content
 *    to `settings.layout.contentSize` (this theme uses 720px) through a rule
 *    like `.wp-block-post-content.is-layout-constrained > * { max-width: 720px }`.
 *    Our root wrappers escape that (`.cito-booking.cito-booking`, specificity
 *    0-2-0) so the width is controlled by `--cito-content-width` instead.
 *
 * 2. Typography. Type sizes are expressed in `em` so they scale from whatever
 *    the theme sets. `--cito-font` defaults to `inherit` and `--cito-font-base`
 *    is only emitted when the site owner picks an explicit size in the plugin
 *    settings, which keeps the booking UI consistent with the rest of the site.
 */

.cito-booking {
  /* Configurable through Settings → Cito Booking (Rooms → Settings). */
  --cito-primary: #12433f;
  --cito-secondary: #c8a15a;
  --cito-surface: #f6f4ef;
  --cito-text: #1d1d1d;
  --cito-button-text: #ffffff;
  --cito-content-width: 1180px;
  --cito-radius: 14px;
  --cito-section-space: 2.5rem;

  /* Derived tokens. */
  --cito-radius-lg: calc(var(--cito-radius) * 1.5);
  --cito-radius-sm: calc(var(--cito-radius) * 0.7);
  --cito-border: color-mix(in srgb, var(--cito-text) 12%, transparent);
  --cito-border-strong: color-mix(in srgb, var(--cito-text) 22%, transparent);
  --cito-muted: color-mix(in srgb, var(--cito-text) 62%, transparent);
  --cito-primary-soft: color-mix(in srgb, var(--cito-primary) 8%, transparent);
  --cito-primary-softer: color-mix(in srgb, var(--cito-primary) 4%, transparent);
  --cito-accent-soft: color-mix(in srgb, var(--cito-secondary) 18%, transparent);
  --cito-danger: #b3261e;
  --cito-success: #1a6b3f;
  --cito-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 4px 12px rgba(16, 24, 40, 0.06);
  --cito-shadow-md: 0 2px 4px rgba(16, 24, 40, 0.05), 0 14px 34px rgba(16, 24, 40, 0.1);

  box-sizing: border-box;
  font-family: var(--cito-font, inherit);
  font-size: var(--cito-font-base, inherit);
  line-height: 1.6;
  color: var(--cito-text);
  text-align: left;
}

.cito-booking *,
.cito-booking *::before,
.cito-booking *::after {
  box-sizing: inherit;
}

.cito-booking img {
  max-width: 100%;
  height: auto;
  display: block;
}

/*
 * Escape the theme/global-styles content constraint. The doubled class keeps
 * the specificity equal to the theme rule while sitting later in the cascade;
 * the descendant selectors cover block themes that generate a higher
 * specificity variant.
 *
 * `:not(main)` keeps this off the theme's <main> element, which carries
 * `cito-booking` as well on the room pages — un-clamping it would break the
 * theme layout.
 */
.cito-booking.cito-booking:not(main),
.wp-block-post-content > .cito-booking,
.wp-block-post-content.is-layout-constrained > .cito-booking,
.entry-content > .cito-booking {
  max-width: none;
  width: 100%;
}

/* Layout shell ---------------------------------------------------------- */

/*
 * Theme page title.
 *
 * Every booking page already carries its own heading, so the theme page title
 * is hidden there. The single room page keeps its title (centred) but drops the
 * published date.
 *
 * Selectors use WordPress core classes only (`.wp-block-post-title`,
 * `.wp-block-group`, `.wp-block-post-date`); `.page-title` / `.entry-title` /
 * `.page-header` / `.post-header` are added as widely used theme conventions so
 * the behaviour holds on other (classic) themes too.
 */
body.cito-booking-flow-page .wp-block-post-title,
body.cito-booking-flow-page .page-title,
body.cito-booking-flow-page .entry-title {
  display: none;
}

/* Also collapse the wrapper when the title was its only content. */
body.cito-booking-flow-page .wp-block-group:has(> .wp-block-post-title):not(:has(> :not(.wp-block-post-title))),
body.cito-booking-flow-page .page-header:not(:has(> :not(.wp-block-post-title))),
body.cito-booking-flow-page .post-header:not(:has(> :not(.wp-block-post-title))) {
  display: none;
}

body.cito-single-room-page .wp-block-post-title,
body.cito-single-room-page .page-title,
body.cito-single-room-page .entry-title,
body.cito-single-room-page .post-header,
body.cito-single-room-page .page-header {
  text-align: center;
}

body.cito-single-room-page .wp-block-post-date,
body.cito-single-room-page .wp-block-post-author,
body.cito-single-room-page .wp-block-post-terms,
body.cito-single-room-page .posted-on,
body.cito-single-room-page time {
  display: none;
}

/*
 * Theme post meta on the room pages.
 *
 * Rooms are managed by the plugin, so the blog-style bits block themes print
 * around the content are removed: the "Written by … in …" author/taxonomy row
 * (including its static labels, which stay behind when the author and term
 * blocks are hidden), the published date and the previous/next navigation or
 * query pagination.
 *
 * Scoped to `main.cito-booking`, which the plugin puts on the theme's <main>
 * element on every room page: single room, room archive, room taxonomies and
 * the rooms page. Cart, checkout and payment pages are untouched.
 */

/* Author / taxonomy row plus the wrapper that holds it next to the title. */
main.cito-booking .wp-block-group:has(> .wp-block-post-title) > .wp-block-group:has(> .wp-block-paragraph),
main.cito-booking .wp-block-group:has(> .wp-block-post-author),
main.cito-booking .wp-block-group:has(> .wp-block-post-author-name),
main.cito-booking .wp-block-group:has(> .wp-block-post-terms),
main.cito-booking .wp-block-post-author,
main.cito-booking .wp-block-post-author-name,
main.cito-booking .wp-block-post-author__name,
main.cito-booking .wp-block-post-terms {
  display: none;
}

/* Published date ("Published on …" / the date itself). */
main.cito-booking .wp-block-post-date,
main.cito-booking .wp-block-post-date__published,
main.cito-booking .wp-block-post-date time,
main.cito-booking .posted-on,
main.cito-booking .entry-date {
  display: none;
}

/* Previous / next navigation and query pagination. */
main.cito-booking .wp-block-post-navigation-link,
main.cito-booking .post-navigation-link-previous,
main.cito-booking .post-navigation-link-next,
main.cito-booking .wp-block-query-pagination,
main.cito-booking .wp-block-query-pagination-numbers,
main.cito-booking .wp-block-query-pagination-next,
main.cito-booking .wp-block-query-pagination-previous,
main.cito-booking .nav-links,
main.cito-booking .post-navigation,
main.cito-booking .wp-block-group:has(> .wp-block-post-navigation-link) {
  display: none;
}

.cito-shell {
  width: min(var(--cito-content-width), 100% - 2.5rem);
  margin-inline: auto;
}

/* Block themes already pad the post content, so avoid double gutters. */
.wp-block-post-content .cito-shell,
.entry-content .cito-shell {
  width: min(var(--cito-content-width), 100%);
}

.cito-booking.cito-rooms,
.cito-booking.cito-results,
.cito-booking.cito-single-room,
.cito-booking.cito-booking-form-section,
.cito-booking.cito-payment,
.cito-booking.cito-confirmation {
  padding-block: var(--cito-section-space);
  margin: 0;
}

.cito-booking.cito-rooms > .cito-shell > * + *,
.cito-booking.cito-results > .cito-shell > * + *,
.cito-booking.cito-single-room > .cito-shell > * + *,
.cito-booking.cito-booking-form-section > .cito-shell > * + * {
  margin-top: var(--cito-section-space);
}

.cito-booking.cito-rooms > .cito-shell,
.cito-booking.cito-results > .cito-shell,
.cito-booking.cito-single-room > .cito-shell,
.cito-booking.cito-booking-form-section > .cito-shell,
.cito-booking.cito-payment > .cito-shell,
.cito-booking.cito-confirmation > .cito-shell {
  padding-block: 0;
}

/* Typography ------------------------------------------------------------ */

.cito-section-title {
  margin: 0;
  font-family: var(--cito-font, inherit);
  font-size: 1.75em;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--cito-primary);
  margin-top: 1rem;
}

.cito-subsection-title {
  margin: 1.5em 0 0.6em;
  font-family: var(--cito-font, inherit);
  font-size: 1.1em;
  font-weight: 700;
  line-height: 1.35;
  color: var(--cito-primary);
}

.cito-booking p,
.cito-booking li,
.cito-booking td,
.cito-booking th {
  font-family: var(--cito-font, inherit);
  font-size: 1rem;
}

.cito-hint,
.cito-search__hint {
  margin: 0.75em 0 0;
  font-size: 0.82em;
  line-height: 1.5;
  color: var(--cito-muted);
}

.cito-required {
  color: var(--cito-danger);
  font-weight: 700;
}

.cito-link {
  display: inline-block;
  margin-top: 0.5em;
  font-size: 0.9em;
  font-weight: 600;
  color: var(--cito-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cito-empty {
  margin: 0;
  padding: 1.5rem;
  border: 1px dashed var(--cito-border);
  border-radius: var(--cito-radius);
  background: var(--cito-surface);
  color: var(--cito-muted);
  text-align: center;
}

/* Buttons --------------------------------------------------------------- */

.cito-booking .cito-button,
.cito-booking button.cito-button,
.cito-booking input[type="submit"].cito-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.8em 1.5em;
  border: 1px solid transparent;
  border-radius: var(--cito-radius-sm);
  background: linear-gradient(135deg, var(--cito-primary), color-mix(in srgb, var(--cito-primary) 55%, var(--cito-secondary)));
  color: var(--cito-button-text);
  font-family: var(--cito-font, inherit);
  font-size: 0.95em;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.cito-booking .cito-button:hover,
.cito-booking .cito-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--cito-shadow-md);
  color: var(--cito-button-text);
  filter: saturate(1.08);
}

.cito-booking .cito-button:focus-visible {
  outline: 2px solid var(--cito-secondary);
  outline-offset: 2px;
}

.cito-booking .cito-button:disabled,
.cito-booking .cito-button[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.cito-booking .cito-button--ghost,
.cito-booking a.cito-button--ghost {
  background: #fff;
  border-color: var(--cito-border-strong);
  color: var(--cito-primary);
}

.cito-booking .cito-button--ghost:hover,
.cito-booking a.cito-button--ghost:hover {
  background: var(--cito-primary-soft);
  border-color: var(--cito-primary);
  color: var(--cito-primary);
}

.cito-button--block {
  width: 100%;
}

.cito-button--large {
  padding: 0.95em 1.75em;
  font-size: 1em;
}

/* Forms ----------------------------------------------------------------- */

.cito-booking .cito-field,
.cito-booking .cito-search__field {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  margin: 0 0 1rem;
}

.cito-booking .cito-field:last-child,
.cito-booking .cito-search__field:last-child {
  margin-bottom: 0;
}

.cito-booking .cito-field > label,
.cito-booking .cito-search__field > label {
  font-family: var(--cito-font, inherit);
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--cito-primary);
  text-transform: none;
}

.cito-booking input[type="text"],
.cito-booking input[type="email"],
.cito-booking input[type="tel"],
.cito-booking input[type="date"],
.cito-booking input[type="number"],
.cito-booking select,
.cito-booking textarea {
  width: 100%;
  max-width: none;
  padding: 0.5em 0.7em;
  border: 1px solid var(--cito-border-strong);
  border-radius: var(--cito-radius-sm);
  background: #fff;
  color: var(--cito-text);
  font-family: var(--cito-font, inherit);
  font-size: 0.95em;
  line-height: 1.4;
  min-height: 2.6em;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cito-booking textarea {
  min-height: 6em;
  resize: vertical;
}

.cito-booking input:focus,
.cito-booking select:focus,
.cito-booking textarea:focus {
  outline: none;
  border-color: var(--cito-secondary);
  box-shadow: 0 0 0 3px var(--cito-accent-soft);
}

.cito-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

/* Notices, badges, cards ------------------------------------------------ */

.cito-notice {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--cito-border);
  border-left: 4px solid var(--cito-primary);
  border-radius: var(--cito-radius-sm);
  background: var(--cito-surface);
  font-size: 0.92em;
  line-height: 1.55;
}

.cito-notice > :first-child {
  margin-top: 0;
}

.cito-notice > :last-child {
  margin-bottom: 0;
}

.cito-notice--error {
  border-left-color: var(--cito-danger);
  background: color-mix(in srgb, var(--cito-danger) 8%, #fff);
  color: color-mix(in srgb, var(--cito-danger) 82%, #000);
}

.cito-notice--success {
  border-left-color: var(--cito-success);
  background: color-mix(in srgb, var(--cito-success) 9%, #fff);
  color: color-mix(in srgb, var(--cito-success) 85%, #000);
}

.cito-notice--info {
  border-left-color: var(--cito-primary);
  background: var(--cito-primary-softer);
  color: var(--cito-text);
}

.cito-notice--warning {
  border-left-color: var(--cito-secondary);
  background: var(--cito-accent-soft);
  color: color-mix(in srgb, var(--cito-secondary) 75%, #000);
}

.cito-booking-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--cito-border);
  border-radius: var(--cito-radius-lg);
  background: #fff;
  box-shadow: var(--cito-shadow-sm);
}

.cito-booking-card > :first-child {
  margin-top: 0;
}

.cito-booking-card--center {
  text-align: center;
}

.cito-booking-card--center .cito-summary-table {
  text-align: left;
}

.cito-badge {
  display: inline-block;
  padding: 0.3em 0.85em;
  border-radius: 999px;
  background: var(--cito-primary-soft);
  color: var(--cito-primary);
  font-size: 0.72em;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
}

.cito-badge--success {
  background: color-mix(in srgb, var(--cito-success) 12%, #fff);
  color: var(--cito-success);
}

.cito-badge--pending {
  background: var(--cito-accent-soft);
  color: color-mix(in srgb, var(--cito-secondary) 70%, #000);
}

/* Search bar ------------------------------------------------------------ */

.cito-search__form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 1rem;
  align-items: end;
  padding: 1.15rem;
  border: 1px solid var(--cito-border);
  border-radius: var(--cito-radius-lg);
  background: #fff;
  box-shadow: var(--cito-shadow-sm);
}

.cito-search--embedded .cito-search__form {
  margin: 0;
}

.cito-search__submit {
  align-self: end;
  margin: 0 0 1rem;
}

.cito-search__submit .cito-button {
  white-space: nowrap;
}

/* Gallery slider -------------------------------------------------------- */

.cito-booking-gallery {
  position: relative;
  overflow: hidden;
  border-radius: var(--cito-radius);
  background: var(--cito-surface);
}

.cito-booking-gallery__viewport {
  position: relative;
  overflow: hidden;
}

.cito-booking-gallery__track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.cito-booking-gallery__slide {
  position: relative;
  flex: 0 0 100%;
  margin: 0;
  padding: 0;
}

.cito-booking-gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

.cito-booking-gallery--single .cito-booking-gallery__slide img {
  aspect-ratio: auto;
  height: clamp(14rem, 30vw, 32rem);
}

.cito-booking-gallery--summary .cito-booking-gallery__slide img {
  aspect-ratio: auto;
  height: clamp(11rem, 22vw, 19rem);
}

.cito-booking-gallery--placeholder {
  display: grid;
  place-items: center;
  min-height: 12rem;
  background: linear-gradient(135deg, var(--cito-primary-soft), var(--cito-accent-soft));
  color: var(--cito-primary);
  font-size: 0.9em;
  font-weight: 600;
  text-align: center;
}

.cito-booking-gallery__nav {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--cito-primary);
  font-size: 1.5em;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.2s ease, background 0.2s ease;
}

.cito-booking-gallery:hover .cito-booking-gallery__nav,
.cito-booking-gallery:focus-within .cito-booking-gallery__nav {
  opacity: 1;
}

.cito-booking-gallery__nav:hover {
  background: #fff;
}

.cito-booking-gallery__nav--prev {
  left: 0.6rem;
}

.cito-booking-gallery__nav--next {
  right: 0.6rem;
}

.cito-booking-gallery__dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 0;
}

.cito-booking-gallery__dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--cito-border-strong);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.cito-booking-gallery__dot.is-active {
  background: var(--cito-primary);
  transform: scale(1.3);
}

.cito-booking-gallery__thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0 0.75rem 0.75rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.cito-booking-gallery__thumb {
  flex: 0 0 5rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--cito-radius-sm);
  overflow: hidden;
  background: none;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.cito-booking-gallery__thumb img {
  width: 100%;
  height: 3.5rem;
  object-fit: cover;
}

.cito-booking-gallery__thumb.is-active,
.cito-booking-gallery__thumb:hover {
  opacity: 1;
  border-color: var(--cito-secondary);
}

/* Rooms grid ------------------------------------------------------------ */

.cito-room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: clamp(1rem, 2.2vw, 1.75rem);
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: stretch;
}

.cito-room-grid--cols-2 {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr));
}

.cito-room-grid--cols-4 {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}

.cito-room-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--cito-border);
  border-radius: var(--cito-radius-lg);
  background: #fff;
  box-shadow: var(--cito-shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.cito-room-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--cito-shadow-md);
}

.cito-room-card__media {
  position: relative;
}

.cito-room-card__media .cito-booking-gallery {
  border-radius: 0;
}

.cito-room-card__badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  padding: 0.28em 0.7em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--cito-primary);
  font-size: 0.68em;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.7;
  text-transform: uppercase;
}

.cito-room-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.6rem;
  padding: 1.25rem;
}

.cito-room-card__title {
  margin: 0;
  font-size: 1.25em;
  font-weight: 700;
  line-height: 1.3;
  color: var(--cito-primary);
}

.cito-room-card__title a {
  color: inherit;
  text-decoration: none;
}

.cito-room-card__title a:hover {
  color: var(--cito-secondary);
}

.cito-room-card__excerpt {
  margin: 0;
  font-size: 0.9em;
  line-height: 1.6;
  color: var(--cito-muted);
}

.cito-room-card__footer {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--cito-border);
}

.cito-room-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.cito-room-card__actions .cito-button {
  padding-inline: 0.7em;
  white-space: nowrap;
}

/* Room attributes ------------------------------------------------------- */

.cito-room-attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.82em;
  line-height: 1.5;
  color: var(--cito-muted);
}

.cito-room-attrs li {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

.cito-room-attrs li::before {
  content: "";
  flex: 0 0 auto;
  width: 0.4em;
  height: 0.4em;
  border-radius: 50%;
  background: var(--cito-secondary);
}

/* Prices ---------------------------------------------------------------- */

.cito-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.45rem;
  margin: 0;
  color: var(--cito-primary);
}

.cito-price__label {
  font-size: 0.78em;
  font-weight: 600;
  color: var(--cito-muted);
}

.cito-price__amount {
  font-size: 1.35em;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.cito-price__amount .woocommerce-Price-amount,
.cito-price .woocommerce-Price-amount {
  font-weight: 800;
  white-space: nowrap;
}

.cito-price__period {
  font-size: 0.8em;
  color: var(--cito-muted);
}

.cito-price__badge {
  padding: 0.15em 0.55em;
  border-radius: 999px;
  background: var(--cito-accent-soft);
  color: color-mix(in srgb, var(--cito-secondary) 70%, #000);
  font-size: 0.68em;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.7;
  text-transform: uppercase;
}

.cito-price__detail {
  flex: 1 0 100%;
  margin: 0;
  font-size: 0.8em;
  line-height: 1.5;
  color: var(--cito-muted);
}

/* Term chips ------------------------------------------------------------ */

.cito-term-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cito-term-list li {
  margin: 0;
}

.cito-term-list a {
  display: inline-block;
  padding: 0.25em 0.7em;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--cito-primary-soft);
  color: var(--cito-primary);
  font-size: 0.76em;
  font-weight: 600;
  line-height: 1.7;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cito-term-list a:hover {
  background: var(--cito-accent-soft);
  color: var(--cito-primary);
}

.cito-term-list--chips a {
  background: var(--cito-surface);
  border-color: var(--cito-border);
}

/* Pagination ------------------------------------------------------------ */

.cito-pagination {
  margin-top: 2rem;
}

.cito-pagination ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cito-pagination a,
.cito-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  height: 2.6rem;
  padding: 0 0.75rem;
  border: 1px solid var(--cito-border);
  border-radius: var(--cito-radius-sm);
  color: var(--cito-primary);
  font-size: 0.9em;
  font-weight: 600;
  text-decoration: none;
}

.cito-pagination .current {
  background: var(--cito-primary);
  border-color: var(--cito-primary);
  color: var(--cito-button-text);
}

/* Single room ----------------------------------------------------------- */

.cito-single-room__gallery {
  margin-bottom: var(--cito-section-space);
}

.cito-single-room__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(19rem, 1fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
}

.cito-single-room__main > .cito-price {
  margin-bottom: 1.25rem;
}

.cito-room-details {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cito-room-details li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--cito-border);
  font-size: 0.92em;
}

.cito-room-details li:last-child {
  border-bottom: 0;
}

.cito-room-details__label {
  flex: 0 0 9rem;
  font-weight: 700;
  color: var(--cito-primary);
}

.cito-room-details__value {
  flex: 1 1 10rem;
  color: var(--cito-text);
}

.cito-single-room__description {
  margin-top: 2rem;
  font-size: 0.95em;
  line-height: 1.7;
}

.cito-single-room__description > :first-child {
  margin-top: 0;
}

.cito-booking-widget {
  position: sticky;
  top: 1.5rem;
  padding: 1.35rem;
  border: 1px solid var(--cito-border);
  border-radius: var(--cito-radius-lg);
  background: #fff;
}

.cito-booking-widget > h3 {
  margin: 0 0 1rem;
  font-size: 1.2em;
  font-weight: 700;
  color: var(--cito-primary);
}

/* Quote / price breakdown ----------------------------------------------- */

.cito-booking-quote {
  margin: 1rem 0;
  transition: opacity 0.2s ease;
}

.cito-booking-quote.is-loading {
  opacity: 0.6;
}

.cito-booking-quote__inner {
  padding: 1.1rem;
  border: 1px solid var(--cito-border);
  border-radius: var(--cito-radius);
  background: var(--cito-surface);
}

.cito-booking-quote__title {
  margin: 0 0 0.75rem;
  font-size: 0.95em;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cito-primary);
}

.cito-booking-quote__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92em;
}

.cito-booking-quote__table td,
.cito-booking-quote__table th {
  padding: 0.45rem 0;
  border: 0;
  background: none;
  vertical-align: top;
  text-align: left;
  line-height: 1.5;
}

.cito-booking-quote__table td:last-child,
.cito-booking-quote__table th:last-child {
  text-align: right;
  white-space: nowrap;
}

.cito-booking-quote__meta-row td {
  padding-top: 0;
  font-size: 0.85em;
  color: var(--cito-muted);
}

.cito-booking-quote__meta-row--special td {
  color: color-mix(in srgb, var(--cito-secondary) 72%, #000);
  font-weight: 600;
}

.cito-booking-quote__total th,
.cito-booking-quote__total td {
  padding-top: 0.75rem;
  border-top: 2px solid var(--cito-border-strong);
  font-size: 1.1em;
  font-weight: 800;
  color: var(--cito-primary);
}

.cito-booking-quote__meta {
  margin: 0.7rem 0 0;
  font-size: 0.82em;
  line-height: 1.5;
  color: var(--cito-muted);
}

.cito-booking-quote__empty {
  margin: 0;
  font-size: 0.9em;
  color: var(--cito-muted);
}

.cito-booking-quote .cito-notice,
.cito-booking-quote__inner .cito-notice {
  margin: 0;
  font-size: 0.88em;
}

/* Availability confirmation + "Book now" call to action (room page) */

.cito-booking-quote__cta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--cito-border-strong);
}

.cito-booking-quote__available {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin: 0 0 0.75rem;
  font-size: 0.9em;
  font-weight: 700;
  line-height: 1.5;
  color: var(--cito-success);
}

.cito-booking-quote__available::before {
  content: "";
  flex: 0 0 auto;
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: currentColor;
}

.cito-booking .cito-button.is-loading {
  opacity: 0.7;
  cursor: progress;
}

/* Booking page ---------------------------------------------------------- */

.cito-results__header > * {
  margin-bottom: 0.5rem;
}

.cito-results__header > *:last-child {
  margin-bottom: 0;
}

.cito-results__summary {
  margin: 0;
  font-size: 0.95em;
  color: var(--cito-muted);
}

.cito-booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(21rem, 1.05fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.cito-booking-layout__summary {
  position: sticky;
  top: 2rem;
}

.cito-booking-summary {
  overflow: hidden;
  border: 1px solid var(--cito-border);
  border-radius: var(--cito-radius-lg);
  background: #fff;
  box-shadow: var(--cito-shadow-sm);
}

.cito-booking-summary__media .cito-booking-gallery {
  border-radius: 0;
}

.cito-booking-summary__body {
  padding: 1.35rem;
}

.cito-booking-summary__title {
  margin: 0 0 0.6rem;
  font-size: 1.35em;
  font-weight: 700;
  line-height: 1.3;
  color: var(--cito-primary);
}

.cito-booking-summary__stay {
  display: grid;
  gap: 0.45rem;
  margin: 1.15rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--cito-border);
  list-style: none;
}

.cito-booking-summary__stay li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9em;
}

.cito-booking-summary__stay span {
  color: var(--cito-muted);
}

.cito-booking-summary__stay strong {
  font-weight: 700;
  text-align: right;
}

.cito-checkout-form {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--cito-border);
  border-radius: var(--cito-radius-lg);
  background: #fff;
  box-shadow: var(--cito-shadow-md);
}

.cito-checkout-form__title {
  margin: 0 0 1rem;
  font-size: 1.15em;
  font-weight: 700;
  color: var(--cito-primary);
}

.cito-checkout-form__title:not(:first-child) {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cito-border);
}

/* Summary tables -------------------------------------------------------- */

.cito-summary-table {
  width: 100%;
  margin: 1.35rem 0;
  border-collapse: collapse;
  border: 1px solid var(--cito-border);
  border-radius: var(--cito-radius);
  overflow: hidden;
  font-size: 0.92em;
  text-align: left;
}

.cito-booking .cito-summary-table th,
.cito-booking .cito-summary-table td {
  padding: 0.7rem 0.85rem;
  border: 0;
  border-bottom: 1px solid var(--cito-border);
  background: #fff;
  vertical-align: top;
  line-height: 1.55;
}

.cito-booking .cito-summary-table tr:last-child th,
.cito-booking .cito-summary-table tr:last-child td {
  border-bottom: 0;
}

.cito-booking .cito-summary-table th {
  width: 34%;
  background: var(--cito-surface);
  font-weight: 700;
  color: var(--cito-primary);
}

.cito-booking-card--center .cito-summary-table {
  max-width: 40rem;
  margin-inline: auto;
}

/* Payment confirmation -------------------------------------------------- */

.cito-payment__card,
.cito-confirmation .cito-booking-card {
  max-width: 52rem;
  margin-inline: auto;
}

.cito-payment__header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.cito-payment__header h2 {
  margin: 0.7rem 0 0.5rem;
  font-size: 1.6em;
  font-weight: 700;
  line-height: 1.25;
  color: var(--cito-primary);
}

.cito-payment__header p {
  margin: 0;
  color: var(--cito-muted);
}

.cito-payment-instructions {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--cito-border);
  border-radius: var(--cito-radius);
  background: var(--cito-surface);
  font-size: 0.95em;
}

.cito-payment-instructions__method,
.cito-payment-instructions__amount {
  margin: 0 0 0.5rem;
}

.cito-payment-instructions__reference {
  margin: 1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--cito-border-strong);
}

.cito-bank-accounts {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.cito-bank-accounts li {
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.cito-payment-instructions__notes {
  margin-top: 0.75rem;
  font-size: 0.92em;
  color: var(--cito-muted);
}

.cito-payment-instructions__notes > :first-child {
  margin-top: 0;
}

.cito-payment__pay {
  margin: 1.5rem 0 0;
  text-align: center;
}

.cito-payment__confirm {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cito-border);
  text-align: center;
}

.cito-confirmation .cito-booking-card h2 {
  margin: 0.7rem 0 0.5rem;
  font-size: 1.6em;
  color: var(--cito-primary);
}

/* Payment confirmation form (guest data + proof of transfer upload) --------- */

.cito-confirm-payment .cito-booking-card {
  max-width: 52rem;
  margin-inline: auto;
}

.cito-proof-form {
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  border: 1px solid var(--cito-border);
  border-radius: var(--cito-radius);
  background: var(--cito-surface);
}

.cito-field--file input[type="file"] {
  padding: 0.7em;
  border-style: dashed;
  background: #fff;
  cursor: pointer;
}

.cito-field--file input[type="file"]::file-selector-button {
  margin-right: 0.75em;
  padding: 0.35em 0.9em;
  border: 0;
  border-radius: var(--cito-radius-sm);
  background: var(--cito-primary);
  color: var(--cito-button-text);
  font-family: inherit;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
}

.cito-proof-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cito-proof-list__item {
  padding: 0.85rem 1rem;
  border: 1px solid var(--cito-border);
  border-radius: var(--cito-radius-sm);
  background: #fff;
}

.cito-proof-list__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.9rem;
  margin: 0 0 0.5rem;
  font-size: 0.85em;
  color: var(--cito-muted);
}

.cito-proof-list__date {
  font-weight: 700;
  color: var(--cito-primary);
}

.cito-proof-list__files {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cito-proof-list__files a {
  display: inline-block;
  padding: 0.25em 0.7em;
  border: 1px solid var(--cito-border);
  border-radius: 999px;
  background: var(--cito-primary-softer);
  color: var(--cito-primary);
  font-size: 0.78em;
  font-weight: 600;
  text-decoration: none;
}

.cito-proof-list__files a:hover {
  background: var(--cito-primary-soft);
}

/* Payment received (thank you) page ---------------------------------------- */

.cito-thankyou__card {
  max-width: 52rem;
  margin-inline: auto;
}

.cito-thankyou__card h2 {
  margin: 0.75rem 0 0.75rem;
  font-size: 1.7em;
  font-weight: 700;
  line-height: 1.25;
  color: var(--cito-primary);
}

.cito-thankyou__lead {
  max-width: 38rem;
  margin: 0 auto 0.75rem;
  font-size: 1em;
  line-height: 1.65;
  color: var(--cito-text);
}

.cito-thankyou__lead strong {
  color: var(--cito-primary);
}

.cito-thankyou__steps {
  max-width: 38rem;
  margin: 0 auto 1.5rem;
  padding: 0;
  list-style: none;
  counter-reset: cito-step;
  text-align: left;
}

.cito-thankyou__steps li {
  position: relative;
  margin-bottom: 0.6rem;
  padding-left: 2.4em;
  font-size: 0.95em;
  line-height: 1.6;
}

.cito-thankyou__steps li::before {
  content: counter(cito-step);
  counter-increment: cito-step;
  position: absolute;
  top: 0.1em;
  left: 0;
  display: grid;
  place-items: center;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  background: var(--cito-primary-soft);
  color: var(--cito-primary);
  font-size: 0.85em;
  font-weight: 800;
}

.cito-thankyou__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

/* Responsive ------------------------------------------------------------ */

@media (max-width: 1080px) {
  .cito-search__form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cito-search__submit {
    grid-column: 1 / -1;
  }

  .cito-single-room__layout,
  .cito-booking-layout {
    grid-template-columns: 1fr;
  }

  .cito-booking-widget {
    position: static;
  }

  .cito-booking-layout__summary {
    position: static;
  }

  .cito-room-grid,
  .cito-room-grid--cols-2,
  .cito-room-grid--cols-4 {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  }
}

@media (max-width: 640px) {
  .cito-search__form {
    grid-template-columns: 1fr;
  }

  .cito-field-row {
    grid-template-columns: 1fr;
  }

  .cito-booking-gallery__nav {
    opacity: 1;
  }

  .cito-room-card__actions {
    grid-template-columns: 1fr;
  }

  .cito-booking .cito-summary-table th,
  .cito-booking .cito-summary-table td {
    display: block;
    width: 100%;
  }

  .cito-booking .cito-summary-table th {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cito-booking *,
  .cito-booking *::before,
  .cito-booking *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Check-in / check-out times shown under a date. */

.cito-booking .cito-summary-time {
  display: block;
  font-size: 0.85em;
  font-weight: 500;
  color: var(--cito-muted);
}

.cito-booking .cito-booking-summary__stay small {
  display: block;
  font-size: 0.82em;
  font-weight: 500;
  color: var(--cito-muted);
}

/* ---------------------------------------------------------------------------
 * Classic WooCommerce cart & checkout
 * ---------------------------------------------------------------------------
 * Why the plugin styles these pages: the booking flow hands the guest over to
 * WooCommerce, and the site's checkout page uses the classic
 * `[woocommerce_checkout]` shortcode — the Checkout *block* only renders
 * gateways that ship a block integration, so third-party gateways (Midtrans
 * QRIS, Xendit, …) never show up there.
 *
 * Block themes ship almost no styling for the classic markup, so the booking
 * flow provides its own tidy layout built from the same design tokens as the
 * booking sections (Rooms → Settings).
 *
 * Loaded on the cart/checkout pages only, see
 * `Cito_Booking_Frontend::is_booking_context()`.
 */

body.woocommerce-checkout,
body.woocommerce-cart {
  /*
   * Same defaults as `.cito-booking`. The settings screen emits the tones the
   * site owner picked on `<body>`; that rule has the same specificity but comes
   * later in the cascade, so the configured colours always win.
   *
   * The `body.` prefix matters: the classic form itself carries the
   * `woocommerce-checkout` class, and a bare `.woocommerce-checkout` rule would
   * redeclare these fallbacks inside the form and shadow the settings.
   */
  --cito-primary: #12433f;
  --cito-secondary: #c8a15a;
  --cito-surface: #f6f4ef;
  --cito-text: #1d1d1d;
  --cito-button-text: #ffffff;
  --cito-content-width: 1180px;
  --cito-radius: 14px;
  --cito-section-space: 2.5rem;
  --cito-radius-lg: calc(var(--cito-radius) * 1.5);
  --cito-radius-sm: calc(var(--cito-radius) * 0.7);
  --cito-border: color-mix(in srgb, var(--cito-text) 12%, transparent);
  --cito-border-strong: color-mix(in srgb, var(--cito-text) 22%, transparent);
  --cito-muted: color-mix(in srgb, var(--cito-text) 62%, transparent);
  --cito-primary-soft: color-mix(in srgb, var(--cito-primary) 8%, transparent);
  --cito-accent-soft: color-mix(in srgb, var(--cito-secondary) 18%, transparent);
  --cito-danger: #b3261e;
  --cito-success: #1a6b3f;
  --cito-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 4px 12px rgba(16, 24, 40, 0.06);
  --cito-shadow-md: 0 2px 4px rgba(16, 24, 40, 0.05), 0 14px 34px rgba(16, 24, 40, 0.1);
}

/* Wrapper ----------------------------------------------------------------- */

body.woocommerce-checkout .woocommerce,
body.woocommerce-cart .woocommerce {
  font-family: var(--cito-font, inherit);
  font-size: var(--cito-font-base, inherit);
  line-height: 1.6;
  color: var(--cito-text);
  text-align: left;
}

/* Escape the global-styles content clamp so the two columns fit side by side. */
body.woocommerce-checkout .wp-block-post-content > .woocommerce,
body.woocommerce-checkout .wp-block-post-content.is-layout-constrained > .woocommerce,
body.woocommerce-checkout .entry-content > .woocommerce,
body.woocommerce-cart .wp-block-post-content > .woocommerce,
body.woocommerce-cart .wp-block-post-content.is-layout-constrained > .woocommerce,
body.woocommerce-cart .entry-content > .woocommerce {
  max-width: none;
  width: 100%;
}

/* Notices, coupon toggle, feedback ---------------------------------------- */

body.woocommerce-checkout .woocommerce-info,
body.woocommerce-checkout .woocommerce-message,
body.woocommerce-checkout .woocommerce-error,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-error {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--cito-border);
  border-left: 4px solid var(--cito-primary);
  border-radius: var(--cito-radius-sm);
  background: #fff;
  font-size: 0.95rem;
  line-height: 1.6;
  list-style: none;
}

body.woocommerce-checkout .woocommerce-error,
body.woocommerce-cart .woocommerce-error {
  border-left-color: var(--cito-danger);
  background: color-mix(in srgb, var(--cito-danger) 6%, #fff);
}

/* The core notice icons do not match the design tokens. */
body.woocommerce-checkout .woocommerce-info::before,
body.woocommerce-checkout .woocommerce-message::before,
body.woocommerce-checkout .woocommerce-error::before,
body.woocommerce-cart .woocommerce-info::before,
body.woocommerce-cart .woocommerce-message::before,
body.woocommerce-cart .woocommerce-error::before {
  display: none;
}

body.woocommerce-checkout .woocommerce-info a,
body.woocommerce-cart .woocommerce-info a {
  color: var(--cito-primary);
  font-weight: 600;
}

body.woocommerce-checkout .woocommerce-form-coupon {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--cito-border-strong);
  border-radius: var(--cito-radius-sm);
  background: var(--cito-surface);
}

body.woocommerce-checkout .woocommerce-form-coupon p.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: end;
  margin: 0;
}

body.woocommerce-checkout .woocommerce-form-coupon button {
  padding: 0.7rem 1.2rem;
  border: 0;
  border-radius: var(--cito-radius-sm);
  background: var(--cito-primary);
  color: var(--cito-button-text);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

/* Checkout layout --------------------------------------------------------- */

@media (min-width: 900px) {
  body.woocommerce-checkout form.checkout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: clamp(1.5rem, 3vw, 2.75rem);
    align-items: start;
  }

  body.woocommerce-checkout #customer_details {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  body.woocommerce-checkout #order_review_heading {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
  }

  body.woocommerce-checkout #order_review {
    grid-column: 2;
    grid-row: 2;
    position: sticky;
    top: 1.5rem;
  }
}

/*
 * WooCommerce wraps the billing block in a legacy `.col2-set` / `.col-1` fluid
 * grid (48% floats). Inside the checkout grid that only squeezes the fields, so
 * the columns are flattened back to full width.
 */
body.woocommerce-checkout .woocommerce .col2-set,
body.woocommerce-checkout .woocommerce .col2-set .col-1,
body.woocommerce-checkout .woocommerce .col2-set .col-2,
body.woocommerce-checkout .woocommerce .woocommerce-billing-fields,
body.woocommerce-checkout .woocommerce .woocommerce-additional-fields {
  float: none;
  width: 100%;
  max-width: none;
}

body.woocommerce-checkout .woocommerce .col2-set::before,
body.woocommerce-checkout .woocommerce .col2-set::after {
  content: none;
}

/* Section headings -------------------------------------------------------- */

body.woocommerce-checkout form.checkout h3,
body.woocommerce-checkout #order_review_heading,
body.woocommerce-cart .woocommerce h2 {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--cito-primary);
}

body.woocommerce-checkout form.checkout h3:not(:first-child) {
  margin-top: 1.75rem;
}

/* Fields ------------------------------------------------------------------ */

body.woocommerce-checkout .woocommerce form .form-row,
body.woocommerce-cart .woocommerce form .form-row {
  display: block;
  float: none;
  width: 100%;
  margin: 0 0 1rem;
  padding: 0;
}

body.woocommerce-checkout .woocommerce form .form-row label {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--cito-text);
}

body.woocommerce-checkout .woocommerce form .form-row .required {
  color: var(--cito-danger);
  text-decoration: none;
}

body.woocommerce-checkout .woocommerce input.input-text,
body.woocommerce-checkout .woocommerce textarea,
body.woocommerce-checkout .woocommerce select,
body.woocommerce-cart .woocommerce input.input-text,
body.woocommerce-cart .woocommerce textarea,
body.woocommerce-cart .woocommerce select {
  width: 100%;
  max-width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--cito-border-strong);
  border-radius: var(--cito-radius-sm);
  background-color: #fff;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--cito-text);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

body.woocommerce-checkout .woocommerce input.input-text:focus,
body.woocommerce-checkout .woocommerce textarea:focus,
body.woocommerce-checkout .woocommerce select:focus {
  outline: none;
  border-color: var(--cito-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cito-primary) 16%, transparent);
}

/* Two fields per row, address/e-mail/notes across the full width. */
body.woocommerce-checkout .woocommerce .woocommerce-billing-fields__field-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1rem;
}

body.woocommerce-checkout .woocommerce .woocommerce-billing-fields__field-wrapper .form-row-wide,
body.woocommerce-checkout .woocommerce .woocommerce-billing-fields__field-wrapper #billing_address_1_field,
body.woocommerce-checkout .woocommerce .woocommerce-billing-fields__field-wrapper #billing_address_2_field,
body.woocommerce-checkout .woocommerce .woocommerce-billing-fields__field-wrapper #billing_email_field,
body.woocommerce-checkout .woocommerce .woocommerce-additional-fields .form-row {
  grid-column: 1 / -1;
}

/* Select2 / selectWoo (country, state, city dropdowns). */
body.woocommerce-checkout .woocommerce .select2-container {
  width: 100% !important;
}

body.woocommerce-checkout .woocommerce .select2-container--default .select2-selection--single {
  height: auto;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--cito-border-strong);
  border-radius: var(--cito-radius-sm);
  background: #fff;
}

body.woocommerce-checkout .woocommerce .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding: 0;
  line-height: 1.5;
  color: var(--cito-text);
}

body.woocommerce-checkout .woocommerce .select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 50%;
  height: 1em;
  transform: translateY(-50%);
}

body.woocommerce-checkout .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--cito-primary);
}

body.woocommerce-checkout .select2-dropdown {
  border: 1px solid var(--cito-border-strong);
  border-radius: var(--cito-radius-sm);
  overflow: hidden;
}

/* Order review card ------------------------------------------------------- */

body.woocommerce-checkout #order_review {
  padding: clamp(1.15rem, 2.5vw, 1.6rem);
  border: 1px solid var(--cito-border);
  border-radius: var(--cito-radius-lg);
  background: #fff;
  box-shadow: var(--cito-shadow-md);
}

body.woocommerce-checkout .woocommerce-checkout-review-order-table {
  width: 100%;
  margin: 0 0 1rem;
  border: 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}

body.woocommerce-checkout .woocommerce-checkout-review-order-table th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table td {
  padding: 0.65rem 0;
  border: 0;
  border-bottom: 1px solid var(--cito-border);
  background: none;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

body.woocommerce-checkout .woocommerce-checkout-review-order-table thead th {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cito-muted);
}

body.woocommerce-checkout .woocommerce-checkout-review-order-table .product-total,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot td,
body.woocommerce-checkout .woocommerce-checkout-review-order-table thead th.product-total {
  text-align: right;
  white-space: nowrap;
}

body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot tr:last-child th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot tr:last-child td {
  border-bottom: 0;
}

body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot .order-total th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot .order-total td {
  padding-top: 0.85rem;
  border-top: 2px solid var(--cito-border-strong);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--cito-primary);
}

/* Payment methods as selectable cards ------------------------------------- */

body.woocommerce-checkout #payment {
  margin-top: 1.25rem;
  border: 0;
  background: none;
}

body.woocommerce-checkout #payment::before,
body.woocommerce-checkout #payment::after {
  content: none;
}

body.woocommerce-checkout #payment .wc_payment_methods {
  display: grid;
  gap: 0.6rem;
  margin: 0 0 1.15rem;
  padding: 0;
  list-style: none;
}

body.woocommerce-checkout #payment .wc_payment_methods li {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--cito-border);
  border-radius: var(--cito-radius-sm);
  background: #fff;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

body.woocommerce-checkout #payment .wc_payment_methods li:hover {
  border-color: var(--cito-border-strong);
}

body.woocommerce-checkout #payment .wc_payment_methods li:has(input:checked) {
  border-color: var(--cito-primary);
  background: var(--cito-primary-soft);
  box-shadow: inset 0 0 0 1px var(--cito-primary);
}

body.woocommerce-checkout #payment .wc_payment_methods li label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--cito-text);
  cursor: pointer;
}

body.woocommerce-checkout #payment .wc_payment_methods li input.input-radio {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--cito-primary);
}

body.woocommerce-checkout #payment .wc_payment_methods li img {
  width: auto;
  max-height: 1.6rem;
  margin-left: auto;
}

body.woocommerce-checkout #payment .payment_box {
  margin: 0.6rem 0 0;
  padding: 0.75rem 0.9rem;
  border: 0;
  border-radius: var(--cito-radius-sm);
  background: var(--cito-surface);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--cito-muted);
}

body.woocommerce-checkout #payment .payment_box::before {
  display: none;
}

body.woocommerce-checkout #payment .wc-terms-and-conditions,
body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

body.woocommerce-checkout #payment .form-row.place-order {
  margin: 0;
  padding: 0;
}

body.woocommerce-checkout .woocommerce-privacy-policy-text p {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--cito-muted);
}

/* Primary buttons --------------------------------------------------------- */

body.woocommerce-checkout #place_order,
body.woocommerce-cart .woocommerce .checkout-button,
body.woocommerce-cart .woocommerce button[name="update_cart"] {
  display: block;
  width: 100%;
  padding: 0.95rem 1.5rem;
  border: 0;
  border-radius: var(--cito-radius);
  background: var(--cito-primary);
  color: var(--cito-button-text);
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

body.woocommerce-cart .woocommerce button[name="update_cart"] {
  width: auto;
  padding: 0.7rem 1.2rem;
  font-size: 0.92rem;
}

body.woocommerce-checkout #place_order:hover,
body.woocommerce-checkout #place_order:focus-visible,
body.woocommerce-cart .woocommerce .checkout-button:hover,
body.woocommerce-cart .woocommerce .checkout-button:focus-visible {
  background: color-mix(in srgb, var(--cito-primary) 88%, #000);
  transform: translateY(-1px);
  box-shadow: var(--cito-shadow-md);
}

body.woocommerce-checkout #place_order:disabled,
body.woocommerce-checkout #place_order[disabled] {
  opacity: 0.65;
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
}

/* Cart page (classic markup, when used) ----------------------------------- */

body.woocommerce-cart .woocommerce table.shop_table {
  margin: 0 0 1.5rem;
  border: 1px solid var(--cito-border);
  border-radius: var(--cito-radius);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 0.95rem;
}

body.woocommerce-cart .woocommerce table.shop_table th,
body.woocommerce-cart .woocommerce table.shop_table td {
  padding: 0.75rem 0.9rem;
  border: 0;
  border-bottom: 1px solid var(--cito-border);
  text-align: left;
  vertical-align: middle;
}

body.woocommerce-cart .woocommerce table.shop_table thead th {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cito-muted);
}

body.woocommerce-cart .woocommerce table.shop_table tbody tr:last-child td {
  border-bottom: 0;
}

body.woocommerce-cart .woocommerce .cart-collaterals .cart_totals {
  padding: clamp(1.15rem, 2.5vw, 1.6rem);
  border: 1px solid var(--cito-border);
  border-radius: var(--cito-radius-lg);
  background: #fff;
  box-shadow: var(--cito-shadow-sm);
}

body.woocommerce-cart .woocommerce .cart-collaterals .cart_totals h2 {
  margin-top: 0;
}

/* Small screens: everything in one column --------------------------------- */

@media (max-width: 899px) {
  body.woocommerce-checkout .woocommerce .woocommerce-billing-fields__field-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }

  body.woocommerce-checkout form.checkout h3:not(:first-child) {
    margin-top: 1.25rem;
  }

  body.woocommerce-checkout #order_review {
    margin-top: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.woocommerce-checkout *,
  body.woocommerce-checkout *::before,
  body.woocommerce-checkout *::after,
  body.woocommerce-cart *,
  body.woocommerce-cart *::before,
  body.woocommerce-cart *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
