.cpv-trackday {
  --cpv-bg: linear-gradient(135deg, #f7f5f1 0%, #ebe4d8 100%);
  --cpv-card: #ffffff;
  --cpv-text: #1e1d1a;
  --cpv-muted: #6f6a5f;
  --cpv-accent: #bf3b1d;
  --cpv-border: #ded6c9;
  --cpv-ok: #2f7d4b;
  --cpv-bad: #a9a39b;
  color: var(--cpv-text);
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  max-width: 1540px;
  margin: 0 auto;
  padding: 48px 28px 80px;
}

.cpv-trackday,
.cpv-trackday * {
  box-sizing: border-box;
  font-family: inherit;
}

.cpv-trackday-page .entry-content,
.cpv-trackday-page .post-content,
.cpv-trackday-page .page-content,
.cpv-trackday-page .content-area,
.cpv-trackday-page .site-main,
.cpv-trackday-page .site-content,
.cpv-trackday-page .wp-block-post-content,
.cpv-trackday-page .wp-site-blocks main,
.cpv-trackday-page article,
.cpv-trackday-page .container,
.cpv-trackday-page .content-wrap {
  max-width: min(1620px, calc(100vw - 80px)) !important;
  width: min(1620px, calc(100vw - 80px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.cpv-trackday h1,
.cpv-trackday h2,
.cpv-trackday h3,
.cpv-trackday h4,
.cpv-trackday strong,
.cpv-trackday button,
.cpv-trackday label,
.cpv-trackday input,
.cpv-trackday textarea,
.cpv-trackday select {
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif !important;
  line-height: 1.25;
}

.cpv-trackday-page .wp-block-post-title,
.cpv-trackday-page .entry-title,
.cpv-trackday-page .page-title,
.cpv-trackday-page main > h1:first-child,
.cpv-trackday-page article > h1:first-child {
  display: none;
}

body.cpv-modal-open {
  overflow: hidden;
}

.cpv-trackday__intro {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.cpv-trackday__title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 0.94;
  font-weight: 800;
}

.cpv-product-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 16px;
  margin-top: 22px;
  align-items: stretch;
}

.cpv-product-empty {
  grid-column: 1 / -1;
  border: 1px solid var(--cpv-border);
  border-radius: 18px;
  padding: 16px;
  background: #fff7ed;
  color: #8a3b12;
  font-weight: 700;
}

.cpv-product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
  border: 1px solid var(--cpv-border);
  border-radius: 24px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(38, 29, 16, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.cpv-product-card:hover,
.cpv-product-card:has(input:checked) {
  transform: translateY(-2px);
  border-color: var(--cpv-accent);
  box-shadow: 0 20px 42px rgba(191, 59, 29, 0.14);
}

.cpv-product-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cpv-product-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  background: linear-gradient(180deg, #f5f1ea 0%, #ebe3d7 100%);
  border-radius: 18px 18px 14px 14px;
  overflow: hidden;
  margin: 8px 8px 0;
}

.cpv-product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  padding: 0;
  box-sizing: border-box;
  display: block;
  transform: scale(1.05);
}

.cpv-product-card__body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
}

.cpv-product-card__body strong {
  font-size: 0.94rem;
  line-height: 1.15;
  white-space: nowrap;
}

.cpv-product-card__description {
  color: var(--cpv-muted);
  font-size: 0.86rem;
  line-height: 1.3;
  white-space: normal;
}

.cpv-product-card__description p {
  margin: 0;
}

.cpv-product-card__description p + p {
  margin-top: 6px;
}

.cpv-product-card__description br {
  display: block;
  content: "";
  margin-top: 2px;
}

.cpv-product-card__body em {
  margin-top: auto;
  color: var(--cpv-accent);
  font-style: normal;
  font-size: 1.08rem;
  font-weight: 800;
}

.cpv-trackday__lead {
  max-width: 780px;
  color: var(--cpv-muted);
  font-size: 1rem;
  margin-top: 12px;
  line-height: 1.38;
}

.cpv-trackday__conditions {
  max-width: 1120px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(191, 59, 29, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
  color: #302b23;
  font-size: 0.9rem;
  line-height: 1.4;
}

.cpv-trackday__includes {
  margin: 0 0 28px;
  padding: 22px 24px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(241,247,255,0.95) 100%);
  box-shadow: 0 18px 38px rgba(32, 54, 94, 0.08);
}

.cpv-trackday__includes-title {
  margin: 0 0 14px;
  color: #13376b;
  font-size: 1.1rem;
  font-weight: 800;
}

.cpv-trackday__includes-content {
  color: #2b313b;
  font-size: 0.96rem;
  line-height: 1.45;
}

.cpv-trackday__includes-content ul,
.cpv-trackday__includes-content ol {
  margin: 0;
  padding-left: 1.35rem;
}

.cpv-trackday__includes-content li {
  margin: 0 0 8px;
}

.cpv-trackday__includes-content li:last-child {
  margin-bottom: 0;
}

.cpv-trackday__conditions-title {
  margin: 0 0 12px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: cpvConditionsBlink 2s ease-in-out infinite alternate;
}

.cpv-trackday__conditions-content ol,
.cpv-trackday__conditions-content ul {
  margin: 0;
  padding-left: 1.35rem;
}

.cpv-trackday__conditions-content li {
  margin: 0 0 8px;
}

.cpv-trackday__conditions-content li:last-child {
  margin-bottom: 0;
}

.cpv-trackday__conditions--intro {
  display: none;
}

.cpv-trackday__conditions--calendar {
  grid-column: 1 / span 2;
  grid-row: 2;
  margin-top: 18px;
}

.cpv-trackday__conditions p {
  margin: 0 0 10px;
  color: var(--cpv-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cpv-trackday__conditions ol {
  margin: 0;
  padding-left: 1.35rem;
}

.cpv-trackday__conditions li {
  margin: 0 0 8px;
}

.cpv-trackday__conditions li:last-child {
  margin-bottom: 0;
}

@keyframes cpvConditionsBlink {
  0% {
    color: #14110d;
  }

  100% {
    color: #bf3b1d;
  }
}

.cpv-trackday__price-card {
  min-width: 220px;
  border-radius: 22px;
  background: #111;
  color: #fff;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cpv-trackday__price-card span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.cpv-trackday__price-card strong {
  font-size: 2rem;
  line-height: 1;
}

.cpv-trackday__layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.cpv-calendar {
  grid-column: 1 / span 2;
  grid-row: 1;
}

.cpv-form {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: start;
}

.cpv-calendar,
.cpv-form__panel {
  background: var(--cpv-card);
  border: 1px solid var(--cpv-border);
  border-radius: 28px;
  box-shadow: 0 18px 60px rgba(29, 25, 17, 0.08);
}

.cpv-calendar {
  padding: 28px;
  background: var(--cpv-bg);
}

.cpv-calendar__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 24px;
}

.cpv-calendar__header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.cpv-calendar__label {
  margin: 0 0 6px;
  color: var(--cpv-muted);
  font-size: 13px;
}

.cpv-calendar__legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--cpv-muted);
}

.cpv-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 6px;
}

