/* ================================================================
   MC Product ATC – Panel Konfiguratora Produktu
   ================================================================ */

/* ── Panel ─────────────────────────────────────────────── */
.mc-atc {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ── Tytuł / podtytuł ──────────────────────────────────── */
.mc-atc__title {
    margin: 0 0 4px;
    color: #252525;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
}

.mc-atc__subtitle {
    margin: 0 0 16px;
    color: #666;
    font-size: 15px;
    line-height: 1.4;
}

/* ── Form ──────────────────────────────────────────────── */
.mc-atc__form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0;
}

/* ── Sekcje ────────────────────────────────────────────── */
.mc-atc__sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mc-atc__sec-title {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #252525;
}

.mc-atc__sec-num {
    flex: 0 0 auto;
    color: inherit;
    font: inherit;
}

.mc-atc__sec-label {
    flex: 1 1 auto;
    color: inherit;
    font: inherit;
}

.mc-atc__sec-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

/* ── Item (przyciski) ──────────────────────────────────── */
.mc-atc__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    background: #fff;
    color: #252525;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    line-height: 1.2;
    transition: background-color .2s, color .2s, border-color .2s;
    font-family: inherit;
    box-sizing: border-box;
}

.mc-atc__item:hover:not(.is-selected) {
    border-color: #252525;
}

.mc-atc__item.is-selected {
    background-color: #252525;
    color: #fff;
    border-color: #252525;
}

.mc-atc__item-image {
    display: block;
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.mc-atc__sec--swatches .mc-atc__item {
    padding: 6px;
}

.mc-atc__item-label {
    display: block;
}

/* ── Totals row ────────────────────────────────────────── */
.mc-atc__totals {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.mc-atc__total-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.mc-atc__total-label {
    color: #666;
    font-size: 14px;
    line-height: 1.2;
}

.mc-atc__total-prices {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    line-height: 1.1;
}

.mc-atc__total-current {
    color: #252525;
    font-size: 28px;
    font-weight: 700;
}

.mc-atc__total-current .woocommerce-Price-amount {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.mc-atc__total-old {
    color: #999;
    font-size: 16px;
    text-decoration: line-through;
    opacity: 1;
}

.mc-atc__total-old .woocommerce-Price-amount {
    color: inherit;
    font-size: inherit;
}

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

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

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

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

/* ── Przycisk dodaj do koszyka ─────────────────────────── */
.mc-atc__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 17px 40px;
    background: #252525;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s, color .2s;
    white-space: nowrap;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

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

.mc-atc__btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mc-atc__btn-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

.mc-atc__btn.loading,
.mc-atc__btn.added {
    cursor: wait;
    pointer-events: none;
}

.mc-atc__btn .mc-atc__spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 37, 37, .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(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mc-atc-spin .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;
}

/* ── Podgląd Elementor (brak produktu) ─────────────────── */
.mc-atc--preview {
    padding: 20px;
    border: 1px dashed #999;
    background: #f9f9f9;
    color: #666;
    text-align: center;
}

/* ── Responsywność ─────────────────────────────────────── */
@media (max-width: 1024px) {
    .mc-atc__sec-items { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
    .mc-atc__sec-items { grid-template-columns: repeat(2, 1fr); }
    .mc-atc__total-current { font-size: 24px; }
    .mc-atc__total-old { font-size: 14px; }
    .mc-atc__totals { flex-direction: column; align-items: stretch; }
    .mc-atc__btn { width: 100%; }
}

/* ── Nagłówek produktu (mc-ph) – pozostawione ──────────── */
.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) – pozostawione ───────────── */
.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) – pozostawione ───────── */
.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; }
