/* ============================
   NEGOCJACJE – checkbox + tekst
============================ */

.neg-inline {
    display: flex;
    align-items: center;
    gap: 10px;

    height: 42px; /* jak input */
    padding: 0 12px;

    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);

    cursor: pointer;
}

.neg-inline input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.neg-inline span {
    font-size: 0.95rem;
    font-weight: 500;
}

/* NEGOCJACJE — czysty checkbox */
.neg-checkbox {
    width: 22px;
    height: 22px;
    margin: 0;

    accent-color: var(--accent-color);
    cursor: pointer;

    /* usunięcie focus / obwódek */
    outline: none !important;
    box-shadow: none !important;
}

.neg-checkbox:focus,
.neg-checkbox:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* wyrównanie w polu */
.field > .neg-checkbox {
    margin-top: 10px; /* żeby nie wisiał na środku */
}

/* checkbox w gridzie — wyrównaj pole do góry/lewej */
.row-3 > .field:has(.neg-checkbox) {
    align-self: start;
    justify-self: start;
}


/* wysoka kolumna jak input Cena */
.price-check {
    height: 42px;
    display: flex;
    align-items: center;
}



/* =========================================================
   ZDJĘCIA — GRID + DRAG & DROP (ADD + EDIT)
========================================================= */

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 18px;
    overflow: visible;
}

.market-image-item,
.ad-image-item {
    position: relative;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;

    background: #f3f3f3;
    border: 1px solid var(--border-color);

    cursor: grab;
    user-select: none;
    touch-action: none;

    transition: transform 320ms cubic-bezier(.22,.61,.36,1);
}

.market-image-item img.preview-thumb,
.ad-image-item img.preview-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.market-image-item:hover,
.ad-image-item:hover {
    outline: 2px dashed rgba(56,189,248,.6);
    outline-offset: 3px;
}

.market-image-item.dragging,
.ad-image-item.dragging {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    cursor: grabbing;
    transition: none !important;
    box-shadow: 0 18px 40px rgba(0,0,0,.35);
}

.market-image-item.placeholder,
.ad-image-item.placeholder {
    background: rgba(56,189,248,.15);
    border: 2px dashed rgba(56,189,248,.6);
}

/* =========================
   GŁÓWNE + USUWANIE
========================= */
.market-image-item-main,
.ad-image-item-main {
    border: 2px solid var(--accent-color);
    outline: 2px solid var(--accent-color);
}

.market-image-item-main::after,
.ad-image-item-main::after {
    content: "GŁÓWNE";
    position: absolute;
    bottom: 6px;
    left: 6px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    color: #fff;
    background: rgba(56,189,248,.95);
}

.market-image-remove,
.ad-image-remove {
    position: absolute;
    top: 6px;
    right: 6px;

    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;

    background: rgba(0,0,0,.65);
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
}

.market-image-remove::before,
.ad-image-remove::before {
    content: "×";
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    transition: transform 160ms cubic-bezier(.22,.61,.36,1);
}

.market-image-remove:hover,
.ad-image-remove:hover {
    background: rgba(220,38,38,.9);
}

.market-image-remove:hover::before,
.ad-image-remove:hover::before {
    transform: scale(1.18);
}

@media (hover: none) {
    .market-image-item,
    .ad-image-item {
        transition: transform 260ms cubic-bezier(.22,.61,.36,1);
    }
}