.cpv-dot--available { background: var(--cpv-ok); }
.cpv-dot--blocked { background: var(--cpv-accent); }
.cpv-dot--past { background: #bdb4a8; }

.cpv-calendar__weekdays,
.cpv-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
}

.cpv-calendar__weekdays {
  margin-bottom: 12px;
  color: var(--cpv-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cpv-calendar__empty {
  aspect-ratio: 1 / 1;
  min-height: 0;
}

.cpv-day {
  appearance: none;
  border: 1px solid rgba(40, 33, 21, 0.08);
  border-radius: 22px;
  aspect-ratio: 1 / 1;
  min-height: 0;
  background: rgba(255, 255, 255, 0.84);
  text-align: left;
  padding: 15px 13px 13px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.cpv-day:hover:not(:disabled),
.cpv-day.is-selected {
  transform: translateY(-2px);
  border-color: var(--cpv-accent);
  box-shadow: 0 12px 34px rgba(191, 59, 29, 0.16);
}

.cpv-day:disabled {
  cursor: not-allowed;
}

.cpv-day__number {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  align-self: flex-start;
  color: #111111;
  margin-top: -1px;
  margin-left: -1px;
  position: relative;
  z-index: 2;
}

.cpv-day__status,
.cpv-day__slots,
.cpv-day__event {
  font-size: 0.72rem;
  line-height: 1.2;
}

.cpv-day__status {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  margin-top: 0;
  text-align: center;
}

.cpv-day__event {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cpv-ok);
  font-weight: 700;
  text-align: center;
}

.cpv-day__slots {
  color: var(--cpv-ok);
}

.cpv-day.is-full {
  background: rgba(60, 53, 45, 0.08);
  color: #6f675c;
}

.cpv-day.is-past {
  background: #8c867f;
  color: #111111;
}

.cpv-day.is-full .cpv-day__status,
.cpv-day.is-past .cpv-day__status {
  color: var(--cpv-accent);
  font-weight: 700;
}

.cpv-day.is-past .cpv-day__status {
  color: #111111;
}

.cpv-day__cross {
  display: none;
}

.cpv-form__panel {
  padding: 34px;
  position: sticky;
  top: 24px;
}

.cpv-form__panel h2 {
  margin: 0 0 10px;
  font-size: 2rem;
  line-height: 1.05;
}

.cpv-form__hint {
  color: var(--cpv-muted);
  margin-bottom: 26px;
  line-height: 1.35;
  font-size: 0.98rem;
}

.cpv-required-note {
  margin: 12px 0 22px;
  color: var(--cpv-muted);
  font-size: 0.86rem;
}

.cpv-required-note span,
.cpv-required {
  color: #c0392b;
  font-weight: 700;
}

.cpv-selection-summary {
  display: grid;
  gap: 6px;
  padding: 10px 0 2px;
}

.cpv-selection-summary__empty {
  margin: 0;
  color: #c0392b;
  font-size: 0.92rem;
  font-weight: 700;
}

.cpv-selection-summary__content[hidden] {
  display: none;
}

.cpv-selection-summary__content {
  display: grid;
  gap: 6px;
}

.cpv-selection-summary__line {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.28;
}

.cpv-order-form {
  display: grid;
  gap: 18px;
}

.cpv-field,
.cpv-field-grid {
  display: grid;
  gap: 12px;
}

.cpv-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  align-items: start;
}

.cpv-field label {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
}

.cpv-field input,
.cpv-field textarea,
.cpv-field select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--cpv-border);
  border-radius: 14px;
  padding: 11px 13px;
  background: #fff;
  min-height: 46px;
  line-height: 1.2;
  font-size: 0.94rem;
}

