.market-live-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:18px}.market-ad-card{border:1px solid #ded4cd;border-radius:14px;overflow:hidden;background:#fff}.market-ad-card a{display:block;color:inherit;text-decoration:none}.market-ad-card img{display:block;width:100%;height:210px;object-fit:cover}.market-ad-card a>div:not(.market-no-photo){padding:18px}.market-ad-card h3{font-size:1.2rem;margin:8px 0;color:#85131c}.market-ad-card p{margin:8px 0}.market-badge{font-weight:700;color:#85131c}.market-no-photo{height:210px;background:#f1ece7;display:flex;align-items:center;justify-content:center;padding:12px;color:#625854}.market-detail{padding:32px 20px;max-width:1040px}.market-detail h1{font-size:clamp(1.7rem,4vw,2.6rem);line-height:1.15;color:#85131c}.market-price{font-size:1.5rem;font-weight:700;color:#85131c}.market-photo-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px;margin:18px 0}.market-photo-grid img{width:100%;height:240px;object-fit:contain;background:#f4f0eb;border-radius:10px}.market-photo-grid a:focus-visible{outline:3px solid #85131c}.market-description{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}.market-specs{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.market-specs>div{padding:12px;background:#f5f0eb;border-radius:8px}.market-specs dt{font-weight:700}.market-specs dd{margin:4px 0 0}.market-contact{margin:30px 0;border-top:1px solid #ddd1c8;padding-top:20px}.market-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:15px}.market-detail label,.market form label{display:block;line-height:1.5;font-size:1rem}.market-detail input:not([type=checkbox]),.market-detail select,.market-detail textarea{font:inherit;width:100%;padding:12px;border:1px solid #c9bcb3;border-radius:7px;box-sizing:border-box;margin:6px 0 15px}.market-consent{display:flex!important;gap:10px;margin:18px 0;align-items:flex-start}.market-consent input{flex:0 0 auto;width:20px;height:20px;margin:3px 0}.market-honeypot{position:absolute!important;left:-10000px!important;width:1px;height:1px;overflow:hidden}.market-error,.market-success{padding:14px;border-radius:8px;line-height:1.5;overflow-wrap:anywhere}.market-error{background:#fff0f0;color:#85131c}.market-success{background:#eff6ed;color:#27402b}.market-actions{gap:12px;display:flex;flex-wrap:wrap}.market button:disabled{opacity:.65;cursor:wait}.market-live-list{margin:28px 0}.market-admin-page{background:#f7f4ef;color:#302825;min-height:100vh;margin:0;font-family:Arial,sans-serif}.market-admin-wrap{max-width:1180px;margin:auto;padding:26px 20px}.market-admin-header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}.market-admin-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0}.market-admin-card{border:1px solid #e0d6ce;background:#fff;border-radius:12px;padding:22px;margin:16px 0;overflow-wrap:anywhere}.market-admin-card h2{font-size:1.35rem;color:#85131c;margin-top:0}.market-admin-card .market-photo-grid{grid-template-columns:repeat(auto-fit,minmax(130px,1fr))}.market-admin-card .market-photo-grid img{height:150px}.market-admin-actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}.market-admin-page button,.market-admin-page a.button{font:inherit;border:1px solid #c9b8ac;border-radius:7px;background:#fff;padding:10px 14px;cursor:pointer;text-decoration:none;color:#4d302d;display:inline-block}.market-admin-page button.primary{background:#85131c;color:white;border-color:#85131c}.market-admin-page .danger{color:#8b171b}.market-admin-page select,.market-admin-page input,.market-admin-page textarea{font:inherit;max-width:100%;box-sizing:border-box;padding:10px;border:1px solid #c9bcb3;border-radius:6px}.market-admin-page label{display:block;margin:12px 0}.market-admin-page label>input,.market-admin-page label>textarea,.market-admin-page label>select{display:block;width:100%;margin-top:6px}.market-admin-page textarea{min-height:100px}.market-admin-muted{color:#685c55;font-size:.92rem}.market-admin-status{background:#f3ece7;padding:10px;border-radius:6px}.market-admin-contacts{border-left:3px solid #85131c;padding-left:14px}.market-admin-page summary{cursor:pointer;font-weight:700;padding:8px 0}.market-admin-page .active{background:#85131c;color:white}.market-admin-page [hidden]{display:none!important}.market-admin-notice{position:sticky;top:0;z-index:2;background:#f9edcf;padding:14px;border-radius:7px;margin:12px 0}.market-admin-filter{display:flex;flex-wrap:wrap;gap:10px;align-items:end}.market-admin-filter label{margin:0;flex:1;min-width:150px}.market-admin-list:empty::after{content:'Caricamento…'}.market-detail form{max-width:800px}input:focus-visible,textarea:focus-visible,select:focus-visible,button:focus-visible,a:focus-visible{outline:3px solid #ad6949;outline-offset:3px}@media(max-width:600px){.market-admin-wrap{padding:18px 12px}.market-admin-card{padding:16px}.market-photo-grid img{height:200px}.market-admin-actions>button{flex:1 1 140px}.market-actions>button{width:100%}.market-specs{grid-template-columns:1fr 1fr}}

/* Immagini intere e schede compatte — 3 novembre 2026. */
.market-live-grid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:20px}
.market-ad-card{min-width:0;box-shadow:0 3px 12px #40232308}
.market-ad-card>a{height:100%}
.market-ad-card img{width:100%;height:auto;aspect-ratio:4/3;object-fit:contain;background:#f7f4ef;padding:12px;box-sizing:border-box}
.market-ad-card a>div:not(.market-no-photo){padding:16px}
.market-ad-card h3{font-size:1.15rem;line-height:1.35;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.market-ad-card p{overflow-wrap:anywhere;line-height:1.5}
.market-ad-card a>div>p:last-of-type{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.market-ad-card span{display:inline-block;margin-top:6px;color:#85131c;font-weight:700}
.market-ad-card:hover{border-color:#b88682;box-shadow:0 5px 18px #40232314}
.market-ad-card a:focus-visible{outline:3px solid #85131c;outline-offset:-4px}
.market-no-photo{height:auto;aspect-ratio:4/3;font-size:.95rem}
.market-live-list h2{color:#85131c;font-size:clamp(1.6rem,3vw,2rem);line-height:1.2}
.market-detail{max-width:1120px;padding:30px 0 52px;scroll-margin-top:150px}
.market-detail-heading{padding:0;margin:22px 0}
.market-detail-heading .eyebrow{margin:0 0 8px;overflow-wrap:anywhere}
.market-detail-heading h1{margin:0;overflow-wrap:anywhere}
.market-back{display:inline-block;color:#85131c;font-weight:700}
.market-detail-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:30px;align-items:start}
.market-detail-layout>*{min-width:0}
.market-gallery{min-width:0}
.market-gallery-main{display:flex;position:relative;align-items:center;justify-content:center;min-width:0;aspect-ratio:1/1;background:#f7f4ef;border:1px solid #e4dbd4;border-radius:14px;overflow:hidden;padding:20px 16px 48px;box-sizing:border-box}
.market-gallery-main img{width:100%;height:100%;object-fit:contain;min-width:0;min-height:0;max-height:510px}
.market-gallery-main>span{position:absolute;bottom:12px;left:16px;right:16px;text-align:center;font-size:.85rem;font-weight:700;color:#85131c}
.market-gallery-thumbs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin-top:10px}
.market-gallery-thumbs button{display:flex;align-items:center;justify-content:center;aspect-ratio:1/1;min-width:0;padding:5px;border:2px solid transparent;border-radius:8px;background:#f7f4ef;cursor:pointer}
.market-gallery-thumbs button[aria-pressed=true]{border-color:#85131c}
.market-gallery-thumbs img{width:100%;height:100%;object-fit:contain;border-radius:4px}
.market-gallery-empty{display:grid;place-items:center;aspect-ratio:4/3;background:#f7f4ef;border:1px solid #e4dbd4;border-radius:14px;padding:24px;color:#685c55}
.market-summary .market-price{font-size:1.8rem;margin:0 0 12px;line-height:1.25}
.market-summary .lead{font-size:1.05rem;line-height:1.55;margin:0 0 14px;overflow-wrap:anywhere}
.market-description{font-size:1rem;overflow-wrap:anywhere}
.market-specs{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:22px 0}
.market-specs>div{min-width:0;padding:10px 12px}
.market-specs dt{font-size:.82rem;color:#665751}
.market-specs dd{font-size:.95rem;overflow-wrap:anywhere}
.market-trade-note{font-size:.86rem;line-height:1.6;color:#685c55;margin:18px 0 0}
.market-contact{max-width:840px;margin:34px auto 0;padding:26px;border:1px solid #e4dbd4;border-radius:14px;background:#faf7f3;scroll-margin-top:155px}
.market-contact h2{font-size:clamp(1.45rem,3vw,1.85rem);line-height:1.2;margin:0 0 12px;color:#85131c}
.market-contact>p{font-size:.95rem;line-height:1.6;margin:0 0 20px}
.market-contact form{max-width:none}
.market-contact .market-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.market-contact .market-fields>label:last-child{grid-column:1/-1}
.market-detail input:not([type=checkbox]),.market-detail textarea{background:#fff;color:#302825;border-radius:8px}
.market-detail textarea{resize:vertical;min-height:130px}
.market-contact .market-consent{font-size:.88rem;line-height:1.6}
.market-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:12px 20px;border:1px solid #85131c;border-radius:8px;background:#85131c;color:#fff;font:700 1rem/1.3 Arial,Helvetica,sans-serif;text-align:center;text-decoration:none;cursor:pointer;box-sizing:border-box}
.market-button:hover{background:#651018;color:#fff}
.market-button:disabled{opacity:.65;cursor:wait}
.market-contact-cta{width:100%}
.market-detail .market-photo-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,180px),1fr))}
.market-detail .market-photo-grid img{object-fit:contain}
.market-detail [hidden],.market-gallery [hidden]{display:none!important}
@media(max-width:960px){.market-live-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.market-detail-layout{gap:22px}}
@media(max-width:700px){.market-detail{padding:22px 0 36px}.market-detail-heading{margin:18px 0}.market-detail-layout{grid-template-columns:minmax(0,1fr);gap:24px}.market-gallery{max-width:560px;width:100%;margin:auto}.market-gallery-main{padding:16px 12px 42px}.market-contact{margin-top:26px;padding:20px 16px;scroll-margin-top:130px}.market-contact .market-fields{grid-template-columns:minmax(0,1fr);gap:0}.market-contact .market-button{width:100%}.market-summary .market-price{font-size:1.65rem}.market-specs{margin:18px 0}}
@media(max-width:560px){.market-live-grid{grid-template-columns:minmax(0,1fr);gap:18px}.market-ad-card{width:100%;max-width:420px}.market-ad-card img{aspect-ratio:4/3}.market-gallery-thumbs{gap:5px}.market-gallery-thumbs button{padding:3px}.market-consent{gap:9px}}

/* Disponibilità per categoria: conteggi prodotti dal server. */
.market-count-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.market-count-card{display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding:22px;border:1px solid #dac8bf;border-top:3px solid #85131c;border-radius:12px;background:#fff;color:#302825;text-decoration:none;min-width:0}
.market-count-card h3{font-size:1.1rem!important;line-height:1.35!important;margin:0!important;color:#85131c!important;overflow-wrap:anywhere}
.market-count-card p{margin:0;line-height:1.4;font-size:.95rem}
.market-count-card strong{font-size:1.4rem;color:#85131c;margin-right:3px}
.market-count-card span{margin-top:auto;font-size:.9rem;font-weight:700;color:#85131c}
.market-count-card:hover{background:#fcf7f3;border-color:#ae7771;box-shadow:0 4px 14px #4023230a}
.market-count-card.is-empty{border-top-color:#c9bcb3;background:#faf8f5}
.market-count-card.is-empty strong{color:#685c55}
@media(max-width:960px){.market-count-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.market-count-grid{grid-template-columns:minmax(0,1fr);gap:12px}.market-count-card{padding:18px;gap:10px}}

.market-live-list#annunci{scroll-margin-top:170px}
@media(max-width:700px){.market-live-list#annunci{scroll-margin-top:130px}}

/* Copertina + cinque dettagli; caricamenti cumulativi. */
.market-photo-picker{min-width:0}.market-photo-picker>label{display:block;margin:14px 0;font-weight:700}.market-photo-picker input[type=file]{display:block;max-width:100%;width:100%;box-sizing:border-box;font:inherit;margin:8px 0;padding:10px;background:#fff;border:1px solid #c9bcb3;border-radius:8px}.market-photo-count{font-weight:700;color:#85131c}.market-photo-status{font-size:.95rem;line-height:1.5;overflow-wrap:anywhere}.market-photo-selection{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:16px 0}.market-photo-tile{margin:0;min-width:0;padding:10px;border:1px solid #dac8bf;border-radius:10px;background:#fff}.market-photo-tile:first-child{border:2px solid #85131c}.market-photo-tile img{display:block;width:100%;height:150px;object-fit:contain;background:#f7f4ef}.market-photo-caption{padding:8px 0;font-weight:700;color:#85131c}.market-photo-actions{display:flex;flex-wrap:wrap;gap:7px}.market-photo-actions button{font:inherit;font-size:.86rem;min-height:38px;padding:8px 10px;border:1px solid #bda79e;border-radius:6px;background:white;color:#85131c;cursor:pointer}.market-photo-actions button:disabled{opacity:.55}.market-admin-photos{margin:22px 0;padding:18px;border:1px solid #e4dbd4;border-radius:12px;background:#faf7f3}.market-expiry{font-size:.92rem;color:#685c55}
.market-gallery-main{width:100%;font:inherit;color:inherit;cursor:zoom-in}.market-lightbox{width:min(1100px,94vw);max-width:94vw;max-height:94dvh;padding:16px;box-sizing:border-box;border:0;border-radius:12px;background:#fff;color:#302825;overflow:auto}.market-lightbox::backdrop{background:#17100fe8}.market-lightbox[open]{display:flex;flex-direction:column;gap:12px}.market-lightbox-bar,.market-lightbox-controls{display:flex;align-items:center;justify-content:space-between;gap:12px}.market-lightbox img{display:block;width:100%;height:min(70dvh,720px);min-height:0;object-fit:contain;background:#f7f4ef}.market-lightbox button{font:700 .95rem Arial,sans-serif;min-height:44px;padding:10px 14px;border:1px solid #85131c;border-radius:7px;background:#85131c;color:#fff;cursor:pointer}.market-lightbox-bar>span{font-size:.9rem;white-space:nowrap}.market-lightbox [hidden]{display:none!important}
@media(max-width:700px){.market-photo-selection{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.market-photo-tile{padding:7px}.market-photo-tile img{height:120px}.market-photo-actions{flex-direction:column}.market-photo-actions button{width:100%}.market-admin-photos{padding:12px}.market-lightbox{padding:10px}.market-lightbox-bar{align-items:flex-start}.market-lightbox-bar button{font-size:.82rem;padding:8px 10px}.market-lightbox-controls button{font-size:.8rem;padding:8px 10px}.market-lightbox img{height:65dvh}}

/* Foto con marchio: proporzioni naturali, nessuna fascia laterale colorata. */
.market-ad-card img{background:#fff;padding:0}
.market-gallery-main{display:flex;flex-direction:column;aspect-ratio:auto;padding:0;border:0;background:#fff;border-radius:10px}
.market-gallery-main img{display:block;width:100%;height:auto;max-height:none;object-fit:contain}
.market-gallery-main>span{position:static;display:block;padding:10px 8px;margin:0;text-align:center;background:#fff}
.market-gallery-thumbs button,.market-photo-grid img,.market-photo-tile img{background:#fff}
.market-lightbox img{width:auto;height:auto;max-width:100%;max-height:70dvh;align-self:center;background:#fff;object-fit:contain}
@media(max-width:700px){.market-gallery-main{padding:0}.market-lightbox img{height:auto;max-height:65dvh}}

/* Approvazione amministratore: stato persistente, distinto dalle azioni. */
.market-approval-panel{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin:14px 0;padding:15px 16px;border:1px solid #d8d3cf;border-left:5px solid #81746b;border-radius:9px;background:#f6f4f2}
.market-approval-panel p{flex-basis:100%;margin:0;font-size:.9rem;line-height:1.5}
.market-approval-badge{display:inline-block;padding:7px 11px;border-radius:6px;line-height:1.3;font-size:.94rem;letter-spacing:.02em;background:#e9e4e0;color:#443d38}
.market-approval-description{font-size:.95rem;line-height:1.5}
.market-approval-panel.is-approved{border-color:#acd1b5;border-left-color:#24643b;background:#eff8f1}
.market-approval-panel.is-approved .market-approval-badge{background:#24643b;color:#fff}
.market-approval-panel.is-pending{border-color:#e5cd8d;border-left-color:#9a660c;background:#fffaeb}
.market-approval-panel.is-pending .market-approval-badge{background:#f1d28c;color:#563500}
.market-admin-page .market-approved-button,.market-admin-page .market-approved-button:disabled{background:#24643b;color:#fff;border-color:#24643b;font-weight:700;opacity:1;cursor:default}
.market-admin-notice.is-success{background:#eaf6ed;color:#1e5631;border:1px solid #acd1b5;font-weight:700}
.market-admin-notice.is-error{background:#fff0f0;color:#85131c;border:1px solid #dca8aa}
@media(max-width:560px){.market-approval-panel{padding:12px}.market-approval-description{flex-basis:100%}.market-approval-panel .button{width:100%;box-sizing:border-box;text-align:center}}
