/* ===================================================
   MODAL SKŁADNIKÓW / KONFIGURATOR PIZZY
   =================================================== */

.pizza-custom-modal .modal-content {
    position: relative;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}

.pizza-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    padding: 12px;
    opacity: 1;
}

.pizza-modal-left {
    background: radial-gradient(circle at center, #222 0%, #070707 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 560px;
    border-right: 1px solid #222;
}

.pizza-modal-image-wrap {
    width: min(78%, 430px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 3px dashed rgba(255, 215, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.pizza-modal-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 25px 40px rgba(0, 0, 0, 0.65));
}

.pizza-modal-right {
    background: #0b0b0b;
}

.pizza-modal-content {
    padding: 44px 44px 34px;
    max-height: 82vh;
    overflow-y: auto;
}

.pizza-modal-title {
    font-size: clamp(2rem, 3vw, 3.1rem);
    line-height: 1;
    font-weight: 900;
    color: #fff;
    margin: 0 0 10px;
}

.pizza-modal-subtitle {
    color: #9aa4af;
    font-size: 15px;
    margin: 0;
}

.pizza-modal-section-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
}

/* Rozmiary pizzy */

.pizza-size-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: #151515;
    border: 1px solid #252525;
    border-radius: 18px;
    padding: 8px;
}

.pizza-size-label {
    cursor: pointer;
    border-radius: 14px;
    padding: 12px 10px;
    text-align: center;
    color: #8d98a3;
    transition: all 0.2s ease;
    user-select: none;
}

.pizza-size-label span {
    display: block;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.1;
}

.pizza-size-label small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 700;
    opacity: 0.85;
}

.pizza-size-input:checked + .pizza-size-label {
    background: #FFD700;
    color: #000;
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.2);
}

/* Składniki */

.ingredients-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.ingredient-card {
    cursor: pointer;
    margin: 0;
}

.ingredient-card input {
    display: none;
}

.ingredient-card-inner {
    height: 100%;
    min-height: 150px;
    background: #151515;
    border: 1px solid #252525;
    border-radius: 18px;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    transition: all 0.2s ease;
}

.ingredient-card-inner img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    margin-bottom: 10px;
}

.ingredient-name {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.ingredient-price {
    color: #FFD700;
    font-size: 16px;
    font-weight: 900;
    margin-top: 8px;
}

.ingredient-card:hover .ingredient-card-inner {
    border-color: rgba(255, 215, 0, 0.6);
    transform: translateY(-2px);
}

.ingredient-card input:checked + .ingredient-card-inner {
    border-color: #FFD700;
    background: linear-gradient(180deg, #1f1f1f 0%, #111 100%);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

/* Podsumowanie */

.pizza-modal-summary {
    position: sticky;
    bottom: -34px;
    margin: 30px -44px -34px;
    padding: 18px 44px;
    background: rgba(10, 10, 10, 0.94);
    backdrop-filter: blur(12px);
    border-top: 1px solid #252525;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.summary-label {
    display: block;
    color: #8d98a3;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

#golyBenekTotal {
    display: block;
    color: #FFD700;
    font-size: 26px;
    line-height: 1.1;
}

.pizza-add-to-cart {
    min-width: 210px;
    min-height: 52px;
    border-radius: 999px;
}

/* Mobile */

@media (max-width: 991px) {
    .pizza-modal-left {
        min-height: 310px;
        border-right: 0;
        border-bottom: 1px solid #222;
    }

    .pizza-modal-image-wrap {
        width: min(62%, 280px);
        padding: 18px;
    }

    .pizza-modal-content {
        padding: 28px 18px 24px;
        max-height: none;
        overflow: visible;
    }

    .ingredients-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pizza-modal-summary {
        margin: 26px -18px -24px;
        padding: 16px 18px;
        bottom: -24px;
    }
}

@media (max-width: 480px) {
    .pizza-size-tabs {
        grid-template-columns: 1fr;
    }

    .ingredients-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .ingredient-card-inner {
        min-height: 132px;
        padding: 12px 8px;
    }

    .ingredient-card-inner img {
        width: 50px;
        height: 50px;
    }

    .pizza-modal-summary {
        flex-direction: column;
        align-items: stretch;
    }

    .pizza-add-to-cart {
        width: 100%;
    }
}
/* ===================================================
   MOBILE FIX - konfigurator pizzy
   =================================================== */

@media (max-width: 991px) {

    .pizza-custom-modal .modal-dialog {
        margin: 0;
        max-width: 100%;
    }

    .pizza-custom-modal .modal-content {
        min-height: 100dvh;
        height: 100dvh;
        border-radius: 0 !important;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .pizza-custom-modal .row {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        padding-bottom: 150px;
    }

    .pizza-modal-close {
        top: 12px;
        right: 14px;
        width: 44px;
        height: 44px;
        background-color: rgba(0, 0, 0, 0.55);
        border: 1px solid rgba(255, 255, 255, 0.25);
        z-index: 50;
    }

    .pizza-modal-left {
        min-height: auto;
        height: 280px;
        padding: 22px 0 18px;
        border-bottom: 1px solid #252525;
    }

    .pizza-modal-image-wrap {
        width: 230px;
        max-width: 62vw;
        padding: 14px;
    }

    .pizza-modal-content {
        padding: 26px 20px 10px;
        max-height: none;
        overflow: visible;
    }

    .pizza-modal-title {
        font-size: 40px;
        line-height: 1.05;
        margin-bottom: 10px;
    }

    .pizza-modal-subtitle {
        font-size: 18px;
        line-height: 1.35;
        color: #aeb7c2;
    }

    .pizza-modal-section-title {
        font-size: 26px;
        margin-bottom: 14px;
    }

    .pizza-size-tabs {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
        border-radius: 22px;
        background: #111;
    }

    .pizza-size-label {
        padding: 16px 12px;
        border-radius: 18px;
        background: #191919;
        border: 1px solid #2a2a2a;
    }

    .pizza-size-label span {
        font-size: 22px;
    }

    .pizza-size-label small {
        font-size: 16px;
        margin-top: 6px;
    }

    .ingredients-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding-bottom: 12px;
    }

    .ingredient-card-inner {
        min-height: 132px;
        border-radius: 18px;
        padding: 12px 8px;
    }

    .ingredient-card-inner img {
        width: 54px !important;
        height: 54px !important;
        max-width: 54px !important;
        max-height: 54px !important;
    }

    .ingredient-name {
        font-size: 14px;
    }

    .ingredient-price {
        font-size: 18px;
    }

    .pizza-modal-summary {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
        margin: 0;
        padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
        background: rgba(5, 5, 5, 0.98);
        border-top: 1px solid #2c2c2c;
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .summary-label {
        font-size: 13px;
        letter-spacing: 0.14em;
    }

    #golyBenekTotal {
        font-size: 40px;
    }

    .pizza-add-to-cart {
        width: 100%;
        min-height: 58px;
        font-size: 18px;
        border-radius: 999px;
    }
}

@media (max-width: 420px) {

    .pizza-modal-left {
        height: 240px;
    }

    .pizza-modal-image-wrap {
        width: 205px;
        max-width: 58vw;
    }

    .pizza-modal-title {
        font-size: 34px;
    }

    .pizza-modal-subtitle {
        font-size: 16px;
    }

    .pizza-modal-section-title {
        font-size: 23px;
    }

    .pizza-custom-modal .row {
        padding-bottom: 145px;
    }

    #golyBenekTotal {
        font-size: 36px;
    }
}