.cpv-choice-row,
.cpv-payment-list,
.cpv-package-list {
  display: grid;
  gap: 12px;
}

.cpv-choice-row label,
.cpv-payment-option,
.cpv-package-option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cpv-choice-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
}

.cpv-choice-row label {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.94rem;
  font-weight: 500;
}

.cpv-choice-row input[type="radio"] {
  appearance: auto;
  margin: 0;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  min-height: 0;
  padding: 0;
  transform: none;
  accent-color: #2563eb;
}

.cpv-payment-option input[type="radio"],
.cpv-package-option input[type="radio"],
.cpv-field--checkbox input[type="checkbox"] {
  appearance: auto;
  width: 14px;
  height: 14px;
  min-height: 0;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
  transform: none;
  accent-color: #2563eb;
}

.cpv-field--checkbox label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.cpv-payment-option,
.cpv-package-option {
  border: 1px solid var(--cpv-border);
  border-radius: 16px;
  padding: 12px 14px;
}

.cpv-payment-option span,
.cpv-package-option span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cpv-payment-option strong,
.cpv-package-option strong {
  font-size: 0.95rem;
}

.cpv-package-option {
  background: #fff;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.cpv-package-option:has(input:checked) {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.2);
}

.cpv-package-option:has(input:checked) small {
  color: rgba(255, 255, 255, 0.86);
}

.cpv-payment-option--disabled {
  opacity: 0.78;
  background: #f7f4ef;
}

.cpv-payment-option small,
.cpv-package-option small {
  display: block;
  color: var(--cpv-muted);
  margin-top: 4px;
  font-size: 0.84rem;
  line-height: 1.25;
}

.cpv-payment-warning {
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  background: #fff1eb;
  color: #8a381f;
  border: 1px solid #f0cbbb;
  font-size: 0.88rem;
  line-height: 1.3;
}

.cpv-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
}

.cpv-modal[hidden] {
  display: none;
}

.cpv-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 14, 11, 0.52);
  backdrop-filter: blur(8px);
}

