/* ===================================================
   PLANT TREES ONLINE PAGE — Family Tree India
   Theme: Fraunces + Instrument Sans, Brand Colors
   =================================================== */

:root {
  --pto-bg: #fbf8f3;
  --pto-card-bg: #ffffff;
  --pto-border: #e8e4dc;
  --pto-green-dark: #0f2310;
  --pto-green: #1a4020;
  --pto-green-mid: #2d6b35;
  --pto-green-light: #4a9e55;
  --pto-green-soft: #f4f8f3;
  --pto-yellow: #f0c132;
  --pto-yellow-hover: #dfb023;
  --pto-text-dark: #121613;
  --pto-text-muted: #677169;
}

body {
  background-color: var(--pto-bg);
}

/* ------------------------------------
   HERO BANNER
   ------------------------------------ */
.pto-hero {
  position: relative;
  background-color: var(--pto-green-dark);
  background-image: 
    linear-gradient(135deg, rgba(10, 25, 12, 0.75) 0%, rgba(15, 35, 16, 0.65) 60%, rgba(10, 25, 12, 0.8) 100%),
    url('https://familytreeindia.org/img/temp/39degree.png');
  background-size: cover;
  background-position: center;
  padding: 150px 56px 80px;
  color: #fff;
  overflow: hidden;
}

.pto-hero-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 2;
}

.pto-hero-content {
  max-width: 780px;
}

.pto-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pto-yellow);
  margin-bottom: 16px;
}

.pto-hero-h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 16px;
}

.pto-hero-h1 em,
.pto-hero-h1 i {
  font-style: italic;
  font-weight: 800;
  color: var(--pto-yellow);
}

.pto-hero-sub {
  font-size: 1.1rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 400;
}

/* Badge on Hero Right */
.pto-hero-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  padding: 16px 24px;
  border-radius: 60px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  transform: rotate(-3deg);
  transition: transform 0.3s ease;
}

.pto-hero-badge:hover {
  transform: rotate(0deg) scale(1.02);
}

.pto-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(240, 193, 50, 0.2);
  border: 1px solid var(--pto-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--pto-yellow);
}

.pto-badge-text {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.25;
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ------------------------------------
   MAIN LAYOUT (2 Columns)
   ------------------------------------ */
.pto-main-section {
  padding: 50px 56px 100px;
  max-width: 1400px;
  margin: 0 auto;
}

.pto-layout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: start;
}

/* Section Header */
.pto-sec-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--pto-border);
  position: relative;
}

.pto-sec-header-left {
  max-width: 500px;
}

.pto-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pto-green-mid);
  margin-bottom: 8px;
}

.pto-sec-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--pto-text-dark);
}

.pto-sec-title i {
  font-style: italic;
  color: var(--pto-green-mid);
}

.pto-sec-desc {
  max-width: 440px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--pto-text-muted);
}

/* ------------------------------------
   PROJECT CARDS GRID (Left Column)
   ------------------------------------ */
.pto-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pto-card {
  background: var(--pto-card-bg);
  border: 1px solid var(--pto-border);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.pto-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(15, 35, 16, 0.09);
  border-color: rgba(45, 107, 53, 0.35);
}

.pto-card.has-selected {
  border-color: var(--pto-green-mid);
  box-shadow: 0 10px 30px rgba(45, 107, 53, 0.12);
}

/* Card Media Header */
.pto-card-media {
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
  background: #2a3a2c;
}

.pto-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.pto-card:hover .pto-card-img {
  transform: scale(1.05);
}

/* Pill Overlay Tag */
.pto-card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(10, 20, 12, 0.72);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Counter Control */
.pto-counter-wrapper {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border-radius: 40px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  z-index: 3;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.pto-btn-count {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #f0f0eb;
  color: var(--pto-text-dark);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pto-btn-count.plus {
  background: var(--pto-green-mid);
  color: #fff;
}

.pto-btn-count.plus:hover {
  background: var(--pto-green-dark);
  transform: scale(1.08);
}

.pto-btn-count.minus:hover:not(:disabled) {
  background: #e2dfd7;
}

.pto-btn-count:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pto-count-input {
  width: 38px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--pto-text-dark);
  border: none;
  background: transparent;
  outline: none;
  -moz-appearance: textfield;
}

.pto-count-input::-webkit-outer-spin-button,
.pto-count-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Card Body */
.pto-card-body {
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.pto-card-loc {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--pto-text-dark);
  margin-bottom: 6px;
}

.pto-card-loc i {
  color: var(--pto-green-mid);
  font-size: 0.95rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.pto-card-avail {
  font-size: 0.8rem;
  color: var(--pto-text-muted);
  margin-bottom: 12px;
  padding-left: 20px;
}

.pto-card-avail strong {
  color: var(--pto-text-dark);
  font-weight: 700;
}

.pto-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pto-card-price {
  font-size: 0.85rem;
  color: var(--pto-text-muted);
}

.pto-price-num {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--pto-green-mid);
  text-decoration: underline;
  text-decoration-color: rgba(45, 107, 53, 0.4);
  text-underline-offset: 3px;
}

.pto-card-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--pto-green-mid);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.pto-card-link:hover {
  color: var(--pto-green-dark);
  transform: translateX(2px);
}

/* ------------------------------------
   STICKY SIDEBAR (Right Column)
   ------------------------------------ */
.pto-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pto-sidebar-card {
  background: #ffffff;
  border: 1px solid var(--pto-border);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 8px 32px rgba(15, 35, 16, 0.06);
}

.pto-sidebar-title {
  font-family: 'Fraunces', serif;
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--pto-text-dark);
  margin-bottom: 6px;
}

