
/* v161 — Listing detail modal polish only.
   Intentionally scoped to .product-detail-overlay so the rest of InMalete is untouched. */

.product-detail-overlay .product-detail-modal{
  width:min(100%,760px);
  max-height:94vh;
  padding:0;
  overflow:auto;
}

.product-detail-overlay .product-gallery-hero{
  height:300px;
  min-height:300px;
  background:#f5f7f6;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
}

.product-detail-overlay .product-gallery-hero #modalMainImage{
  width:100%;
  height:100%;
  object-fit:contain;
}

.product-detail-overlay .gallery-thumbs{
  display:flex;
  gap:8px;
  padding:10px 18px;
  margin:0;
  overflow-x:auto;
  flex-wrap:nowrap;
  background:#fff;
  border-bottom:1px solid rgba(20,55,60,.08);
}

.product-detail-overlay .gallery-thumb{
  flex:0 0 58px;
  width:58px;
  height:58px;
  border-radius:11px;
  overflow:hidden;
}

.product-detail-overlay .product-detail-content{
  padding:18px 20px 20px !important;
}

.product-detail-overlay .detail-kicker{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}

.product-detail-overlay .detail-category{
  min-width:0;
  font-size:12px;
  line-height:1.35;
  font-weight:800;
  letter-spacing:.055em;
  text-transform:uppercase;
}

.product-detail-overlay .detail-status{
  flex:0 0 auto;
  padding:7px 10px;
  border-radius:14px;
  background:#eaf8ee;
  color:#27804c;
  font-size:12px;
  font-weight:750;
  white-space:nowrap;
}

.product-detail-overlay .modal-product-title{
  margin:0 0 8px !important;
  font-size:25px !important;
  line-height:1.22 !important;
  letter-spacing:-.35px !important;
}

.product-detail-overlay .modal-product-price{
  margin:0 0 14px !important;
  font-size:25px !important;
  line-height:1.15 !important;
}

.product-detail-overlay .detail-chips{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin:0 0 15px;
}

.product-detail-overlay .detail-info-item{
  min-width:0;
  padding:9px 11px;
  border:1px solid rgba(20,55,60,.07);
  border-radius:11px;
  background:#f7f9f8;
}

.product-detail-overlay .detail-info-label{
  display:block;
  margin-bottom:3px;
  color:#748487;
  font-size:10.5px;
  line-height:1.2;
}

.product-detail-overlay .detail-info-value{
  display:block;
  color:#29484e;
  font-size:13px;
  line-height:1.25;
  overflow-wrap:anywhere;
}

.product-detail-overlay .modal-product-desc{
  margin:0 0 14px;
}

.product-detail-overlay .seller-detail-card{
  margin-bottom:14px;
}

.product-detail-overlay .modal-actions.product-chat-actions{
  position:sticky !important;
  bottom:0 !important;
  z-index:20;
  display:grid;
  grid-template-columns:1.25fr .75fr;
  gap:5px;
  margin:10px -20px -20px !important;
  padding:6px 20px 7px !important;
  background:rgba(255,255,255,.98) !important;
  border-top:1px solid rgba(20,55,60,.07);
  backdrop-filter:blur(8px);
}

.product-detail-overlay .modal-actions.product-chat-actions .btn{
  min-height:30px !important;
  height:30px !important;
  width:100%;
  justify-content:center;
  align-items:center;
  border-radius:15px !important;
  padding:0 7px !important;
  font-size:9.5px !important;
  font-weight:700;
  line-height:1 !important;
  box-shadow:none !important;
}

.product-detail-overlay .modal-actions.product-chat-actions #modalChatBtn{grid-column:1}
.product-detail-overlay .modal-actions.product-chat-actions #modalContactBtn{grid-column:2}
.product-detail-overlay .modal-actions.product-chat-actions #modalCopyListingBtn{grid-column:1}
.product-detail-overlay .modal-actions.product-chat-actions #modalReportBtn{grid-column:2}
.product-detail-overlay .modal-actions.product-chat-actions .im-modal-close-btn{grid-column:1}
.product-detail-overlay .modal-actions.product-chat-actions #modalSaveBtn{grid-column:2}

@media (max-width:560px){
  .product-detail-overlay{
    padding:0 !important;
  }
  .product-detail-overlay .product-detail-modal{
    width:100%;
    max-height:96vh;
    border-radius:24px 24px 0 0 !important;
  }
  .product-detail-overlay .product-gallery-hero{
    height:250px;
    min-height:250px;
  }
  .product-detail-overlay .product-detail-content{
    padding:15px 16px 16px !important;
  }
  .product-detail-overlay .modal-product-title{
    font-size:21px !important;
  }
  .product-detail-overlay .modal-product-price{
    font-size:23px !important;
  }
  .product-detail-overlay .detail-chips{
    gap:7px;
  }
  .product-detail-overlay .modal-actions.product-chat-actions{
    position:sticky !important;
    bottom:0 !important;
    display:grid;
    grid-template-columns:1.2fr .8fr;
    gap:4px;
    margin:8px -16px -16px !important;
    padding:5px 16px 6px !important;
  }
  .product-detail-overlay .modal-actions.product-chat-actions .btn{
    min-height:28px !important;
    height:28px !important;
    padding:0 6px !important;
    font-size:9px !important;
    border-radius:14px !important;
  }
}


/* v165 — full image viewer, scoped to the listing detail modal */
.product-detail-overlay .product-gallery-hero #modalMainImage{
  cursor:zoom-in;
}
.im-full-image-viewer{
  position:fixed;
  inset:0;
  z-index:100000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(0,0,0,.94);
}
.im-full-image-viewer.is-open{display:flex}
.im-full-image-viewer img{
  max-width:96vw;
  max-height:92vh;
  width:auto;
  height:auto;
  object-fit:contain;
  display:block;
  cursor:zoom-out;
}
.im-full-image-viewer .im-full-close{
  position:absolute;
  top:16px;
  right:16px;
  width:42px;
  height:42px;
  border:0;
  border-radius:50%;
  background:rgba(255,255,255,.94);
  color:#173b43;
  font-size:25px;
  line-height:1;
  cursor:pointer;
}
.im-full-image-viewer .im-full-count{
  position:absolute;
  top:20px;
  left:50%;
  transform:translateX(-50%);
  padding:7px 11px;
  border-radius:16px;
  background:rgba(255,255,255,.92);
  color:#173b43;
  font-size:12px;
  font-weight:750;
}
.im-full-image-viewer .im-full-prev,
.im-full-image-viewer .im-full-next{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:44px;
  height:44px;
  border:0;
  border-radius:50%;
  background:rgba(255,255,255,.94);
  color:#173b43;
  font-size:28px;
  line-height:1;
  cursor:pointer;
}
.im-full-image-viewer .im-full-prev{left:14px}
.im-full-image-viewer .im-full-next{right:14px}
@media(max-width:560px){
  .im-full-image-viewer{padding:10px}
  .im-full-image-viewer img{max-width:98vw;max-height:90vh}
  .im-full-image-viewer .im-full-prev,
  .im-full-image-viewer .im-full-next{width:40px;height:40px;font-size:24px}
}
