/* Cart page (sections/main-cart.liquid). Line item markup and base styles come from
   assets/component-cart-drawer.css (.line-item--page); this file lays out the page, the summary
   and the booking details panel. */

.cart-page__heading { margin-bottom: clamp(28px, 4vw, 48px); }
/* only section on the page: leave room above the footer wave, which overlaps the last section */
.cart-page.section { padding-bottom: calc(var(--section-space) + clamp(30px, 5vw, 72px)); }

/* states */
.cart-page__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 180px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--c-green);
}
/* Shopify knows the line count (main-cart.liquid sets --expect-lines): reserve about the filled
   height while the cart renders client side, so the footer does not jump (CLS). Measured filled
   heights (one booked package per line): 390px 1103 / 1427 / 1752 for 1 / 2 / 3 lines, 768px
   1006 / 1293 / 1581, 1440px 601 / 711 / 999 (the summary column sets the floor). Each value sits
   about 5px under those; overshooting would make the content jump up instead. The empty cart keeps
   the 180px placeholder. */
.cart-page__app[data-expect-lines][data-state="loading"] .cart-page__loading { min-height: calc(var(--expect-lines) * 324px + 774px); }
@media (min-width: 750px) {
  .cart-page__app[data-expect-lines][data-state="loading"] .cart-page__loading { min-height: calc(var(--expect-lines) * 287px + 714px); }
}
@media (min-width: 990px) {
  .cart-page__app[data-expect-lines][data-state="loading"] .cart-page__loading { min-height: max(596px, calc(var(--expect-lines) * 287px + 132px)); }
}
.cart-page__spinner { display: inline-flex; color: var(--c-gold); animation: ne-cart-spin 1.6s linear infinite; }
@keyframes ne-cart-spin { to { transform: rotate(360deg); } }
.no-js .cart-page__app { display: none; }

.cart-page__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 56px) 28px;
  text-align: center;
}
.cart-page__empty-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin-bottom: 4px;
  border: 1px solid var(--c-gold-light);
  border-radius: 50%;
  background: var(--c-cream);
  color: var(--c-red);
  box-shadow: inset 0 0 0 4px var(--c-cream), inset 0 0 0 5px rgba(230, 207, 148, .9);
}
.cart-page__empty-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  line-height: 1.15;
  color: var(--c-green);
}
.cart-page__empty-title:focus { outline: none; }
.cart-page__empty-title:focus-visible { outline: var(--focus-ring); outline-offset: 4px; }
.cart-page__empty-text { margin: 0; color: var(--c-ink-soft); }
.cart-page__empty .ornament-rule { margin-block: 6px 10px; }

/* layout */
.cart-page__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
@media (min-width: 990px) {
  .cart-page__layout { grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); gap: clamp(28px, 3vw, 44px); }
  .cart-page__summary { position: sticky; top: calc(var(--header-height, 76px) + 24px); }
}

.cart-page__items { padding: 6px clamp(18px, 3vw, 32px) 10px; }
.cart-page__continue { min-height: 40px; }
.cart-page__items-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--c-gold-light);
}
.cart-page__items-title {
  margin: 0;
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--c-red);
}

