/* 3.5.92: Detailansicht zeigt hochkant/quer fotografierte Artikel vollständig; Vorschaubilder unverändert. */
/* ATC Flohmarkt – eigenständiger Bereich im vorhandenen Mitgliederportal */
.atc-market{--market-ink:#173a56;--market-blue:#1c70b4;--market-line:#dce8f0;--market-muted:#657e91;color:var(--market-ink);font-size:15px;line-height:1.55;max-width:100%;overflow-wrap:anywhere}
.atc-market *{box-sizing:border-box}
.atc-market :is(h2,h3,p){margin-top:0}
.atc-market h2{font-size:clamp(22px,3vw,30px)!important;font-weight:730!important;line-height:1.2!important;letter-spacing:-.025em}
.atc-market h3{font-size:17px!important;font-weight:700!important;line-height:1.32!important;margin:0 0 5px}
.atc-market a{text-decoration:none}
.atc-market-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 22px;padding:4px;border-radius:13px;background:#eef5fa}
.atc-market-tabs a{flex:1;min-width:120px;text-align:center;padding:11px 13px;border-radius:10px;color:#365b76!important;font-weight:650;font-size:14px;white-space:normal}
.atc-market-tabs a.is-current{background:#fff;box-shadow:0 2px 9px rgba(18,52,78,.07);color:#1466a9!important}
.atc-market-hero{background:linear-gradient(110deg,#173c5c,#235d84);border-radius:19px;padding:30px;display:flex;gap:20px;align-items:center;justify-content:space-between;color:#fff;margin:0 0 20px}
.atc-market-eyebrow{display:block;font-size:11px;letter-spacing:.11em;font-weight:750;text-transform:uppercase;opacity:.83;margin:0 0 8px}
.atc-market-hero h2{font-size:clamp(26px,4vw,38px)!important;color:#fff!important;margin:0 0 10px!important}
.atc-market-hero p{color:#e1edf5;margin:0;max-width:520px}
.atc-market-primary,.atc-market button.atc-market-primary{display:inline-flex;justify-content:center;align-items:center;background:#176eb3!important;color:white!important;border:1px solid #176eb3!important;border-radius:10px;padding:12px 16px!important;white-space:normal;text-align:center;font-weight:700;cursor:pointer;text-decoration:none!important;box-shadow:none}
.atc-market-hero .atc-market-primary{background:#fff!important;color:#174d74!important;border-color:#fff!important;flex-shrink:0}
.atc-market-filter{display:flex;gap:10px;margin-bottom:20px;align-items:stretch}
.atc-market-filter label{flex:1}
.atc-market-filter :is(input,select),.atc-market-form :is(input,select,textarea),.atc-market-chat-form textarea{font:inherit!important;font-size:16px!important;min-height:44px;background:#fff!important;border:1px solid #cadbe6!important;border-radius:9px!important;padding:11px 12px!important;color:#173b59!important;width:100%;max-width:100%;box-shadow:none!important}
.atc-market-filter select{width:180px;max-width:100%}
.atc-market-filter button,.atc-market-row-controls button{background:#eef5fa!important;border:1px solid #cfdfeb!important;color:#1c648f!important;border-radius:9px!important;padding:9px 15px!important;font-weight:700!important;cursor:pointer}
.atc-market-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-bottom:25px}
.atc-market-card{display:block;background:#fff;border:1px solid var(--market-line);border-radius:15px;overflow:hidden;color:var(--market-ink)!important;transition:transform .15s,box-shadow .15s}
.atc-market-card:hover{transform:translateY(-2px);box-shadow:0 9px 22px rgba(20,55,82,.11)}
.atc-market-photo{aspect-ratio:1.4;position:relative;background:#edf4f8;overflow:hidden}
.atc-market-photo img{display:block;width:100%;height:100%;object-fit:cover}
.atc-market-image-empty{display:grid;place-items:center;width:100%;height:100%;min-height:90px;font-size:52px;background:#eef5f9}
.atc-market-sold{position:absolute;top:10px;left:10px;background:#173a56;color:white;font-size:12px;padding:5px 8px;border-radius:6px;font-weight:700}
.atc-market-card-body{padding:15px}
.atc-market-card-body .atc-market-category,.atc-market-category{font-size:12px;letter-spacing:.06em;color:#1f76ad;font-weight:750;text-transform:uppercase}
.atc-market-card-body strong{display:block;color:var(--market-ink);font-size:19px;margin:5px 0}
.atc-market-card-body small{display:block;color:var(--market-muted)}
.atc-market-muted{color:var(--market-muted)!important;font-size:14px!important;line-height:1.65!important}
.atc-market-alert{padding:13px 17px;background:#eaf5ff;border:1px solid #c7e4f7;border-radius:11px;color:#185783;font-weight:650;margin:0 0 18px}
.atc-market-empty{padding:35px 22px;text-align:center;background:#f6fafc;border:1px dashed var(--market-line);border-radius:14px;margin:15px 0;color:#58758c}
.atc-market-back{display:inline-flex;margin:0 0 18px;font-size:14px;font-weight:750;color:#176eb3!important}
.atc-market-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;margin-bottom:30px}
.atc-market-detail-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-content:start}
.atc-market-detail-gallery img{display:block;width:100%;height:auto!important;max-height:760px;aspect-ratio:auto!important;object-fit:contain!important;object-position:center center;border-radius:12px;background:#fff}
.atc-market-detail-gallery img:first-child{grid-column:1/-1;aspect-ratio:auto!important}
.atc-market-info h2{margin:8px 0!important}
.atc-market-price{display:block;font-size:29px;margin:0 0 15px}
.atc-market-description{white-space:normal;margin:16px 0;color:#39536a}
.atc-market-questions,.atc-market-chat{border:1px solid var(--market-line);padding:22px;border-radius:16px;background:#fff;margin:20px 0}
.atc-market-questions h2{margin-bottom:8px!important}
.atc-market-comments{display:grid;gap:10px;margin:17px 0}
.atc-market-comment{padding:14px 16px;background:#f4f8fb;border:1px solid #e0eaf0;border-radius:12px}
.atc-market-comment.is-reply{margin-left:26px;border-left:3px solid #5d9dca}
.atc-market-comment>div{display:flex;gap:12px;justify-content:space-between;align-items:center;font-size:13px}
.atc-market-comment time{color:#768c9e;font-size:12px}
.atc-market-comment p{margin:7px 0;color:#284660}
.atc-market-reply,.atc-market-reply-cancel{border:0!important;background:none!important;color:#156ca9!important;padding:0!important;cursor:pointer;font-size:13px!important;font-weight:700}
.atc-market-form{display:grid;gap:16px;max-width:720px;background:#fff;border:1px solid var(--market-line);border-radius:15px;padding:21px;margin:12px 0 25px}
.atc-market-form label{display:grid;gap:7px;font-size:14px;font-weight:650;color:#23475f}
.atc-market-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}
.atc-market-form :is(input[type="checkbox"],input[type="file"]){min-height:auto!important}
.atc-market-form input[type="file"]{font-size:13px!important}
.atc-market-existing-photos{display:flex;flex-wrap:wrap;gap:12px;margin:9px 0}
.atc-market-existing-photos label{width:96px;font-size:12px}
.atc-market-existing-photos img{width:95px;height:80px;object-fit:cover;border-radius:8px}
.atc-market-row{display:grid;grid-template-columns:92px minmax(0,1fr) auto;gap:16px;align-items:center;border:1px solid var(--market-line);background:#fff;border-radius:12px;padding:12px;margin-bottom:12px}
.atc-market-thumb{width:92px;height:78px;overflow:hidden;border-radius:9px}
.atc-market-thumb img{width:100%;height:100%;object-fit:cover}
.atc-market-thumb .atc-market-image-empty{min-height:78px;font-size:32px}
.atc-market-row p{font-size:13px;color:#627d90;margin:6px 0!important}
.atc-market-row-actions{display:flex;gap:12px}
.atc-market-row-actions a{font-size:13px;color:#176eb3!important;font-weight:700}
.atc-market-row-controls{display:grid;justify-items:stretch;gap:7px}
.atc-market-row-controls button{font-size:12px!important;max-width:180px}
.atc-market-thread{display:flex;align-items:center;gap:14px;padding:16px;border:1px solid var(--market-line);background:#fff;border-radius:13px;margin-bottom:10px;color:#244960!important}
.atc-market-thread-icon{font-size:26px;color:#1a76b9}
.atc-market-thread span:nth-child(2){flex:1;min-width:0}
.atc-market-thread strong,.atc-market-thread small{display:block}
.atc-market-thread small{color:#687f90;white-space:normal}
.atc-market-unread{font-size:11px;background:#dcedf8;color:#155e9a;border-radius:10px;padding:5px 8px}
.atc-market-chat header{border-bottom:1px solid var(--market-line);padding-bottom:10px;margin-bottom:15px}
.atc-market-chat header p{margin-bottom:0;color:#667e90}
.atc-market-bubbles{display:flex;flex-direction:column;gap:12px;min-height:130px;max-height:490px;overflow-y:auto;margin:16px 0;padding:7px}
.atc-market-bubble{padding:11px 14px;border-radius:13px;max-width:84%;background:#edf4f9;align-self:flex-start;color:#244760}
.atc-market-bubble.is-mine{background:#176eb3;color:white;align-self:flex-end}
.atc-market-bubble p{margin:0 0 4px}
.atc-market-bubble small{font-size:11px;opacity:.76}
.atc-market-chat-form{display:grid;gap:10px;justify-items:end;border-top:1px solid var(--market-line);padding-top:13px}
.atc-market-chat-form label{width:100%}
.atc-market-comment-form{border:0;padding:0;margin:14px 0 0}
@media(max-width:1000px){.atc-market-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.atc-market-detail{grid-template-columns:1fr}}
@media(max-width:640px){.atc-market-hero{display:block;padding:22px}.atc-market-hero .atc-market-primary{margin-top:18px}.atc-market-tabs a{font-size:12px;min-width:0;padding:10px 6px}.atc-market-grid{gap:10px}.atc-market-card-body{padding:11px}.atc-market-card-body strong{font-size:17px}.atc-market-card h3{font-size:15px!important}.atc-market-filter{flex-wrap:wrap}.atc-market-filter label{flex:1 1 100%}.atc-market-filter select{flex:1;width:auto}.atc-market-form-grid{grid-template-columns:1fr}.atc-market-row{grid-template-columns:72px minmax(0,1fr)}.atc-market-thumb{width:72px;height:75px}.atc-market-row-controls{grid-column:1/-1;grid-template-columns:1fr 1fr}.atc-market-row-controls button{max-width:none;width:100%}.atc-market-questions,.atc-market-chat{padding:16px}.atc-market-comment.is-reply{margin-left:12px}.atc-market-detail-gallery img{max-height:min(78svh,760px)}}

/* 3.5.85: Zugangsregel für Gäste sichtbar, Schreibaktionen nur im Login */
.atc-market-guest-notice{display:flex;align-items:flex-start;gap:13px;padding:18px 20px;margin:0 0 20px;border:1px solid #cbdfe9;background:#f2f8fc;border-radius:14px;color:#214960}
.atc-market-guest-icon{display:flex;align-items:center;justify-content:center;flex:0 0 26px;width:26px;height:26px;border:1px solid #9ebfd4;border-radius:50%;font-weight:700;color:#216a96}
.atc-market-guest-copy{min-width:0;flex:1}
.atc-market-guest-copy>strong{font-size:16px;font-weight:750;display:block;margin-bottom:4px}
.atc-market-guest-copy p{font-size:14px;line-height:1.65;margin:0 0 12px;color:#41667e}
.atc-market-guest-copy p b{font-weight:650;color:#1b4f70}
.atc-market-guest-actions{display:flex;flex-wrap:wrap;gap:9px}
.atc-market-guest-actions a{display:inline-flex;align-items:center;justify-content:center;border:1px solid #176eb3;border-radius:9px;padding:9px 14px;font-size:14px;font-weight:720;color:#176eb3!important;background:white}
.atc-market-guest-actions a:first-child{background:#176eb3;color:white!important}
@media(max-width:640px){.atc-market-guest-notice{padding:14px 13px;gap:10px}.atc-market-guest-actions a{flex:1}.atc-market-guest-copy>strong{font-size:15px}}

/* 3.5.87: Registrierung als erste Aktion, Anmelden als Alternative. */
.atc-market-guest-actions a:first-child{background:#176eb3!important;color:#fff!important}
.atc-market-guest-actions a:nth-child(2){background:#fff!important;color:#176eb3!important}
.atc-market-hero>a.atc-market-primary{min-width:160px}
@media(max-width:640px){.atc-market-guest-actions{display:grid;grid-template-columns:1fr;gap:9px}.atc-market-guest-actions a{width:100%}}


/* Version 3.5.93: proportional einheitliche Miniaturen, unbeschnittene Detailfotos. */
.atc-market-photo{aspect-ratio:4/3!important;display:grid;place-items:center;background:#fff!important;overflow:hidden}
.atc-market-photo>img{display:block!important;width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important;padding:7px!important}
.atc-market-thumb{background:#fff;display:grid;place-items:center;height:auto!important;aspect-ratio:4/3}
.atc-market-thumb>img{object-fit:contain!important;width:100%!important;height:100%!important}
.atc-market-detail-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.atc-market-gallery-link{position:relative;display:flex;justify-content:center;align-items:center;min-width:0;aspect-ratio:4/3;background:#fff;border:1px solid #dce8f0;border-radius:14px;overflow:hidden;cursor:zoom-in}
.atc-market-gallery-link:first-child{grid-column:1/-1;min-height:210px;aspect-ratio:auto;max-height:560px}
.atc-market-detail-gallery .atc-market-gallery-link img{width:100%!important;height:100%!important;max-height:560px!important;min-width:0;object-fit:contain!important;object-position:center!important;aspect-ratio:auto!important;border-radius:0!important;padding:8px!important}
.atc-market-detail-gallery .atc-market-gallery-link:first-child img{max-height:560px!important}
.atc-market-image-zoom-hint{position:absolute;right:10px;bottom:10px;background:rgba(19,55,83,.9);color:#fff;padding:5px 10px;border-radius:20px;font-size:12px;font-weight:700;line-height:1.4;pointer-events:none}
.atc-market-gallery-link:focus-visible{outline:3px solid #207aba;outline-offset:3px}
.atc-market-lightbox[hidden]{display:none!important}
.atc-market-lightbox{position:fixed;inset:0;z-index:2147483000;display:flex;flex-direction:column;align-items:center;justify-content:center;background:rgba(9,19,32,.96);padding:50px 8px 15px;overscroll-behavior:contain}
.atc-market-lightbox-stage{display:grid;grid-template-columns:40px minmax(0,1fr) 40px;align-items:center;gap:3px;width:100%;height:min(83dvh,950px)}
.atc-market-lightbox-image{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center;touch-action:pinch-zoom;user-select:none;-webkit-user-select:none}
.atc-market-lightbox button{background:rgba(255,255,255,.12)!important;border:1px solid rgba(255,255,255,.3)!important;color:white!important;cursor:pointer;border-radius:50%;display:flex;align-items:center;justify-content:center;padding:0!important;box-shadow:none!important}
.atc-market-lightbox-prev,.atc-market-lightbox-next{width:38px;height:48px;border-radius:12px!important;font-size:36px;line-height:1}
.atc-market-lightbox-close{position:absolute;top:max(14px,env(safe-area-inset-top));right:max(16px,env(safe-area-inset-right));width:42px;height:42px;font-size:23px}
.atc-market-lightbox-count{color:#eef5fa!important;text-align:center;margin:8px 0 0!important;font-size:13px!important}
body.atc-market-lightbox-open{overflow:hidden!important}
@media(max-width:640px){.atc-market-gallery-link:first-child{max-height:65svh}.atc-market-detail-gallery .atc-market-gallery-link:first-child img{max-height:65svh!important}.atc-market-lightbox{padding-left:3px;padding-right:3px}.atc-market-lightbox-stage{grid-template-columns:32px minmax(0,1fr) 32px}.atc-market-lightbox-prev,.atc-market-lightbox-next{width:31px;height:43px;font-size:29px}}

.atc-market-existing-photos img{aspect-ratio:4/3;width:96px;height:72px!important;object-fit:contain!important;background:#fff}


/* 3.5.96 – übersichtliche Filter, stets explizite Standardsortierung Neueste zuerst. */
.atc-market-filter-3596{display:block!important;margin:0 0 8px;padding:20px;background:#fff;border:1px solid #dce8f0;border-radius:16px;box-shadow:0 3px 18px rgba(20,55,82,.035)}
.atc-market-filter-3596 .atc-market-filter-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.atc-market-filter-3596 .atc-market-filter-fields>label{display:flex!important;flex-direction:column;gap:6px;min-width:0;flex:auto!important;width:auto!important;margin:0;color:#244963;font-weight:660;font-size:13px}
.atc-market-filter-3596 .atc-market-filter-fields>label span{display:block;line-height:1.3}
.atc-market-filter-3596 .atc-market-filter-fields>label.atc-market-filter-search{grid-column:span 2}
.atc-market-filter-3596 .atc-market-filter-fields>label select{width:100%!important;min-width:0;max-width:100%!important}
.atc-market-filter-3596 .atc-market-filter-fields>label input{margin:0!important;width:100%!important}
.atc-market-filter-3596 .atc-market-filter-actions{display:flex;gap:13px;align-items:center;flex-wrap:wrap;margin-top:15px}
.atc-market-filter-3596 .atc-market-filter-actions button{background:#176eb3!important;color:#fff!important;border-color:#176eb3!important;min-height:44px;padding:10px 18px!important;border-radius:10px!important}
.atc-market-clear-filters{font-size:14px;font-weight:700;color:#176eb3!important;text-decoration:underline!important;text-underline-offset:3px}
.atc-market-results{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:14px 0;color:#5a768b;font-size:13px;font-weight:650}
.atc-market-pagination{display:flex;gap:14px;flex-wrap:wrap;align-items:center;justify-content:center;margin:22px auto 30px;color:#52748e}
.atc-market-pagination a{padding:9px 15px;border:1px solid #cbdfea;border-radius:10px;background:white;color:#176eb3!important;font-weight:700}
@media(max-width:1050px){.atc-market-filter-3596 .atc-market-filter-fields{grid-template-columns:repeat(3,minmax(0,1fr))}.atc-market-filter-3596 .atc-market-filter-fields>label.atc-market-filter-search{grid-column:span 2}}
@media(max-width:640px){.atc-market-filter-3596{padding:15px 13px}.atc-market-filter-3596 .atc-market-filter-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.atc-market-filter-3596 .atc-market-filter-fields>label.atc-market-filter-search{grid-column:span 2}.atc-market-filter-3596 .atc-market-filter-fields>label:nth-child(2),.atc-market-filter-3596 .atc-market-filter-fields>label:nth-child(3),.atc-market-filter-3596 .atc-market-filter-fields>label:last-child{grid-column:span 2}.atc-market-filter-3596 .atc-market-filter-actions{display:grid;grid-template-columns:1fr}.atc-market-filter-3596 .atc-market-filter-actions button{width:100%}.atc-market-clear-filters{text-align:center}}

/* Das Filtermenü ist freiwillig und bleibt beim normalen Stöbern eingeklappt. */
.atc-market-filter-panel{margin:0 0 12px;border-radius:15px;overflow:hidden;border:1px solid #d8e7f0;background:#fff}
.atc-market-filter-panel>summary{display:flex;justify-content:space-between;align-items:center;gap:14px;list-style:none;cursor:pointer;padding:14px 18px;color:#17547b;font-size:15px;font-weight:740;user-select:none}
.atc-market-filter-panel>summary::-webkit-details-marker{display:none}
.atc-market-filter-panel>summary span{transition:transform .18s ease;font-size:22px;line-height:1}
.atc-market-filter-panel[open]>summary span{transform:rotate(180deg)}
.atc-market-filter-panel .atc-market-filter-3596{margin:0;border:0;border-top:1px solid #e4eef5;border-radius:0;box-shadow:none}
@media(min-width:1051px){.atc-market-filter-3596 .atc-market-filter-fields>label:last-child{grid-column:span 2}}
@media(min-width:641px) and (max-width:1050px){.atc-market-filter-3596 .atc-market-filter-fields>label:last-child{grid-column:span 3}}
