/* =========================================================
   SURGERY PACKAGE DETAIL PAGE
   Hero · Section tabs · Inclusions / charges sections ·
   Price summary · Book Now (booking popup in booking-modal.css)
   ========================================================= */

.spd-page {
  --sp-navy: #123684;
  --sp-pink: #f72559;
  --sp-text: #1f2b45;
  --sp-muted: #6b7688;
  --sp-border: #e6e9f0;
  --sp-light: #f7f9fc;
  --sp-green: #1a9d5c;

  background: var(--sp-light);
  padding: 0 0 72px;
  font-family: "Plus Jakarta Sans", "Inter", Arial, sans-serif;
  color: var(--sp-text);
}

.spd-page *, .spd-page *::before, .spd-page *::after { box-sizing: border-box; }

.spd-container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.spd-preview-bar { background: #fff7ed; border-bottom: 1px solid #fed7aa; color: #9a3412; font-size: 13px; font-weight: 600; padding: 10px 20px; text-align: center; }

.spd-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 22px 0 16px; font-size: 13px; color: var(--sp-muted); }
.spd-breadcrumb a { color: inherit; text-decoration: none; }
.spd-breadcrumb a:hover { color: var(--sp-navy); }
.spd-breadcrumb strong { color: var(--sp-text); font-weight: 600; }

