.single-product form.cart {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.single-product form.cart .quantity {
    margin: 0 !important;
    flex: 0 0 auto;
}

.single-product form.cart .single_add_to_cart_button,
.single-product form.cart #marking_options_button,
.single-product form.cart .ag-add-to-offer-btn {
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border-radius: 24px !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    line-height: 1 !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

.single-product form.cart #marking_options_button,
.single-product form.cart .ag-add-to-offer-btn {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

.single-product form.cart .single_add_to_cart_button {
    max-width: none !important;
}

.single-product form.cart .quantity .minus,
.single-product form.cart .quantity .plus,
.single-product form.cart .quantity input.qty {
    height: 34px !important;
    min-height: 34px !important;
    box-sizing: border-box !important;
}

@media (max-width: 767px) {
    .single-product form.cart {
        gap: 10px;
    }

    .single-product form.cart .single_add_to_cart_button,
    .single-product form.cart #marking_options_button,
    .single-product form.cart .ag-add-to-offer-btn {
        padding: 0 10px !important;
        font-size: 11px !important;
    }
}

.ag-add-to-offer-btn {
    background: #95c93d;
    color: #fff;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.ag-add-to-offer-btn:hover {
    opacity: .92;
    color: #fff;
}

.ag-offer-wrap {
    margin: 30px 0;
}

.ag-offer-actions-top {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: center;
}

.ag-offer-sku-add {
    display: inline-flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
}

.ag-offer-sku-input {
    width: 180px;
    min-width: 180px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    height: 42px;
}

.ag-offer-top-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    padding: 14px 18px;
    border: 1px solid #222;
    background: #fff;
    color: #222;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
}

.ag-offer-top-btn--green {
    background: #95c93d;
    color: #fff;
    border-color: #95c93d;
}

.ag-offer-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.ag-offer-table th,
.ag-offer-table td {
    border: 1px solid #e6e6e6;
    padding: 16px 12px;
    vertical-align: top;
}

.ag-offer-table th {
    font-size: 15px;
    color: #1d2b4d;
    text-align: left;
}

.ag-offer-product-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    min-width: 180px;
}

.ag-offer-thumb img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
}

.ag-offer-product-name {
    font-weight: 700;
    text-decoration: none;
    color: #1d2b4d;
}

.ag-offer-product-name:hover {
    text-decoration: underline;
}

.ag-offer-sku {
    font-weight: 700;
    display: block;
    margin-top: 4px;
}

.ag-offer-stock {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: #6b7280;
}

.ag-offer-sub {
    font-size: 13px;
    color: #6b7280;
}

.ag-mini-input {
    width: 78px;
    text-align: center;
    padding: 8px 10px;
}

.ag-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid #d8d8d8;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    color: #222;
    font-weight: 600;
}

.ag-action-btn--pink {
    color: #db126d;
    border-color: #f3bfd8;
}

.ag-action-btn--dark {
    background: #2f2f35;
    border-color: #2f2f35;
    color: #fff;
}

.ag-marking-box {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.ag-marking-row {
    margin-top: 8px;
    padding: 10px;
    background: #fafafa;
    border-radius: 6px;
}

/* LISTA + OBA PRZYCISKI W JEDNEJ LINII */
.ag-marking-picker {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    vertical-align: top;
    max-width: 100%;
}

.ag-marking-select {
    min-width: 260px;
    max-width: 100%;
    padding: 8px 10px;
}

/* przycisk "Dodaj ręcznie" obok "Dodaj z listy" */
.ag-offer-table td:nth-child(3) > .ag-action-btn.ag-offer-add-marking {
    display: inline-flex;
    vertical-align: top;
    margin-left: 8px;
    margin-bottom: 10px;
}

/* sekcja zapisanych znakowań pod spodem */
.ag-offer-table td:nth-child(3) .ag-marking-box {
    clear: both;
}

/* PRZERYWANA LINIA POMIĘDZY PRODUKT A ZNAKOWANIE W KOLUMNIE WARTOŚĆ NETTO */
.ag-offer-net-break {
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

/* KOLUMNA RABAT — przerywana linia między rabatem produktu i znakowania */
.ag-offer-discount-sep {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

/* w kolumnie rabat znakowania bez szarego boxa */
.ag-offer-table td:nth-child(4) .ag-marking-row {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-top: 8px !important;
}

/* dodatkowo wyrównanie startu sekcji znakowania w rabatach */
.ag-offer-table td:nth-child(4) .ag-offer-discount-sep + .ag-marking-row {
    margin-top: 10px !important;
}

.ag-offer-bottom {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.ag-offer-name {
    min-width: 220px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    height: 42px;
}

.ag-empty {
    padding: 24px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
}

.ag-offer-table tfoot td {
    background: #fafafa;
    font-size: 18px;
}

.ag-saved-list {
    display: grid;
    gap: 14px;
}

.ag-saved-card {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 8px;
    padding: 16px;
}

.ag-saved-card-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.ag-saved-card-meta {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
}

.ag-saved-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ag-marking-picker {
    display: block;
    margin-bottom: 10px;
}

.ag-marking-select {
    min-width: 260px;
    max-width: 100%;
    width: 100%;
    padding: 8px 10px;
}

.ag-marking-buttons-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

/* węższa kolumna Produkt */
.ag-offer-table th:nth-child(1),
.ag-offer-table td:nth-child(1) {
    width: 150px;
    min-width: 150px;
    max-width: 1500px;
    text-align: left;
}

/* węższa kolumna Ilość */
.ag-offer-table th:nth-child(2),
.ag-offer-table td:nth-child(2) {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    text-align: center;
}

/* węższa kolumna Ilość */
.ag-offer-table th:nth-child(3),
.ag-offer-table td:nth-child(3) {
    width: 350px;
    min-width: 350px;
    max-width: 350px;
    text-align: left;
}

.ag-offer-table td:nth-child(2) .ag-mini-input {
    width: 64px;
    min-width: 64px;
}

/* węższa kolumna Akcje */
.ag-offer-table th:nth-child(6),
.ag-offer-table td:nth-child(6) {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

.ag-offer-table td:nth-child(6) > div {
    gap: 6px !important;
}

.ag-offer-table td:nth-child(6) .ag-action-btn {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
}



@media (max-width: 900px) {
    .ag-offer-table {
        display: block;
        overflow: auto;
        white-space: nowrap;
    }

    .ag-marking-picker {
        flex-wrap: wrap;
    }

    .ag-offer-table td:nth-child(3) > .ag-action-btn.ag-offer-add-marking {
        margin-left: 0;
    }
}