﻿/* Taynexa Listing Detail Polish */

#detailModal .modal-card{
  width:min(1180px,96vw);
  max-width:1180px;
}

#listingDetail{
  max-width:1120px;
  margin:0 auto;
  padding:10px 4px 40px;
}

.detail-gallery-wrap{
  position:relative;
  margin-bottom:28px;
}

.detail-gallery{
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  grid-template-rows:220px 220px;
  gap:8px;
  overflow:hidden;
  border-radius:20px;
  background:#f3f3f3;
}

.detail-gallery img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  cursor:pointer;
  transition:transform .25s ease,filter .25s ease;
}

.detail-gallery img:hover{
  filter:brightness(.94);
}

.detail-gallery img:first-child{
  grid-row:1 / 3;
}

.detail-gallery.count-1{
  display:block;
  height:500px;
}

.detail-gallery.count-1 img{
  height:100%;
}

.all-photos-btn{
  position:absolute;
  right:18px;
  bottom:18px;
  background:#fff;
  color:#222;
  border:1px solid #222;
  border-radius:10px;
  padding:10px 16px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 2px 10px rgba(0,0,0,.12);
}

.detail-title{
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:flex-start;
  margin-bottom:26px;
}

.detail-title h2{
  font-size:30px;
  line-height:1.15;
  margin:0 0 9px;
  letter-spacing:-.5px;
}

.detail-sub{
  font-size:14px;
  line-height:1.6;
}

.detail-actions{
  display:flex;
  gap:8px;
  flex-shrink:0;
}

.detail-actions button{
  background:#fff;
  border:1px solid #ddd;
  border-radius:10px;
  padding:9px 13px;
  font-weight:650;
  cursor:pointer;
}

.detail-body{
  display:grid;
  grid-template-columns:minmax(0,1fr) 365px;
  gap:55px;
  align-items:start;
}

.listing-facts{
  display:flex;
  flex-wrap:wrap;
  gap:0;
  padding:0 0 24px;
  margin-bottom:26px;
  border-bottom:1px solid #e7e7e7;
  font-weight:600;
}

.listing-facts span:not(:last-child)::after{
  content:"·";
  margin:0 9px;
  color:#777;
}

.detail-body h3{
  font-size:21px;
  margin:28px 0 14px;
}

.detail-description{
  line-height:1.75;
  font-size:15.5px;
}

.detail-description p{
  white-space:pre-line;
}

.amenity-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:15px 28px;
  padding-bottom:28px;
  border-bottom:1px solid #e7e7e7;
}

.amenity-grid span{
  line-height:1.4;
}

.policy-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin-top:15px;
}

.policy-grid > div{
  border:1px solid #e5e5e5;
  border-radius:14px;
  padding:5px 18px 16px;
}

.policy-grid p{
  line-height:1.6;
  margin:0;
}

.booking-box{
  position:sticky;
  top:90px;
  border:1px solid #ddd;
  border-radius:18px;
  padding:24px;
  box-shadow:0 6px 25px rgba(0,0,0,.10);
  background:#fff;
}

.booking-price-head{
  margin-bottom:18px;
}

.booking-price-head strong{
  font-size:25px;
}

.booking-price-head small{
  font-size:15px;
}

.date-summary{
  display:grid;
  grid-template-columns:1fr 1fr;
  border:1px solid #aaa;
  border-radius:12px 12px 0 0;
  overflow:hidden;
}

.date-summary > div{
  padding:11px;
}

.date-summary > div:first-child{
  border-right:1px solid #aaa;
}

.date-summary span{
  display:block;
  font-size:10px;
  font-weight:800;
  margin-bottom:3px;
}

.date-summary strong{
  font-size:13px;
}

.booking-box label{
  display:block;
  font-weight:650;
  margin-top:14px;
}

.booking-box input,
.booking-box textarea{
  width:100%;
  box-sizing:border-box;
  margin-top:6px;
}

.price-summary{
  margin:17px 0;
}

.booking-box .primary-btn{
  min-height:48px;
  border-radius:12px;
  font-weight:750;
}

.payment-note{
  text-align:center;
  font-size:12px;
  line-height:1.45;
  opacity:.65;
  margin:12px 0 0;
}

.host-card{
  margin-top:30px;
  border-top:1px solid #e7e7e7;
  padding-top:28px;
}

.approx-location{
  margin-top:30px;
  border-top:1px solid #e7e7e7;
  padding-top:5px;
}

.detail-location-map{
  border-radius:16px;
  overflow:hidden;
}

.mobile-booking-cta{
  display:none;
}

@media(max-width:768px){

  #detailModal .modal-card{
    width:100%;
    max-width:none;
    margin:0;
    border-radius:0;
    min-height:100vh;
  }

  #listingDetail{
    padding-bottom:95px;
  }

  .detail-gallery{
    display:block;
    height:290px;
    border-radius:0;
  }

  .detail-gallery img{
    display:none;
  }

  .detail-gallery img:first-child{
    display:block;
    height:290px;
  }

  .all-photos-btn{
    right:12px;
    bottom:12px;
    padding:9px 12px;
    font-size:12px;
  }

  .detail-title{
    padding:0 17px;
    display:block;
    margin-bottom:20px;
  }

  .detail-title h2{
    font-size:23px;
    margin-top:20px;
  }

  .detail-actions{
    margin-top:14px;
  }

  .detail-body{
    display:block;
    padding:0 17px;
  }

  .listing-facts{
    font-size:14px;
    line-height:1.8;
  }

  .amenity-grid{
    grid-template-columns:1fr;
    gap:13px;
  }

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

  .booking-box{
    position:static;
    margin-top:30px;
    padding:18px;
    box-shadow:none;
  }

  .mobile-booking-cta{
    position:fixed;
    display:flex;
    left:0;
    right:0;
    bottom:0;
    z-index:9999;
    background:#fff;
    border-top:1px solid #ddd;
    padding:11px 16px calc(11px + env(safe-area-inset-bottom));
    align-items:center;
    justify-content:space-between;
    box-shadow:0 -5px 18px rgba(0,0,0,.08);
  }

  .mobile-booking-cta strong{
    font-size:19px;
  }

  .mobile-booking-cta button{
    border:0;
    border-radius:11px;
    padding:13px 18px;
    font-weight:750;
    cursor:pointer;
  }
}
