/* /packages — listing page styles. Lifted out of the inline <style>
   block in views/packages.ejs (M-3 from docs/DESIGN-AUDIT_2026-05-04).
   Two deliberate renames at extraction time:
     - `.package-card`            → `.package-listing-card`
     - `.pkg-category-heading`    → `.package-listing-heading`
   Both names previously collided with rules in booking.css that have
   different visual treatments. The booking ones win on `/book` because
   that route loads booking.css; the listing ones now have unique names
   so future loads of booking.css on `/packages` (or vice versa) won't
   silently swap visuals.

   The detail-page rules (`.pkg-card`, `.pkg-sidebar-*`, etc.) for
   /packages/{slug} are appended below — Phase 5 of the same audit. */

/* ========== /packages — LISTING PAGE ==========
   Solid cream (light) / #1a1a1a (dark) base + scoped paper-texture pseudo
   at opacity 0.1 in light theme (multiply blend). White listing cards sit
   on top of the texture; the multiply blend only affects the section bg,
   not the cards (cards paint after the pseudo in source order). */
.packages-listing {
  position: relative;
  padding: 4rem 0;
}

[data-theme='light'] .packages-listing {
  background: #f9f6ef;
}


/* Texture pseudo on light theme only: the cream section bg covers the
   site-wide body::before grain inside the section, so this pseudo
   restores the texture (multiply blend over cream). Dark theme has no
   section bg and no section pseudo; body::before paper grain shows
   through unchanged (matches /menu dark treatment). */
[data-theme='light'] .packages-listing::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: image-set(
    url('/images/textures/subtle-texture.webp') type('image/webp'),
    url('/images/textures/subtle-texture.jpg') type('image/jpeg')
  );
  background-repeat: repeat;
  background-size: 600px 600px;
  opacity: 0.1;
  mix-blend-mode: multiply;
}


.packages-listing > .container {
  position: relative;
  z-index: 1;
}


/* Category heading — centred, editorial, no heavy gold underline. */
.package-listing-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.01em;
  margin: 3rem 0 1.25rem;
  padding: 0;
  border: none;
  text-align: center;
  scroll-margin-top: 100px;
}
.pkg-category-group:first-of-type .package-listing-heading {
  margin-top: 0;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 1.75rem;
}

/* Filter bar — pill style, shared with /menu + /order. */
.packages-filter {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
  justify-content: center;
}
.pkg-filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  background: transparent;
  color: var(--accent-text);
  border: 1px solid #c9a96e63;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.pkg-filter-btn:hover {
  background: var(--accent);
  color: #1a1a1a;
}
.pkg-filter-btn.active {
  background: var(--accent);
  color: #ffffff;
}

/* Editorial package card — bordered left accent in gold, italic
   description, definition-list metadata for price + guests, uppercase
   link at the foot. Renamed from `.package-card` to break the booking.css
   collision. */
/* Listing card identity is the left gold accent + editorial typography.
   White bg in light theme so the card pops off the section's gradient +
   texture (Iteration 52); dark theme inherits transparent. */
.package-listing-card {
  padding: 1.85rem 1.85rem 1.5rem 2.1rem;
  border-left: 3px solid var(--accent);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme='light'] .package-listing-card {
  background: #ffffff;
}

[data-theme='dark'] .package-listing-card {
  background: #000000;
}
.package-listing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22);
  border-left-color: var(--accent-hover-text);
}

[data-theme='dark'] .package-listing-card:hover {
  box-shadow: 0 24px 48px rgba(201, 169, 110, 0.25);
}
.package-listing-name {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0 0 0.6rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.package-listing-desc {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.package-listing-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.25rem;
  margin: 0 0 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--bg-tertiary);
  border-bottom: 1px solid var(--bg-tertiary);
}
.package-listing-meta > div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.package-listing-meta dt {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
  font-weight: 600;
  margin: 0;
}
.package-listing-meta dd {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.package-listing-price {
  color: var(--accent-text) !important;
}
.package-listing-link {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-text);
  padding-top: 0.25rem;
  overflow: hidden;
}
.package-listing-link span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 2px solid #c9a96e63;
  padding-bottom: 5px;
}
.package-listing-link i {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.package-listing-link:hover {
  color: var(--accent-hover-text);
}
.package-listing-link:hover i {
  transform: translateX(5px);
}

/* ========== /packages/{slug} — DETAIL PAGE ==========
   Lifted from inline <style> in views/package-detail.ejs (M-4 from
   docs/DESIGN-AUDIT_2026-05-04). Card surfaces wear the redesign
   neutral hairline + 20px radius vocabulary (rolled out site-wide
   2026-05-06). `.back-link` uses the canonical from components.css. */

.pkg-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.pkg-card {
  background: var(--bg-primary);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: background-color 0.3s;
}

.pkg-description {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

.pkg-category-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--accent-text);
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.pkg-items-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pkg-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--bg-tertiary);
}
.pkg-item:last-child {
  border-bottom: none;
}
.pkg-item-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.pkg-item-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
}
.pkg-item-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

/* Tag radius aligned to var(--radius-sm) — was 2px (a fifth radius
   that the design memo warns against). */
.pkg-tag {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #1a1a1a;
  border-radius: var(--radius-sm);
}
.pkg-item-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.3rem 0 0;
  line-height: 1.6;
}

/* Sidebar — neutral hairline + 20px radius, matches .pkg-card. */
.pkg-sidebar-card {
  background: var(--bg-primary);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  padding: 2rem;
  transition: background-color 0.3s;
}
.pkg-sidebar-price {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent-text);
  line-height: 1;
  text-align: center;
}
.pkg-sidebar-price-label {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.6;
  margin-bottom: 1.5rem;
}
.pkg-sidebar-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--bg-tertiary);
  border-bottom: 1px solid var(--bg-tertiary);
}
.pkg-sidebar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}
.pkg-sidebar-row i {
  color: var(--accent-text);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.pkg-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.pkg-sidebar-actions .btn {
  text-align: center;
}

/* Small utility — used on the package-detail kicker fallback. */
.capitalize {
  text-transform: capitalize;
}

@media (min-width: 768px) {
  .pkg-layout {
    grid-template-columns: 1fr 320px;
  }
  .pkg-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
  }
}

@media (max-width: 767px) {
  .packages-listing {
    padding: 2rem 0;
  }
  .packages-filter {
    gap: 1rem;
    margin-bottom: 2em;
  }
  .pkg-card {
    padding: 1.5rem;
  }
  .pkg-sidebar-card {
    padding: 1.5rem;
  }
  .pkg-sidebar-price {
    font-size: 2.5rem;
  }
}

/* Package detail page (/packages/:id) - bespoke backgrounds per theme.
   Light: warm off-white. Dark: flat neutral. The site-wide paper-grain
   overlay is suppressed in both themes so the colour reads as a clean
   panel. The list page (/packages) keeps the default themed background
   + texture. */
body[data-page='package-detail'] {
  background-color: #f9f6ef;
}

[data-theme='dark'] body[data-page='package-detail'] {
  background-color: #1a1a1a;
}

body[data-page='package-detail']::before {
  display: none;
}