/* booking details (line item properties) under each package */
.line-item--page .line-item__props-label {
  margin: 14px 0 0;
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-green);
}
.line-item--page .line-item__props {
  gap: 6px;
  margin-top: 8px;
  padding: 14px 16px;
  border: 1px solid var(--c-gold-light);
  border-left: 3px solid var(--c-gold);
  border-radius: 10px;
  background: rgba(243, 233, 216, .55);
  color: var(--c-ink);
}
.line-item--page .line-item__props li {
  display: grid;
  grid-template-columns: 8.4rem minmax(0, 1fr);
  align-items: baseline;
  gap: 2px 12px;
}
.line-item--page .line-item__prop-key {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-gold-text);
}
.line-item--page .line-item__prop-value {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.3;
  color: var(--c-ink);
  text-wrap: pretty;
}
.line-item--page .line-item__price {
  font-size: 1.6rem;
  color: var(--c-green);
}
.line-item--page .line-item__remove { padding-inline: 12px; margin-right: -12px; }
@media (min-width: 750px) {
  .line-item--page { grid-template-columns: 132px minmax(0, 1fr); }
  .line-item--page .line-item__media { width: 132px; height: 132px; }
}
@media (max-width: 559px) {
  /* phones: photo and title side by side, booking details and controls full width below */
  .line-item--page { grid-template-columns: 76px minmax(0, 1fr); column-gap: 14px; row-gap: 0; }
  .line-item--page .line-item__media { width: 76px; height: 76px; border-radius: 12px; }
  .line-item--page > .line-item__body { display: contents; }
  .line-item--page .line-item__head { grid-column: 2; align-self: center; }
  .line-item--page .line-item__title { font-size: 1.2rem; }
  .line-item--page .line-item__price { font-size: 1.35rem; }
  .line-item--page .line-item__variant,
  .line-item--page .line-item__unit { grid-column: 2; }
  .line-item--page .line-item__props-label,
  .line-item--page .line-item__props,
  .line-item--page .line-item__actions { grid-column: 1 / -1; }
  .line-item--page .line-item__props { padding: 12px 14px; }
  .line-item--page .line-item__props li { grid-template-columns: 7.4rem minmax(0, 1fr); gap: 2px 10px; }
  .line-item--page .line-item__prop-key { font-size: .66rem; letter-spacing: .1em; }
  .line-item--page .line-item__prop-value { font-size: 1.05rem; }
}

.cart-page__items-foot {
  display: flex;
  justify-content: flex-start;
  padding: 16px 0 14px;
  border-top: 1px solid var(--c-gold-light);
}

/* summary */
.cart-page__summary { padding: clamp(24px, 3vw, 34px); }
.cart-page__summary-title {
  margin: 0 0 18px;
  font-size: clamp(1.7rem, 2.6vw, 2rem);
}
.cart-page__summary .cart-error { margin-bottom: 16px; }
.cart-page__form { margin: 0; }
.cart-page__note { margin-bottom: 20px; }
.cart-page__note textarea {
  min-height: 92px;
  border-color: var(--c-field-border);
  border-radius: 14px;
  background-color: var(--c-ivory);
}
/* empty: still rendered, so the live region is in the accessibility tree before the first save; the
   negative top margin cancels the .field flex gap (8px, base.css), so an empty status adds no space */
.cart-page__note-status:empty { margin: -8px 0 0; }
.cart-page__note-status { color: var(--c-green); font-weight: 700; }

.cart-page__subtotal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--c-gold-light);
}
.cart-page__subtotal-label {
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.cart-page__subtotal-value {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--c-green);
  font-variant-numeric: lining-nums;
}
.cart-page__booking-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px dashed var(--c-gold-light);
  border-radius: 12px;
  background: var(--c-cream);
  font-size: .92rem;
  line-height: 1.45;
  color: var(--c-ink-soft);
}
.cart-page__booking-note .icon { flex: 0 0 auto; margin-top: 1px; color: var(--c-red); }
.cart-page__checkout { min-height: 56px; font-size: .9rem; }
.cart-page__trust {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 18px 0 0;
  list-style: none;
  border-top: 1px solid var(--c-gold-light);
}
.cart-page__trust li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: .72rem;
  line-height: 1.4;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--c-ink);
}
.cart-page__trust .icon { flex: 0 0 auto; width: 22px; height: 22px; color: var(--c-green); }
.cart-page__app.is-saving-note .cart-page__checkout { cursor: progress; }

/* no JavaScript fallback */
.cart-noscript__table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.cart-noscript__table th {
  padding: 10px 8px;
  border-bottom: 1px solid var(--c-gold-light);
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: left;
}
.cart-noscript__table td { padding: 16px 8px; border-bottom: 1px solid rgba(230, 207, 148, .7); vertical-align: top; }
.cart-noscript__title { font-family: var(--font-serif); font-weight: 700; font-size: 1.3rem; text-decoration: none; }
.cart-noscript__variant { display: block; font-size: .9rem; color: var(--c-ink-soft); }
.cart-noscript__remove { display: inline-block; margin-top: 8px; font-size: .85rem; }
.cart-noscript__qty { width: 80px; }
.cart-noscript__price { font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem; white-space: nowrap; }
.cart-noscript__subtotal { font-size: 1.1rem; }
.cart-noscript__actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (prefers-reduced-motion: reduce) {
  .cart-page__spinner { animation: none; }
}
