.pricing-section {
  background: var(--white);
}

.pricing-section .section-title,
.section-sub {
  text-align: center;
  margin: 25px auto;
}

.pricing-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--divider);
  border-radius: 6px;
  width: fit-content;
  overflow: hidden;
  margin: auto;
  margin-bottom: 56px;
}

.tab-btn {
  padding: 12px 28px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--slate);
  background: var(--white);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: var(--sans);
}

.tab-btn.active {
  background: var(--black);
  color: var(--white);
}

.tab-btn:not(.active):hover {
  background: var(--mist);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Residential pricing grid */
.pricing-table-wrapper {
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
}

.pricing-table thead tr {
  background: var(--black);
}

.pricing-table thead th {
  padding: 18px 24px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  text-align: left;
}

.pricing-table thead th:first-child {
  min-width: 160px;
}

.pricing-table thead th.gold-col {
  background: var(--gold);
  color: white;
  position: relative;
}

.pricing-table thead th.gold-col::before {
  content: '★ POPULAR';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold-light);
  color: white;
  font-size: 8px;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 0 0 4px 4px;
  white-space: nowrap;
}

.pricing-table tbody tr {
  border-bottom: 1px solid var(--divider);
  transition: background 0.15s;
}

.pricing-table tbody tr:hover {
  background: var(--gold-pale);
}

.pricing-table tbody tr:last-child {
  border-bottom: none;
}

.pricing-table td {
  padding: 18px 24px;
  font-size: 15px;
  color: var(--charcoal);
}

.pricing-table td:first-child {
  font-weight: 600;
  color: var(--black);
  font-size: 13px;
}

.pricing-table td.price-cell {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--black);
}

.pricing-table td.price-cell.gold-col {
  color: var(--gold);
}

/* Package cards */
.package-cards {
  display: flex;
  justify-content: center;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.pkg-card {
  border: 1px solid var(--divider);
  border-radius: 8px;
  padding: 28px 24px;
  background: var(--white);
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  cursor: pointer;
}

.pkg-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.pkg-card.featured {
  border-color: var(--gold);
  background: var(--gold-pale);
}

.pkg-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: white;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 0 0 6px 6px;
  white-space: nowrap;
}

.pkg-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.pkg-card h4 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 16px;
  line-height: 1.2;
}

.pkg-includes {
  list-style: none;
}

.pkg-includes li {
  font-size: 12.5px;
  color: var(--slate);
  padding: 6px 0;
  border-bottom: 1px solid var(--divider);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.4;
}

.pkg-includes li:last-child {
  border-bottom: none;
}

.pkg-includes li::before {
  content: '—';
  color: var(--gold);
  flex-shrink: 0;
  font-size: 10px;
  margin-top: 2px;
}

/* Add-ons */
.addons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 36px;
}

.addon-item {
  border: 1px solid var(--divider);
  border-radius: 6px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
  transition: border-color 0.2s;
}

.addon-item:hover {
  border-color: var(--gold);
}

.addon-item span {
  font-size: 13px;
  color: var(--charcoal);
}

.addon-price {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  margin-left: 12px;
}

/* Construction pricing */
.construction-pkg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.cpkg-card {
  border: 1px solid var(--divider);
  border-radius: 8px;
  padding: 36px 32px;
  background: var(--white);
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  cursor: pointer;
}

.cpkg-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.cpkg-card.featured {
  background: var(--black);
  border-color: var(--black);
}

.cpkg-card.featured * {
  color: white !important;
}

.cpkg-card.featured .pkg-name {
  color: var(--gold) !important;
}

.cpkg-card.featured .cpkg-price {
  color: var(--gold) !important;
}

.cpkg-card.featured .pkg-includes li {
  border-color: #2a2a2a !important;
  color: #aaa !important;
}

.cpkg-price {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 700;
  color: var(--black);
  line-height: 1;
  margin-bottom: 6px;
}

.cpkg-card h4 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 6px;
}

.cpkg-desc {
  font-size: 13px;
  color: var(--slate);
  margin-bottom: 24px;
  line-height: 1.5;
}

/*  */
/* =========================================
   RESPONSIVE PRICING SYSTEM
   ========================================= */

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {

  .package-cards .pkg-card {
    /* grid-template-columns: repeat(2, 1fr); */
    width: 49%;

  }

  .addons-grid {
    display: grid;
  }

  .pricing-section .container {
    padding-left: 24px;
    padding-right: 24px;
  }

  .pricing-section .coverage-info {
    margin-top: 20px;
  }
}


/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .pricing-section {
    text-align: center;
  }

  /* Stack cards */
  .package-cards .pkg-card {
    width: 100%;
  }

  .pkg-card {
    padding: 24px 20px;
    text-align: center;
  }

  .pkg-card ul li {
    display: flex;
    justify-content: center;
  }

  .pkg-includes li {
    border-bottom: none;
  }

  .addons-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Tabs full width */
  .pricing-tabs {
    width: 100%;
    display: flex;
  }

  .tab-btn {
    flex: 1;
    text-align: center;
    padding: 14px 10px;
    font-size: 12px;
  }

  /* TABLE UX FIX */
  .pricing-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
  }

  .pricing-table {
    min-width: 720px;
    /* prevents squishing */
  }

  /* Removed fade hint as first column is now sticky */

  /* Reduce table padding slightly */
  .pricing-table th,
  .pricing-table td {
    padding: 14px 16px;
  }

  .pricing-table td.price-cell {
    font-size: 18px;
  }

  /* Fixed First Column for Mobile */
  .pricing-table th:first-child,
  .pricing-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 5;
    border-right: 1px solid var(--divider);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
  }

  .pricing-table thead th:first-child {
    background: var(--black);
  }

  .pricing-table tbody td:first-child {
    background: var(--white);
  }

  .pricing-table tbody tr:hover td:first-child {
    background: var(--gold-pale);
  }

  /* Better section spacing */
  .section-title {
    font-size: 30px;
  }

  .section-sub {
    font-size: 14px;
  }
}


/* ---------- Small Mobile ---------- */
@media (max-width: 480px) {

  .pricing-table {
    min-width: 640px;
  }

  .section-title {
    font-size: 26px;
  }

  .pkg-card {
    padding: 24px 20px;
  }

  .addon-item {
    padding: 16px;
  }

  .cpkg-price {
    font-size: 36px;
  }

  .addons-grid {
    grid-template-columns: 1fr;
  }


}