.pricing-section {
  background: var(--white);
  padding: 70px 0;
}

.pricing-section .section-title,
.section-sub {
  text-align: center;
  margin: 25px auto;
}

.pricing-tabs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border: none;
  border-radius: 6px;
  width: fit-content;
  overflow: visible;
  margin: 0 auto 48px;
}

.pricing-tabs-prompt {
  font-size: 14px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0;
}

.pricing-tabs div {
  display: flex;
  gap: 0;
  border: none;
  border-radius: 6px;
  overflow: hidden;
}

.tab-btn {
  padding: 14px 32px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--slate);
  background: transparent;
  border: 2px solid var(--divider);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  font-family: var(--sans);
  box-shadow: none;
}

.tab-btn.active {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

.tab-btn:not(.active):hover {
  background: var(--gold-pale);
  border-color: var(--gold);
  color: var(--black);
}

.tab-btn:first-child {
  border-radius: 6px 0 0 6px;
}

.tab-btn:last-child {
  border-radius: 0 6px 6px 0;
}

.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: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
  align-items: stretch;
}

/* Force 4 columns on wide screens when 4 cards */
@media (min-width: 1025px) {
  .package-cards:has(.pkg-card:nth-child(4)) {
    grid-template-columns: repeat(4, 1fr);
  }
}

.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;
  text-align: center;
}

.pkg-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--gold);
}

.pkg-card.featured {
  border-color: var(--divider);
  background: var(--gold-pale);
}

.pkg-card.featured:hover {
  border-color: var(--divider);
}

.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-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 28px rgba(200,134,26,0.3), 0 0 0 1px var(--gold);
}

.pkg-card.selected:hover {
  border-color: var(--gold);
  box-shadow: 0 0 36px rgba(200,134,26,0.4), 0 0 0 1px var(--gold);
  transform: translateY(-4px);
}

.pkg-card.selected::after {
  content: '✓ Selected';
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #fff;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  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;
  justify-content: center;
  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;
}

@media (max-width: 1024px) {
  .addons-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .addons-grid {
    grid-template-columns: 1fr;
  }
}

.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;
}

.addon-item {
  position: relative;
}

.addon-item::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--black);
  color: var(--white);
  font-size: 11px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.addon-item:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Construction pricing */
.construction-pkg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.addons-label {
  justify-content: center;
  margin-top: 48px;
  margin-bottom: 20px;
  font-size: 11px;
}

.addons-label::before {
  display: none;
}

.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);
  border-color: var(--gold);
}

.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 {
    grid-template-columns: repeat(2, 1fr);
  }

  .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 {
    grid-template-columns: 1fr;
  }

  .pkg-card {
    padding: 24px 20px;
    text-align: center;
  }

  .pkg-card ul li {
    display: flex;
    justify-content: center;
  }

  .pkg-includes li {
    border-bottom: none;
  }

  /* Tabs full width */
  .pricing-tabs div {
    display: flex;
    width: 100%;
  }

  .tab-btn {
    flex: 1;
    text-align: center;
    padding: 14px 10px;
    font-size: 12px;
  }

  /* TABLE — card layout on mobile */
  .pricing-table-wrapper {
    overflow-x: visible;
    -webkit-overflow-scrolling: auto;
    position: static;
  }

  .pricing-table-wrapper::after {
    display: none;
  }

  .pricing-table {
    min-width: auto;
    border: none;
  }

  .pricing-table thead {
    display: none;
  }

  .pricing-table tbody tr {
    display: block;
    margin-bottom: 12px;
    border: 1px solid var(--divider);
    border-radius: 8px;
    background: var(--white);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
  }

  .pricing-table tbody tr:hover {
    background: var(--white);
    box-shadow: var(--shadow-md);
  }

  .pricing-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--divider);
  }

  .pricing-table td:last-child {
    border-bottom: none;
  }

  .pricing-table td:first-child {
    background: var(--black);
    color: var(--white);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    justify-content: center;
    padding: 14px 16px;
    border-bottom: none;
    position: static;
    z-index: auto;
    border-right: none;
    box-shadow: none;
  }

  .pricing-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 12px;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    margin-right: 12px;
  }

  .pricing-table td:first-child::before {
    display: none;
  }

  .pricing-table td.price-cell {
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 600;
  }

  .pricing-table td.price-cell.gold-col {
    color: var(--gold);
    background: var(--gold-pale);
  }

  .pricing-table thead th.gold-col::before {
    display: none;
  }

  .construction-pkg-grid {
    grid-template-columns: 1fr;
  }

  /* Better section spacing */
  .section-title {
    font-size: 30px;
  }

  .section-sub {
    font-size: 14px;
  }
}


/* ---------- Small Mobile ---------- */
@media (max-width: 480px) {

  .section-title {
    font-size: 26px;
  }

  .pkg-card {
    padding: 24px 20px;
  }

  .addon-item {
    padding: 16px;
  }

  .cpkg-price {
    font-size: 36px;
  }



}