/* ================================================================
   MC Product ATC – Add to Cart Panel
   ================================================================ */

/* ── Panel ──────────────────────────────────────────────────── */
.mc-atc {
    width: 100%;
    box-sizing: border-box;
}

/* ── Etykieta nad ceną ──────────────────────────────────────── */
.mc-atc__price-label {
    display: block;
    margin-bottom: 8px;
    color: #888;
    font-size: 13px;
}

/* ── Dwie kolumny ───────────────────────────────────────────── */
.mc-atc__cols {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 24px;
}

.mc-atc__left {
    flex: 1 1 auto;
    min-width: 0;
}

.mc-atc__right {
    flex-shrink: 0;
}

/* ── Lewa kolumna – stack pionowy ───────────────────────────── */
.mc-atc__left {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Cena ───────────────────────────────────────────────────── */
.mc-atc__price {
    line-height: 1.2;
}

.mc-atc__price .woocommerce-Price-amount {
    font-size: inherit;
}

.mc-atc__price del {
    opacity: 1;
}

.mc-atc__price del .woocommerce-Price-amount {
    color: #999;
}

/* ── Cena netto ─────────────────────────────────────────────── */
.mc-atc__net {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
    font-size: 13px;
}

.mc-atc__net-value {
    color: #252525;
}

.mc-atc__net-suffix {
    color: #888;
}

/* ── Najniższa cena 30 dni ──────────────────────────────────── */
.mc-atc__lowest {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
    font-size: 12px;
}

.mc-atc__lowest-label {
    color: #888;
}

.mc-atc__lowest-value {
    color: #252525;
}

/* ── Formularz (flex kontrolowany z Elementora) ─────────────── */
.mc-atc__form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 8px;
}

/* ── Prawa kolumna ──────────────────────────────────────────── */
.mc-atc__right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* ── Kontener licznika (border + bg + radius tutaj) ─────────── */
.mc-atc__qty-control {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #fff;
}

.mc-atc__qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 0;
    background-color: #f5f5f5;
    color: #252525;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    transition: background-color 0.2s, color 0.2s;
    padding: 0 !important;
    outline: none;
    box-sizing: border-box;
}

.mc-atc__qty-btn:hover {
    background-color: #e8e8e8;
}

.mc-atc__qty-minus {
    border-right: 1px solid #e0e0e0;
}

.mc-atc__qty-plus {
    border-left: 1px solid #e0e0e0;
}

.mc-atc__qty-input {
    width: 56px;
    height: 40px;
    border: none;
    border-radius: 0;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: #252525;
    background: transparent;
    -moz-appearance: textfield;
    box-sizing: border-box;
    padding: 4px 8px;
    outline: none;
    min-width: 0;
}

.mc-atc__qty-input::-webkit-inner-spin-button,
.mc-atc__qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ── Przycisk dodaj do koszyka ──────────────────────────────── */
.mc-atc__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background-color: #252525;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
    box-sizing: border-box;
}

.mc-atc__btn:hover {
    background-color: #444;
    color: #fff;
}

.mc-atc__btn {
    position: relative;
    overflow: hidden;
}

.mc-atc__btn.loading,
.mc-atc__btn.added {
    background-color: #252525 !important;
    color: #fff !important;
    opacity: 1 !important;
    cursor: wait;
    pointer-events: none;
    box-sizing: border-box !important;
}

.mc-atc__btn.loading::after,
.mc-atc__btn.added::after {
    content: none !important;
    display: none !important;
}

.mc-atc__btn .mc-atc__spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 37, 37, 0.3);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    border-radius: inherit;
}

.mc-atc__btn .mc-atc__spinner::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(76, 108, 86, 0.3);
    border-top-color: #4C6C56;
    border-radius: 50%;
    animation: mc-atc-spin 0.65s linear infinite;
}

@keyframes mc-atc-spin {
    to { transform: rotate(360deg); }
}

.mc-atc__form .added_to_cart,
.mc-atc__form .wc-forward,
.mc-atc__form a.added_to_cart {
    display: none !important;
}

/* ── Nagłówek produktu (mc-ph) ──────────────────────────────── */
.mc-ph__title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.mc-ph__title {
    flex: 0 1 auto;
    margin: 0;
    color: #252525;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
}

.mc-ph__badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    background-color: #252525;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.mc-ph__producer {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
    font-size: 13px;
}

.mc-ph__producer-label {
    color: #888;
}

.mc-ph__producer-value {
    color: #252525;
    font-weight: 500;
}

/* ── Cechy produktu (mc-feat) ───────────────────────────────── */
.mc-feat {
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
}

.mc-feat__row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    box-sizing: border-box;
}

.mc-feat__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #1f1f1f;
}

.mc-feat__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.mc-feat__text {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    font-size: 14px;
    line-height: 1.4;
}

.mc-feat__label {
    color: #444;
}

.mc-feat__value {
    font-weight: 700;
    color: #252525;
}

/* ── Krótki opis produktu (mc-sd) ──────────────────────────── */
.mc-sd {
    color: #444;
    font-size: 15px;
    line-height: 1.6;
    box-sizing: border-box;
}

.mc-sd p {
    margin: 0;
    color: inherit;
}

.mc-sd p + p {
    margin-top: 12px;
}

.mc-sd ul,
.mc-sd ol {
    margin: 0;
    padding-left: 20px;
}

.mc-sd ul li + li,
.mc-sd ol li + li {
    margin-top: 6px;
}

.mc-sd a {
    text-decoration: underline;
}

.mc-sd h1, .mc-sd h2, .mc-sd h3,
.mc-sd h4, .mc-sd h5, .mc-sd h6 {
    color: #252525;
    margin: 0 0 8px;
    line-height: 1.3;
}

/* ── Responsywność ──────────────────────────────────────────── */
@media (max-width: 767px) {
    .mc-atc__cols {
        flex-direction: column;
        align-items: stretch;
    }

    .mc-atc__right {
        width: 50%;
    }

    .mc-atc__form {
        flex-direction: row;
        align-items: center;
    }

    .mc-atc__btn {
        flex: 1;
    }
}