/* Hero */
.spd-hero { text-align: left; display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; background: #fff; border: 1px solid var(--sp-border); border-radius: 20px; padding: 28px; }
.spd-chip { display: inline-block; background: #eef3ff; color: var(--sp-navy); font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.spd-hero h1 { margin: 12px 0 6px; font-size: 30px; line-height: 1.2; font-weight: 800; color: #0f172a; }
.spd-hero h1 small { display: block; font-size: 15px; font-weight: 600; color: var(--sp-muted); margin-top: 4px; }
.spd-hospital { margin: 0 0 20px; color: var(--sp-muted); font-size: 15px; }
.spd-hospital a { color: var(--sp-pink); font-weight: 700; text-decoration: none; }
.spd-hospital .fa-circle-check { color: var(--sp-green); margin-left: 4px; }

.spd-facts { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.spd-facts > div { background: var(--sp-light); border: 1px solid var(--sp-border); border-radius: 14px; padding: 12px 18px; min-width: 150px; }
.spd-facts dt { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--sp-muted); }
.spd-facts dd { margin: 4px 0 0; font-size: 17px; font-weight: 800; color: #0f172a; }
.spd-facts .spd-price { color: var(--sp-pink); font-size: 22px; }

.spd-hero-actions { display: flex; flex-direction: column; gap: 10px; min-width: 190px; }

.spd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 12px; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; font-family: inherit; transition: .15s; }
.spd-btn-primary { background: var(--sp-pink); color: #fff; }
.spd-btn-primary:hover { background: #e01649; }
.spd-btn-ghost { background: #fff; color: var(--sp-navy); border-color: var(--sp-navy); }
.spd-btn-ghost:hover { background: #f5f8ff; }

/* Detail tabs (one section group at a time, so the page stays short) */
[x-cloak] { display: none !important; }
.spd-tabs { position: sticky; top: 0; z-index: 20; display: flex; gap: 4px; overflow-x: auto; padding: 6px; background: #fff; border: 1px solid var(--sp-border); border-radius: 14px; scrollbar-width: none; box-shadow: 0 4px 14px rgba(15, 23, 42, .04); }
.spd-tabs::-webkit-scrollbar { display: none; }
.spd-tabs button { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--sp-muted); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.spd-tabs button:hover { background: #f5f8ff; color: var(--sp-navy); }
.spd-tabs button.is-on { background: var(--sp-navy); color: #fff; }
.spd-panel { display: flex; flex-direction: column; gap: 16px; animation: spdFade .18s ease; }
@keyframes spdFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.spd-subhead { margin: 18px 0 12px; font-size: 15px; font-weight: 800; color: #0f172a; }
.spd-gap { margin-top: 24px !important; }

.spd-services { padding: 22px 24px 10px; }
.spd-svc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.spd-svc-head h2 { margin: 0; }
.spd-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--sp-muted); }
.spd-legend span { display: inline-flex; align-items: center; gap: 6px; }
.spd-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.spd-dot.is-included { background: #16a34a; } .spd-dot.is-limit { background: #2563eb; } .spd-dot.is-extra { background: #94a3b8; }

.spd-svc-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid #eef2f7; }
.spd-svc-row:first-of-type { border-top: 0; }
.spd-svc-cat { display: flex; align-items: center; gap: 10px; align-self: start; padding-top: 3px; font-size: 13.5px; font-weight: 800; color: #0f172a; }
.spd-svc-cat i { flex: 0 0 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #eef3ff; color: var(--sp-navy); font-size: 12.5px; }
.spd-svc-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.spd-svc-items li { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 30px; }
.spd-svc-name { font-size: 14px; font-weight: 600; color: #1e293b; line-height: 1.4; }
.spd-svc-name small { display: block; font-size: 12px; font-weight: 500; color: var(--sp-muted); }
.spd-svc-name .spd-tag { font-style: normal; }
.spd-pill { flex: 0 0 auto; max-width: 52%; text-align: right; font-size: 12.5px; font-weight: 700; line-height: 1.35; padding: 5px 11px; border-radius: 999px; }
.spd-pill.is-included { color: #15803d; background: #f0fdf4; }
.spd-pill.is-limit { color: #1d4ed8; background: #eff6ff; }
.spd-pill.is-extra { color: #475569; background: #f1f5f9; }

/* Layout */
.spd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; margin-top: 18px; }
.spd-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.spd-card { background: #fff; border: 1px solid var(--sp-border); border-radius: 18px; padding: 24px; scroll-margin-top: 80px; }
.spd-card h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 18px; font-weight: 800; color: #0f172a; }
.spd-card h2 i { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #eef3ff; color: var(--sp-navy); font-size: 15px; }
.spd-card p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.7; color: #475569; }
.spd-card p:last-child { margin-bottom: 0; }
.spd-muted { color: var(--sp-muted) !important; font-size: 13px !important; }
.spd-rule { font-size: 14px !important; }

.spd-ticks, .spd-crosses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.spd-ticks li, .spd-crosses li { position: relative; padding-left: 26px; font-size: 14px; line-height: 1.5; }
.spd-ticks li::before { content: "\f058"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; color: var(--sp-green); }
.spd-crosses li::before { content: "\f057"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; color: #ef4444; }

.spd-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
.spd-pairs > div { background: var(--sp-light); border-radius: 12px; padding: 12px 14px; }
.spd-pairs dt { font-size: 12px; color: var(--sp-muted); font-weight: 600; }
.spd-pairs dd { margin: 3px 0 0; font-size: 14.5px; font-weight: 700; color: #0f172a; }

.spd-items { list-style: none; margin: 0; padding: 0; }
.spd-items li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--sp-border); font-size: 14px; }
.spd-items li:last-child { border-bottom: 0; padding-bottom: 0; }
.spd-items li:first-child { padding-top: 0; }
.spd-items strong { color: #0f172a; }
.spd-items strong a { color: var(--sp-navy); text-decoration: none; }
.spd-items small { display: block; color: var(--sp-muted); font-size: 12.5px; margin-top: 3px; }
.spd-items li > span { text-align: right; color: #334155; font-weight: 600; max-width: 55%; }
.spd-tag { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; color: #92400e; background: #fef3c7; border-radius: 999px; padding: 1px 8px; vertical-align: middle; }

.spd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spd-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--sp-muted); padding: 0 0 8px; }
.spd-table td { padding: 11px 0; border-top: 1px solid var(--sp-border); vertical-align: top; }
.spd-table td:last-child, .spd-table th:last-child { text-align: right; padding-left: 16px; }
.spd-table td small { display: block; color: var(--sp-muted); font-size: 12px; margin-top: 2px; }
.spd-table tfoot td { font-weight: 800; color: #0f172a; border-top: 2px solid #0f172a; }

.spd-terms { margin: 0 0 10px; padding-left: 20px; font-size: 14px; line-height: 1.7; color: #475569; }

.spd-book { border: 2px solid var(--sp-pink); background: linear-gradient(180deg, #fff 0%, #fff5f7 100%); }
.spd-steps { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 18px; padding: 0; list-style: none; counter-reset: step; }
.spd-steps span { counter-increment: step; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #334155; background: #fff; border: 1px solid var(--sp-border); border-radius: 999px; padding: 6px 14px 6px 6px; }
.spd-steps span::before { content: counter(step); width: 22px; height: 22px; border-radius: 50%; background: var(--sp-navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }

/* Price summary */
.spd-aside { position: sticky; top: 76px; }
.spd-summary { background: #fff; border: 1px solid var(--sp-border); border-radius: 18px; padding: 22px; box-shadow: 0 10px 30px rgba(15, 23, 42, .06); }
.spd-summary-label { display: block; font-size: 12px; font-weight: 700; color: var(--sp-muted); text-transform: uppercase; letter-spacing: .4px; }
.spd-summary-price { display: block; font-size: 30px; font-weight: 800; color: var(--sp-pink); margin: 4px 0 14px; }
.spd-summary ul { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; font-size: 14px; color: #334155; }
.spd-summary li i { width: 18px; color: var(--sp-navy); }
.spd-summary .spd-btn { width: 100%; }
.spd-summary p { margin: 12px 0 0; font-size: 12px; color: var(--sp-muted); line-height: 1.5; }

@media (max-width: 960px) {
  .spd-layout { grid-template-columns: 1fr; }
  .spd-aside { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 30; }
  .spd-summary { border-radius: 16px 16px 0 0; padding: 12px 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 -8px 24px rgba(15, 23, 42, .12); }
  .spd-summary-label, .spd-summary ul, .spd-summary p { display: none; }
  .spd-summary-price { margin: 0; font-size: 20px; flex: 1; }
  .spd-summary .spd-btn { width: auto; }
}

@media (max-width: 640px) {
  .spd-container { padding: 0 16px; }
  .spd-hero { flex-direction: column; align-items: stretch; padding: 20px; }
  .spd-hero h1 { font-size: 24px; }
  .spd-facts > div { flex: 1 1 140px; min-width: 0; }
  .spd-hero-actions { flex-direction: row; min-width: 0; }
  .spd-hero-actions .spd-btn { flex: 1; }
  .spd-card { padding: 18px; }
  .spd-ticks, .spd-crosses, .spd-pairs { grid-template-columns: 1fr; }
  .spd-services { padding: 18px 16px 6px; }
  .spd-svc-row { grid-template-columns: 1fr; gap: 10px; }
  .spd-svc-items li { align-items: flex-start; }
  .spd-pill { max-width: 55%; }
  .spd-tabs button { flex: 0 0 auto; padding: 9px 12px; font-size: 13px; }
  .spd-items li { flex-direction: column; gap: 4px; }
  .spd-items li > span { text-align: left; max-width: none; }
}
