/* ==================== CALCULATOR STYLES ==================== */

.calculator-page {
  background-color: var(--beige);
}

.calculator-hero {
  position: relative;
  min-height: 35vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-height, 100px);
  background-color: var(--warm-white);
  border-bottom: 1px solid rgba(183, 65, 14, 0.1);
}

.calc-bg-pattern {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0.4;
  background-image: linear-gradient(rgba(183, 65, 14, 0.05) 1px, transparent 1px),
  linear-gradient(90deg, rgba(183, 65, 14, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
}

.calc-hero-content {
  position: relative;
  z-index: 1;
}

.calc-hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.calc-hero-content p {
  font-size: 1.15rem;
  color: var(--charcoal);
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.8;
}

.calculator-main {
  background: var(--beige);
}

.calc-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 3rem;
  align-items: start;
}

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.calc-section {
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(183, 65, 14, 0.05);
}

.calc-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.calc-section-header i {
  font-size: 2rem;
  color: var(--terracotta);
}

.calc-section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--charcoal);
  margin: 0;
}

.section-desc {
  color: var(--charcoal);
  opacity: 0.7;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Input Styles */
.input-group {
  display: flex;
  align-items: center;
  background: var(--beige);
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
  max-width: 300px;
}

.input-group:focus-within {
  border-color: var(--terracotta);
}

.input-group input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--charcoal);
  outline: none;
}

.input-group .unit-label {
  padding: 1rem 1.5rem;
  background: rgba(183, 65, 14, 0.1);
  color: var(--terracotta);
  font-weight: 600;
  font-size: 1rem;
}

/* Custom Radio Cards */
.radio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.radio-card {
  position: relative;
  cursor: pointer;
}

.radio-card input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.card-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
  background: var(--warm-white);
  border: 2px solid rgba(183, 65, 14, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.radio-card.selected .card-content {
  background: rgba(183, 65, 14, 0.05);
  border-color: var(--terracotta);
  box-shadow: 0 4px 15px rgba(183, 65, 14, 0.1);
  transform: translateY(-2px);
}

.radio-card:hover:not(.selected) .card-content {
  border-color: rgba(183, 65, 14, 0.4);
  background: white;
}

.card-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--charcoal);
  opacity: 0.7;
  margin-bottom: 1rem;
  line-height: 1.4;
  flex-grow: 1;
}

.card-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--terracotta);
  margin-top: auto;
}

/* Sticky Summary */
.calc-summary-wrapper {
  position: sticky;
  top: 120px;
}

.calc-summary {
  background: var(--charcoal);
  border-radius: 16px;
  overflow: hidden;
  color: var(--warm-white);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.summary-header {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-header h3 {
  margin: 0;
  color: var(--warm-white);
  font-family: var(--font-heading);
  font-size: 1.35rem;
}

.summary-body {
  padding: 2rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.summary-row .label {
  opacity: 0.8;
  font-size: 0.95rem;
}

.summary-row .value {
  font-weight: 600;
  font-size: 1.1rem;
}

.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 1.5rem 0;
}

.summary-row.grand-total {
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.summary-row.grand-total .label {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--terracotta);
  opacity: 1;
}

.summary-row.grand-total .value {
  font-size: 2.5rem;
  color: white;
  font-family: var(--font-heading);
}

.summary-fineprint {
  font-size: 0.75rem;
  opacity: 0.5;
  line-height: 1.4;
  margin-bottom: 2rem;
}

.calc-summary button {
  width: 100%;
}

@media (max-width: 992px) {
  .calc-layout {
    grid-template-columns: 1fr;
  }
  .calc-summary-wrapper {
    position: static;
  }
}

@media (max-width: 768px) {
  .calc-section {
    padding: 1.5rem;
  }
  .input-group {
    max-width: 100%;
  }
}
