/* ─────────────────────────────────────────────
   Makaroniki Configurator – bazowy styl (grid + layout)
   Kolory i wygląd dostosuj według potrzeb.
   ───────────────────────────────────────────── */

.mkr-configurator {
    margin: 1.5em 0;
}

/* Przełącznik trybu */
.mkr-mode-switch {
    display: flex;
    gap: 0.5em;
    margin-bottom: 1em;
}

.mkr-mode-btn {
    padding: 12px 20px;
    border: 2px solid var(--color);
    border-radius: 15px;
    background: transparent;
    cursor: pointer;
    color: var(--color);
    font-weight: 500;
    font-size: 0.9em;
    transition: background 0.2s, border-color 0.2s;
}

.mkr-mode-btn--active {
    background: var(--color);
    color: #fff;
    border-color: var(--color);
}

/* Grid makaroników */
.mkr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1em;
}

.mkr-grid.mkr-grid--custom {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}


@media screen and (max-width: 1200px) {
    .mkr-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    .mkr-grid.mkr-grid--custom {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}
@media screen and (max-width: 600px) {
    .mkr-grid {
        grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    }
    .mkr-grid.mkr-grid--custom {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

.mkr-grid__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: space-between;
}

.mkr-grid__img {
    display: block;
    width: 100%;
    max-width: 120px;
    height: auto;
    aspect-ratio: 1.1 / 1;
    object-fit: contain;
    border-radius: 4px;
}

/* Safari / older browsers fallback */
@supports not (aspect-ratio: 1) {
    .mkr-grid__img {
        /* preserve visual box when aspect-ratio isn't supported */
        max-height: 120px;
        width: auto;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
}

.mkr-grid__placeholder {
    width: 100%;
    max-width: 120px;
    aspect-ratio: 1 / 1;
    background: #eee;
    border-radius: 4px;
}

.mkr-grid__name {
    display: block;
    margin-top: 0.3em;
    font-size: var(--font-size-small);
    color: var(--color);
}

/* Gotowe zestawy */
.mkr-ready-set {
    border: 1px solid #e832812e;
    border-radius: 15px;
    padding: 1em;
    margin-bottom: 1em;
    cursor: pointer;
    transition: border-color 0.2s;
}

.mkr-ready-set--selected {
    border-color: #333;
}

.mkr-ready-set__label {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 0.5em;
    cursor: pointer;
}

.mkr-ready-set__name {
    font-weight: 400;
    font-size: var(--font-size-normal);
    font-family: Unbounded;
    color: var(--color);
}
input.mkr-ready-set__radio {display: none;}
.mkr-ready-set__radio {
    margin: 0;
}

/* Licznik konfiguracji własnej */
.mkr-counter {
    font-size: 1em;
    margin-bottom: 0.8em;
    font-weight: 600;
}

.mkr-counter--full {
    color: #2a7d2a;
}

/* Plus / minus */
.mkr-qty {
    display: flex;
    align-items: center;
    gap: 0.4em;
    margin-top: 0.4em;
}

.mkr-qty__btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--color);
    background: transparent;
    font-size: 1em;
    color: var(--color);
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: background 0.15s;
}

.mkr-qty__btn:hover {
    border-color: var(--color);
}

.mkr-qty__btn--disabled {
    opacity: 0.4;
    cursor: default;
}

.mkr-qty__val {
    min-width: 1.5em;
    text-align: center;
    font-weight: 600;
    color: var(--color);
    font-size: 0.9em;
}

/* Podgląd zestawu – sloty */
.mkr-preview {
    margin-top: 1.5em;
}


.mkr-preview__slot {
    border: 2px dashed #ccc;
    height: auto;
    width: 100%;
    aspect-ratio: 1.1 / 1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.2s;
}

.mkr-preview__slot--filled {
    border-style: solid;
    border-color: var(--color);
}

.mkr-preview__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mkr-preview__fallback {
    font-size: 0.6em;
    text-align: center;
    padding: 2px;
    word-break: break-word;
}

.mkr-ready-set--selected {
    box-shadow: 0 0 0 2px var(--color);
    border-color: var(--color);
}
.mkr-custom-item {
    padding: 10px;
    border-radius: 10px;
    background: #ff409314;
}
h3.mkr-preview__title {
    color: var(--color);
}
.mkr-counter {
    display: none;
}
.mkr-custom-qty-wrap {
    display: flex;
    gap: 5px;
    flex-direction: column;
    margin-bottom: 10px;
}
.mkr-price-display *, .mkr-custom-qty-wrap label {
    color: var(--color);
    font-size: var(--font-size-h6);
}
.mkr-price-display {
    margin-bottom: 10px;
}
.mkr-custom-qty-wrap input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--color);
    border-radius: 8px;
    min-width: 260px;
    width: fit-content;
}
.product_meta {
    display: none;
}