/* =========================================================
   Gamma Heating – Quote Calculator (Modern Edition)
   Enhanced with contemporary design aesthetics
   ========================================================= */

/* ========== GLOBAL RESET & VARIABLES ========== */
:root {
  --gamma-pink: #ff007f;
  --gamma-purple: #2b0050;
  --text-dark: #1a1a1a;
  --text-light: #cfc9d6;
  --border: #e5e5e5;
  --bg-light: #fafafa;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-hover: 0 12px 32px rgba(0,0,0,0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure consistent sizing within the app */
#gh-quote-app,
#gh-quote-app * {
  box-sizing: border-box;
}

/* Info text visibility inside steps */
.ghq-info {
  display: block;
  font-size: 14px;
  line-height: 1.6;
  color: #555;
  margin: 10px 0;
}

/* App shell */
#gh-quote-app {
  max-width: 1150px;
  margin: 40px auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Arial, sans-serif;
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== TOP CARD & STEPS ========== */
.ghq-card {
  background: linear-gradient(135deg, var(--gamma-purple) 0%, #3d1470 100%);
  padding: 32px;
  border-radius: 16px;
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 30px rgba(43, 0, 80, 0.2);
}

#gh-steps {
  margin-top: 20px;
}

/* Step block */
.ghq-step {
  background: #fff;
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  margin-top: 16px;
  text-align: center;
  border: 1px solid rgba(0,0,0,0.04);
  transition: var(--transition);
}

.ghq-step:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

/* Step header = first label */
.ghq-step > label:first-of-type {
  display: block;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px;
  color: #2a2a2a;
  letter-spacing: -0.3px;
}

/* Sub labels */
.ghq-step > label:not(:first-of-type) {
  font-size: 14px;
  font-weight: 600;
  color: #555;
}

/* ========== FORM ELEMENTS & GRID ========== */
.ghq-step label {
  font-weight: 600;
  margin: 6px 0;
  display: block;
}

.ghq-step select,
.ghq-step input {
  width: 100%;
  max-width: 420px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid #e5e5e5;
  margin: 0 auto 15px;
  font-size: 15px;
  transition: var(--transition);
  background: #fafafa;
}

.ghq-step input:focus,
.ghq-step select:focus {
  outline: none;
  border-color: var(--gamma-pink);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 0, 127, 0.08);
}

.ghq-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ========== BUTTONS (BASE) ========== */
.ghq-btn {
  background: linear-gradient(135deg, var(--gamma-pink) 0%, #ff3399 100%);
  color: #fff;
  padding: 13px 24px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  margin-top: 10px;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(255, 0, 127, 0.2);
}

.ghq-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 0, 127, 0.3);
}

.ghq-product-btn {
  background: linear-gradient(135deg, var(--gamma-pink) 0%, #ff3399 100%);
  color: #fff;
  border: none;
}

.ghq-btn:active {
  transform: scale(0.98);
}

/* ========== RESULTS: WRAPPERS & GRID ========== */
#ghq-results {
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  color: inherit;
  max-width: 1150px;
  margin: 0 auto;
}

#ghq-results .ghq-results-cards,
#ghq-results .ghq-results-grid {
  padding-left: 16px;
  padding-right: 16px;
}

#ghq-results h3 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.ghq-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-bottom: 30px;
  min-width: 0;
}

/* ========== PRODUCT CARD ========== */
.ghq-card-item {
  position: relative;
  overflow: hidden;
  align-items: stretch;
  background: #fff;
  color: #000;
  padding: 22px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 500px;
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.04);
}

.ghq-card-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.12);
  border-color: rgba(255, 0, 127, 0.2);
}

.ghq-card-item * {
  box-sizing: border-box;
  max-width: 100%;
}

.ghq-card-item img.ghq-img,
.ghq-img {
  max-height: 160px;
  object-fit: contain;
  margin-bottom: 14px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.04));
}

/* Titles & pricing in card */
.ghq-card-item h4 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.ghq-tier {
  font-size: 15px;
  color: var(--gamma-purple);
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 13px;
}

.ghq-price,
.ghq-price-total {
  font-weight: 700;
  margin-bottom: 5px;
}

