/* Horizontal 1: fit the entire photograph to the predefined photo frame. */
.listing-grid,.market-columns .listing-grid,.search-results .listing-grid,.workspace .listing-grid,.seller-columns .listing-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px}
.listing-card.compact-card{position:relative;display:grid;grid-template-columns:34% minmax(0,1fr);gap:14px;padding:9px;min-width:0;min-height:148px;border:1px solid #d5dde6;border-radius:9px;background:#fff;box-shadow:none;align-items:stretch}
.compact-card .card-media{min-width:0;height:126px;min-height:126px;align-self:center;aspect-ratio:auto;background:transparent;border-radius:7px;overflow:hidden}
.compact-card .card-media>a{position:relative;inset:auto;display:block;width:100%;height:100%}
.compact-card .card-media img{display:block;width:100%;height:100%;max-width:100%;max-height:none;object-fit:fill;object-position:center}
.compact-card .no-image{height:100%;width:100%;background:#f3f6f5}
.compact-card .card-body{min-width:0;display:flex;flex-direction:column;gap:0;padding:1px 0 0;color:#0b1931;text-decoration:none}
.compact-card .compact-condition{align-self:flex-start;max-width:calc(100% - 30px);margin:0 0 5px;padding:1px 8px;border-radius:6px;background:#d9eee4;color:#25683d;font-size:12px;line-height:1.6;font-weight:400;overflow-wrap:anywhere}
.compact-card .card-body>h3{order:0;min-height:0;margin:0 0 3px;font-size:16px;font-weight:700;line-height:1.25;letter-spacing:-.25px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}
.compact-card .card-body>.card-price{order:0;margin:0 0 3px;color:#008365;font-size:23px;line-height:1.15;font-weight:750;letter-spacing:-.45px;overflow-wrap:anywhere}
.compact-card .card-price small{font-size:11px;font-weight:400;letter-spacing:0;color:#53657d}
.compact-card .compact-specs{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin:0 0 6px;padding:0;list-style:none;color:#53657d;font-size:13px;line-height:1.4;min-width:0}
.compact-specs li{display:inline;min-width:0;overflow-wrap:anywhere}
.compact-specs li+li::before{content:'·';margin-inline:4px}
.compact-specs:empty{display:none}
.compact-card .compact-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;min-width:0;color:#53657d;font-size:12px;line-height:1.4}
.compact-card .card-location{display:flex;align-items:center;gap:4px;min-width:0;color:inherit;font-size:inherit;white-space:normal}
.compact-card .card-location>span{overflow-wrap:anywhere}
.compact-card .card-location svg{width:15px;height:18px;color:#213d4a;flex-shrink:0}
.compact-footer time{flex-shrink:0;white-space:nowrap;font-size:11px}
.compact-card .favorite{position:absolute;top:4px;right:3px;display:grid;place-items:center;width:36px;height:36px;min-height:0;margin:0;padding:6px;border:0;border-radius:5px;background:transparent;box-shadow:none;color:#203a48;z-index:1}
.compact-card>.favorite-form{position:absolute;top:0;right:0;width:40px;height:40px;margin:0}
.compact-card .favorite svg{width:24px;height:24px;stroke-width:1.7}
.compact-card .favorite.selected{color:#008365}
.compact-card .featured-badge{top:auto;bottom:5px;left:5px;max-width:calc(100% - 10px);font-size:9px;padding:2px 6px;border-radius:4px}
.compact-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.photo-orientation-notice{display:flex;gap:12px;align-items:flex-start;padding:13px;border:1px solid #c9e5da;border-radius:7px;background:#edf8f3;color:#23513e;margin:0 0 14px}
.photo-orientation-notice>svg{width:34px;height:27px;margin-top:2px;flex-shrink:0}
.photo-orientation-notice p{margin:0;font-size:13px;line-height:1.5}
.photo-orientation-notice strong,.photo-orientation-notice span{display:block}
.photo-orientation-notice span{margin-top:3px;font-size:12px}
@media(max-width:1000px){.search-results .listing-grid,.workspace .listing-grid{grid-template-columns:minmax(0,1fr)!important}}
@media(max-width:700px){
 .listing-grid,.market-columns .listing-grid,.search-results .listing-grid,.workspace .listing-grid,.seller-columns .listing-grid{grid-template-columns:minmax(0,1fr)!important;gap:9px}
 .listing-card.compact-card{min-height:140px;padding:8px;gap:14px;border-radius:8px}
 .compact-card .card-media{height:122px;min-height:122px;border-radius:6px}
 .compact-card .card-body>h3{font-size:15px}
 .compact-card .card-body>.card-price{font-size:22px}
 .compact-card .compact-specs{font-size:12px}
 .compact-card .compact-condition{font-size:11px;margin-bottom:5px;padding:1px 7px}
}
/* Keep each category's gallery dimensions while displaying the complete photo. */
.mobile-detail .gallery-main,.mobile-review .gallery-main{background:transparent}
.mobile-detail .gallery-main>img,.mobile-review .review-layout>section .gallery-main>img{display:block;position:absolute;inset:0;width:100%;height:100%;max-width:100%;max-height:none;object-fit:fill}
/* Apply the same fit throughout the listing lifecycle, retaining every frame size. */
.account-identity>img,.account-item>img,.draft-table-row .row-identity img,.draft-card>img,
.confirm-listing img,.submitted-item img,.edit-photos img,
.publication-photos .photo-preview img,.mobile-wizard-form .photo-preview img,.photo-picker .photo-preview img,
.thumbnails button img,.lightbox-thumbnails img,.gallery-dialog .lightbox-image{object-fit:fill}
.draft-table-row .row-actions{flex-wrap:wrap;min-width:0}
@media(max-width:360px){
 .listing-card.compact-card{gap:10px}
 .compact-card .card-body>h3{font-size:14px}
 .compact-card .card-body>.card-price{font-size:19px}
 .compact-card .compact-specs,.compact-card .compact-footer{font-size:11px}
 .compact-card .compact-condition{padding-inline:5px}
}