.pto-sidebar-sub {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--pto-text-muted);
  margin-bottom: 22px;
}

/* Sidebar Inputs */
.pto-form-group {
  margin-bottom: 14px;
}

.pto-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pto-input-wrap i.pto-icon {
  position: absolute;
  left: 14px;
  color: #9ba39c;
  font-size: 0.95rem;
  pointer-events: none;
  transition: color 0.2s ease;
}

.pto-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border-radius: 10px;
  border: 1px solid #ddd8cc;
  background: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--pto-text-dark);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pto-input:focus {
  border-color: var(--pto-green-mid);
  box-shadow: 0 0 0 3px rgba(45, 107, 53, 0.12);
}

.pto-input:focus + i.pto-icon,
.pto-input-wrap:focus-within i.pto-icon {
  color: var(--pto-green-mid);
}

.pto-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #ddd8cc;
  background: #fff;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--pto-text-dark);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.pto-select:focus {
  border-color: var(--pto-green-mid);
}

.pto-country-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px;
}

.pto-country-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #f4f2eb;
  border: 1px solid #ddd8cc;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--pto-text-dark);
  padding: 0 4px;
}

.pto-label-optional {
  font-size: 0.78rem;
  color: var(--pto-text-muted);
  margin-bottom: 6px;
  display: block;
}

/* ------------------------------------
   ORDER SUMMARY BOX (Inside Sidebar)
   ------------------------------------ */
.pto-summary-box {
  background: var(--pto-green-soft);
  border: 1px solid rgba(45, 107, 53, 0.2);
  border-radius: 16px;
  padding: 20px;
  margin-top: 20px;
  margin-bottom: 20px;
}

.pto-summary-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--pto-green-dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(45, 107, 53, 0.15);
}

.pto-summary-head i {
  color: var(--pto-green-mid);
  font-size: 1.1rem;
}

.pto-summary-table {
  width: 100%;
  font-size: 0.85rem;
  border-collapse: collapse;
}

.pto-summary-table th {
  text-align: left;
  font-weight: 700;
  color: var(--pto-text-muted);
  padding-bottom: 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pto-summary-table th.th-center,
.pto-summary-table td.td-center {
  text-align: center;
}

.pto-summary-table th.th-right,
.pto-summary-table td.td-right {
  text-align: right;
}

.pto-summary-row td {
  padding: 8px 0;
  color: var(--pto-text-dark);
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
  vertical-align: middle;
}

.pto-summary-pname {
  font-weight: 600;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.pto-summary-qty {
  font-weight: 700;
}

.pto-summary-cost {
  font-weight: 700;
  color: var(--pto-green-mid);
}

.pto-empty-summary {
  padding: 20px 0;
  text-align: center;
  color: var(--pto-text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Total Row */
.pto-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  margin-top: 10px;
  border-top: 2px solid rgba(45, 107, 53, 0.2);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--pto-text-dark);
}

.pto-total-num {
  font-family: 'Fraunces', serif;
  font-size: 1.35rem;
  color: var(--pto-green-dark);
}

/* Checkout Button */
.pto-btn-checkout {
  width: 100%;
  background: var(--pto-yellow);
  color: var(--pto-green-dark);
  border: none;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px rgba(240, 193, 50, 0.35);
}

.pto-btn-checkout:hover:not(:disabled) {
  background: var(--pto-yellow-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(240, 193, 50, 0.45);
}

.pto-btn-checkout:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* Trust Badges */
.pto-trust-badges {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--pto-border);
  gap: 8px;
}

.pto-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--pto-green-mid);
}

.pto-trust-item i {
  font-size: 0.85rem;
}

/* ------------------------------------
   PROJECT DETAILS MODAL
   ------------------------------------ */
.pto-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 12, 0.6);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pto-modal.active {
  display: flex;
  opacity: 1;
}

.pto-modal-box {
  background: #ffffff;
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  animation: ptoModalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ptoModalPop {
  from {
    transform: scale(0.92) translateY(20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.pto-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 1.2rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.pto-modal-close:hover {
  background: #000000;
  color: #ffffff;
  transform: scale(1.08);
}

.pto-modal-banner {
  height: 300px;
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  background: #0f2310;
}

.pto-modal-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
}

.pto-modal-content {
  padding: 28px;
}

.pto-modal-tag {
  display: inline-block;
  background: var(--pto-green-soft);
  color: var(--pto-green-mid);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.pto-modal-title {
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--pto-text-dark);
  margin-bottom: 8px;
}

.pto-modal-loc {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--pto-green-mid);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.pto-modal-desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #444;
  margin-bottom: 20px;
}

.pto-modal-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: #faf8f4;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--pto-border);
  margin-bottom: 24px;
}

.pto-modal-metric {
  text-align: center;
}

.pto-metric-val {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--pto-green-dark);
}

.pto-metric-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--pto-text-muted);
}

/* ------------------------------------
   RESPONSIVE DESIGN
   ------------------------------------ */
@media (max-width: 1200px) {
  .pto-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .pto-layout-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .pto-sidebar {
    position: static;
  }
  
  .pto-sec-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .pto-sec-desc {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .pto-hero {
    padding: 120px 24px 60px;
  }
  
  .pto-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  
  .pto-hero-badge {
    transform: none;
  }
  
  .pto-main-section {
    padding: 36px 20px 60px;
  }
  
  .pto-cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .pto-card-img {
    height: 170%;
  }

  .pto-modal-banner {
    height: 240px;
  }

  .pto-modal-banner img {
    object-position: center 10%;
  }
}

/* Ensure general donate modal is disabled on plant-trees-online page */
#donateModal {
  display: none !important;
}