.ghq-price { 
  font-size: 22px;
  background: linear-gradient(135deg, var(--gamma-pink) 0%, #ff3399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ghq-price-total { 
  font-size: 18px; 
  color: var(--gamma-pink);
}

/* Extras area inside card */
.ghq-extras-mini {
  margin: 14px 0 12px;
  font-size: 13px;
  text-align: left;
  border-top: 1px solid #f0f0f0;
  padding-top: 12px;
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.ghq-extras-mini::-webkit-scrollbar { width: 6px; }
.ghq-extras-mini::-webkit-scrollbar-thumb { 
  background: #e0e0e0; 
  border-radius: 4px; 
}
.ghq-extras-mini::-webkit-scrollbar-thumb:hover { 
  background: #d0d0d0; 
}

.ghq-extras-breakdown {
  margin: 10px 0;
  font-size: 14px;
  color: #555;
}

.ghq-extra-line {
  margin-bottom: 6px;
  line-height: 1.5;
}

/* Finance info inside card */
.ghq-finance {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--gamma-purple);
  background: rgba(43, 0, 80, 0.04);
  padding: 10px;
  border-radius: 8px;
}

.ghq-finance small {
  display: block;
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

/* ========== PRODUCT CARD ACTIONS (STACKED) ========== */
.ghq-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
}

.ghq-buttons button,
.ghq-buttons a {
  width: 100%;
  background: #fff;
  border: 2px solid var(--gamma-pink);
  color: var(--gamma-purple);
  font-weight: 600;
  font-size: 14px;
  padding: 12px;
  text-align: center;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  box-sizing: border-box;
}

.ghq-buttons button:hover,
.ghq-buttons a:hover {
  background: linear-gradient(135deg, var(--gamma-pink) 0%, #ff3399 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 0, 127, 0.3);
}

.ghq-btn-buy,
.ghq-btn-finance,
.ghq-btn-view {
  display: inline-block;
  width: 100%;
  text-align: center;
  background: #fff;
  border: 2px solid var(--gamma-pink);
  color: var(--gamma-purple);
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  padding: 12px;
  cursor: pointer;
  transition: var(--transition);
  box-sizing: border-box;
}

.ghq-btn-buy:hover,
.ghq-btn-finance:hover,
.ghq-btn-view:hover {
  background: linear-gradient(135deg, var(--gamma-pink) 0%, #ff3399 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 0, 127, 0.3);
}

.ghq-product-btn,
.ghq-send-quote {
  width: 100%;
  margin-top: auto;
  display: block;
}

/* ========== BRAND STRIP ========== */
.ghq-brand-strip {
  text-align: center;
  margin-top: 40px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.ghq-brand-logos {
  max-width: 320px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.ghq-brand-logos:hover {
  opacity: 1;
}

/* ========== LEAD FORM ========== */
.ghq-lead {
  max-width: 450px;
  margin: 30px auto 0;
  background: #fff;
  color: #000;
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.04);
}

.ghq-lead input {
  width: 100%;
  max-width: 420px;
  margin: 0 auto 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid #e5e5e5;
  transition: var(--transition);
  background: #fafafa;
}

.ghq-lead input:focus {
  border-color: var(--gamma-pink);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 0, 127, 0.08);
}

.ghq-lead button {
  width: 100%;
  margin-top: 10px;
}

#ghq-results .ghq-lead {
  margin-top: 35px;
  text-align: center;
}

/* ========== TILES (Icon + Text) ========== */
.ghq-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin: 10px auto 6px;
  max-width: 720px;
}

.ghq-tile {
  background: #fff;
  border: 2px solid #f0f0f0;
  border-radius: 12px;
  padding: 16px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  cursor: pointer;
  user-select: none;
  text-align: center;
  transition: var(--transition);
}

.ghq-tile .ghq-tile-icon {
  font-size: 32px;
  line-height: 1;
  display: block;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

.ghq-tile:hover .ghq-tile-icon {
  transform: scale(1.1);
}

.ghq-tile .ghq-tile-label {
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.ghq-tile:hover { 
  border-color: var(--gamma-pink);
  box-shadow: 0 4px 16px rgba(255, 0, 127, 0.15);
  transform: translateY(-2px);
}

.ghq-tile.selected {
  border-color: var(--gamma-pink);
  background: linear-gradient(135deg, rgba(255, 0, 127, 0.05) 0%, rgba(255, 51, 153, 0.05) 100%);
  box-shadow: 0 0 0 3px rgba(255,0,127,0.12);
}

.ghq-tiles.ghq-tiles-small .ghq-tile {
  padding: 12px 10px;
}

.ghq-help {
  font-size: 13px;
  color: #777;
  margin-top: 6px;
}

/* ========== POPUP SYSTEM ========== */
.ghq-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(43, 0, 80, 0.9);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#ghq-popup-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ghq-popup {
  background: #fff;
  width: 90%;
  max-width: 420px;
  border-radius: 16px;
  text-align: center;
  padding: 28px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

#ghq-popup {
  max-width: 420px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  animation: ghq-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ghq-popup h3 {
  margin-top: 0;
  color: var(--gamma-purple);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.ghq-popup p {
  font-size: 15px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.ghq-popup input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e5e5;
  font-size: 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  transition: var(--transition);
  background: #fafafa;
}

.ghq-popup input:focus {
  outline: none;
  border-color: var(--gamma-pink);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 0, 127, 0.08);
}

.ghq-popup button {
  background: linear-gradient(135deg, var(--gamma-pink) 0%, #ff3399 100%);
  color: #fff;
  border: none;
  padding: 13px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(255, 0, 127, 0.2);
}

.ghq-popup button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 0, 127, 0.3);
}

.ghq-popup-close {
  margin-top: 10px;
  background: #f0f0f0;
  color: #555;
  box-shadow: none;
}

.ghq-popup-close:hover {
  background: #e5e5e5;
}

/* ========== HEATCOVER POPUP ========== */
.ghq-hc-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.ghq-hc-option {
  border: 2px solid var(--gamma-pink);
  background: #fff;
  color: var(--gamma-purple);
  padding: 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ghq-hc-option:hover {
  background: linear-gradient(135deg, var(--gamma-pink) 0%, #ff3399 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 0, 127, 0.3);
}

.ghq-hc-option span.icon { font-size: 20px; }

.ghq-hc-description {
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  margin-top: 12px;
  background: rgba(43, 0, 80, 0.04);
  padding: 12px;
  border-radius: 8px;
}

.ghq-popup button.ghq-hc-confirm { margin-top: 16px; }

.ghq-hc-warning {
  color: #ff9800;
  font-size: 14px;
  margin-top: 12px;
  font-style: italic;
}

.ghq-hc-cta { display: none; }

/* ========== LOWER (PURPLE) SECTION / UNIFIED LAYOUT ========== */
.ghq-results-cards {
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  max-width: 1150px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  overflow: hidden;
}

.ghq-results-lower {
  background: linear-gradient(135deg, var(--gamma-purple) 0%, #3d1470 100%);
  padding: 40px 20px;
  text-align: center;
  border-radius: 16px;
  margin-top: 28px;
  box-shadow: 0 8px 28px rgba(43, 0, 80, 0.2);
}

#ghq-lower,
.ghq-results-lower {
  width: 100%;
  margin: 0;
  padding-top: 40px;
  padding-bottom: 40px;
}

#ghq-lower {
  background: linear-gradient(135deg, var(--gamma-purple) 0%, #3d1470 100%);
  padding: 50px 0;
  margin: 0;
  border-radius: 16px;
  text-align: center;
}

#ghq-lower .ghq-brand-strip { margin-bottom: 24px; }

#ghq-lower .ghq-brand-logos {
  max-width: 320px;
  width: 100%;
  height: auto;
  opacity: 0.9;
}

#ghq-lower .ghq-lead-wrapper {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px;
}

#ghq-results + #ghq-lower { margin-top: 24px; }

/* ========== KEYFRAMES ========== */
@keyframes ghq-pop {
  from { 
    opacity: 0; 
    transform: scale(0.9) translateY(20px);
  }
  to { 
    opacity: 1; 
    transform: scale(1) translateY(0);
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  #gh-quote-app { padding: 10px; }
  .ghq-grid2 { grid-template-columns: 1fr; }
  .ghq-card { padding: 20px; }
  
  .ghq-card-item {
    border-radius: 14px;
  }
  
  .ghq-step {
    padding: 20px;
    border-radius: 14px;
  }
}

@media (max-width: 600px) {
  .ghq-buttons { flex-direction: column; }
  .ghq-buttons .ghq-btn-buy,
  .ghq-buttons .ghq-btn-finance,
  .ghq-buttons .ghq-btn-view {
    flex: 1 1 100%;
  }
  
  #ghq-results h3 {
    font-size: 24px;
  }
}
/* ===== Quote loading state ===== */
.ghq-btn.is-loading {
  opacity: 0.85;
  cursor: not-allowed;
  transform: none !important;
}

.ghq-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(0,0,0,0.15);
  border-top-color: rgba(0,0,0,0.6);
  border-radius: 50%;
  margin: 14px auto 0;
  animation: ghqSpin 0.9s linear infinite;
}

@keyframes ghqSpin {
  to { transform: rotate(360deg); }
}