.cpv-modal__dialog {
  position: relative;
  width: min(100%, 620px);
  border-radius: 26px;
  background: linear-gradient(180deg, #fffaf2 0%, #ffffff 100%);
  border: 1px solid rgba(191, 59, 29, 0.16);
  box-shadow: 0 26px 70px rgba(20, 15, 9, 0.22);
  padding: 28px 26px 24px;
}

.cpv-modal__close {
  appearance: none;
  border: 0;
  background: transparent;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #4f4638;
  font-size: 1.7rem;
  cursor: pointer;
}

.cpv-modal__close:hover {
  background: rgba(0, 0, 0, 0.05);
}

.cpv-modal__eyebrow {
  margin: 0 0 8px;
  color: var(--cpv-accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
}

.cpv-modal__dialog h3 {
  margin: 0 0 8px;
  font-size: 1.65rem;
  line-height: 1.05;
}

.cpv-modal__lead {
  margin: 0 0 12px;
  color: var(--cpv-muted);
  font-size: 0.96rem;
}

.cpv-modal__description {
  margin: 0 0 20px;
  padding: 16px;
  border: 1px solid rgba(191, 59, 29, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: #51483c;
  font-size: 0.92rem;
  line-height: 1.42;
}

.cpv-modal__description p {
  margin: 0 0 10px;
}

.cpv-modal__description p:last-child {
  margin-bottom: 0;
}

.cpv-modal__field {
  display: grid;
  gap: 10px;
}

.cpv-modal__field label {
  font-size: 0.88rem;
  font-weight: 600;
}

.cpv-slot-table {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.cpv-slot-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 11px;
  border: 1px solid var(--cpv-border);
  border-radius: 15px;
  background: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.cpv-slot-option input {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  accent-color: var(--cpv-accent);
}

.cpv-slot-option:has(input:checked) {
  border-color: var(--cpv-accent);
  background: #fff0e8;
  box-shadow: 0 10px 24px rgba(191, 59, 29, 0.14);
}

.cpv-slot-option.is-disabled {
  color: #918a80;
  background: rgba(60, 53, 45, 0.07);
  cursor: not-allowed;
}

.cpv-modal__note {
  margin: 14px 0 0;
  color: var(--cpv-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.cpv-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.cpv-modal__button {
  appearance: none;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.cpv-modal__button--secondary {
  border: 1px solid var(--cpv-border);
  background: #fff;
  color: var(--cpv-text);
}

.cpv-modal__button--primary {
  border: 1px solid var(--cpv-accent);
  background: var(--cpv-accent);
  color: #fff;
}

.cpv-submit {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--cpv-accent);
  color: #fff;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  width: auto;
  min-width: 150px;
  min-height: 36px;
  justify-self: start;
}

.cpv-submit:hover {
  filter: brightness(0.95);
}

.cpv-company-fields[hidden] {
  display: none;
}

.cpv-trackday .woocommerce-error,
.cpv-trackday .woocommerce-message,
.cpv-trackday .woocommerce-info {
  border-radius: 18px;
  border-left: 0;
  margin: 0 0 20px;
}

@media (max-width: 1040px) {
  .cpv-trackday__layout {
    grid-template-columns: 1fr;
  }

  .cpv-calendar,
  .cpv-form,
  .cpv-trackday__conditions--calendar {
    grid-column: auto;
    grid-row: auto;
  }

  .cpv-product-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cpv-form__panel {
    position: static;
  }
}

@media (max-width: 740px) {
  .cpv-trackday {
    padding: 28px 16px 48px;
  }

  .cpv-trackday__intro,
  .cpv-calendar__header,
  .cpv-field-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .cpv-product-showcase {
    grid-template-columns: 1fr;
  }

  .cpv-form__panel {
    padding: 24px 20px;
  }

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

  .cpv-modal__dialog {
    padding: 24px 18px 20px;
  }

  .cpv-modal__actions {
    flex-direction: column-reverse;
  }

  .cpv-modal__button {
    width: 100%;
  }

  .cpv-slot-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cpv-calendar__weekdays,
  .cpv-calendar__grid {
    gap: 8px;
  }

  .cpv-day,
  .cpv-calendar__empty {
    aspect-ratio: 1 / 1;
    min-height: 0;
  }

  .cpv-submit {
    width: 100%;
    justify-self: stretch;
  }
}
