/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal--active {
    display: flex;
}

.modal-dialog {
    background: #ffffff;
    border-radius: 15px;
    max-width: 647px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: none;
}

.modal-header .flex {
    display: flex;
    gap: 15px;
}

.modal-product-image {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
}

.modal-product-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a3c5e;
}

.modal-product-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.modal-product-price {
    font-size: 16px;
    font-weight: 600;
    color: rgb(40, 121, 176);
}

.info-btn {
    background: none;
    border: none;
    cursor: pointer;
}

.info-btn i {
    font-size: 16px;
    color: rgb(40, 121, 176);
    transition: color 0.3s ease;
}

.info-btn:hover i {
    color: rgb(50, 141, 196);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
}

.modal-close .material-icons-round {
    font-size: 24px;
    color: #f43f5e;
    transition: transform 0.3s ease;
}

.modal-close:hover .material-icons-round {
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Modal Content Styles */
.modal-body h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1a3c5e;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.modal-body .flex {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

/* Quantity Section */
.indec-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f7f7fc;
    padding: 5px 10px;
    border-radius: 15px;
}

.indec-minus,
.indec-plus {
    background: none;
    border: 1px solid rgb(40, 121, 176);
    color: rgb(40, 121, 176);
    font-size: 10px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.indec-minus:hover,
.indec-plus:hover {
    background: rgb(40, 121, 176);
    color: #fff;
}

.indec-value {
    width: 30px;
    text-align: center;
    border: none;
    background: none;
    font-size: 12px;
    font-weight: 600;
    color: #1a3c5e;
}

/* Touch Scroll Containers */
.touch-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.touch-scroll::-webkit-scrollbar {
    display: none;
}

/* Extras Grid */
.extras-container {
    margin-bottom: 20px;
}

.extras-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 12px;
    padding: 10px 0;
}

.extra-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: #f7f7fc;
    border-radius: 10px;
    border: 1px solid #e6f0fa;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    height: 80px;
}

.extra-card:hover {
    background: #e6f0fa;
    border-color: rgb(40, 121, 176);
    transform: translateY(-2px);
}

.extra-card input {
    position: absolute;
    opacity: 0;
}

.extra-card input:checked + .extra-name::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 8px;
    right: 8px;
    color: rgb(40, 121, 176);
    font-size: 14px;
}

.extra-name {
    font-size: 12px;
    font-weight: 500;
    color: #1a3c5e;
    margin-bottom: 8px;
    text-transform: capitalize;
}

.extra-price {
    font-size: 12px;
    font-weight: 600;
    color: rgb(40, 121, 176);
}

/* Addons Grid */
.addons-container {
    margin-bottom: 20px;
}

.addons-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 12px;
    padding: 10px 0;
    min-width: max-content;
}

.addon-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e6f0fa;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 180px;
    position: relative;
}

.addon-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.addon-card img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.addon-content {
    padding: 8px;
    flex-grow: 1;
}

.addon-name {
    font-size: 12px;
    font-weight: 600;
    color: #1a3c5e;
    margin-bottom: 4px;
    display: block;
}

.addon-price {
    font-size: 12px;
    font-weight: 600;
    color: rgb(40, 121, 176);
}

.addon-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #f7f7fc;
    justify-content: center;
}

.addon-quantity .indec-minus,
.addon-quantity .indec-plus {
    font-size: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgb(40, 121, 176);
    color: rgb(40, 121, 176);
    background: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.addon-quantity .indec-minus:hover,
.addon-quantity .indec-plus:hover {
    background: rgb(40, 121, 176);
    color: #fff;
}

.addon-quantity .indec-value {
    width: 30px;
    text-align: center;
    border: none;
    background: none;
    font-size: 12px;
    font-weight: 600;
    color: #1a3c5e;
}

/* Özel Talimatlar Bölümü */
.modal-body textarea {
    width: 100%;
    height: 60px;
    border: 1px solid #d9dbe9;
    border-radius: 10px;
    padding: 10px;
    font-size: 12px;
    color: #1a3c5e;
    resize: none;
    transition: border-color 0.3s ease;
}

.modal-body textarea:focus {
    border-color: rgb(40, 121, 176);
    outline: none;
}

.modal-body textarea::placeholder {
    color: #6e7191;
    font-size: 10px;
}

/* Sepete Ekle Butonu */
.cart {
    background: rgb(40, 121, 176);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.cart:hover {
    background: rgb(50, 141, 196);
    transform: scale(1.02);
}

.cart .material-icons-round {
    font-size: 20px;
}

#priceDisplay {
    font-size: 16px;
    font-weight: 600;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .modal-body {
        max-height: calc(90vh - 200px);
        padding-bottom: 80px;
        overflow-y: auto;
    }

    .extras-grid {
        display: flex !important;
        flex-direction: row;
        gap: 10px;
        padding: 8px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .extras-grid::-webkit-scrollbar {
        display: none;
    }

    .extra-card {
        flex: 0 0 140px;
        height: auto;
        min-height: 80px;
        padding: 10px;
        border: 1px solid rgb(12, 100, 52, 255);
        background: rgb(40, 121, 176, 0.19);
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .extra-name {
        font-size: 11px;
    }

    .extra-price {
        font-size: 11px;
    }

    .addons-grid {
        display: flex !important;
        flex-direction: row;
        gap: 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .addons-grid::-webkit-scrollbar {
        display: none;
    }

    .addon-card {
        flex: 0 0 140px;
    }
}

@media (max-width: 480px) {
    .modal-body {
        max-height: calc(90vh - 180px);
        padding-bottom: 70px;
    }

    .extras-grid {
        display: flex !important;
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .extras-grid::-webkit-scrollbar {
        display: none;
    }

    .extra-card {
        flex: 0 0 120px; 
        padding: 8px;
        min-height: 70px;
    }

    .extra-name {
        font-size: 10px;
    }

    .extra-price {
        font-size: 10px;
    }

    .addons-grid {
        display: flex !important;
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .addons-grid::-webkit-scrollbar {
        display: none;
    }

    .addon-card {
        flex: 0 0 120px;
    }

    .cart {
        width: calc(100% - 30px);
        margin: 15px;
    }
}

/* Post Cart Modal */

        /* Modal Stilleri */
        .cart-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            background: none;
            pointer-events: none;
        }

        .cart-modal-content {
            background: #fff;
            border-radius: 15px;
            padding: 30px;
            width: 90%;
            max-width: 450px;
            text-align: center;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            animation: slideIn 0.3s ease-out;
            position: relative;
            pointer-events: auto;
        }

        /* Animasyon */
        @keyframes slideIn {
            from {
                transform: translateY(-50px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .cart-modal-content h2 {
            color: #2c3e50;
            font-size: 24px;
            margin-bottom: 20px;
        }

        .cart-product-list {
            max-height: 200px;
            overflow-y: auto;
            margin-bottom: 25px;
            padding: 10px;
            background: #f9f9f9;
            border-radius: 10px;
        }

        .cart-product-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 0;
            border-bottom: 1px solid #ececec;
            transition: background 0.2s ease;
        }

        .cart-product-item:last-child {
            border-bottom: none;
        }

        .cart-product-item:hover {
            background: #f1f1f1;
        }

        .cart-product-image {
            width: 50px;
            height: 50px;
            object-fit: cover;
            border-radius: 8px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        .cart-product-details {
            flex: 1;
            text-align: left;
        }

        .cart-product-name {
            font-size: 16px;
            font-weight: bold;
            color: #2c3e50;
        }

        .cart-product-price {
            font-size: 14px;
            color: #e74c3c;
            font-weight: bold;
        }

        .cart-modal-buttons {
            display: flex;
            gap: 15px;
            justify-content: center;
        }

        .cart-modal-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 15px 17px;
            border: none;
            border-radius: 25px;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .cart-modal-btn .material-icons-round {
            font-size: 20px;
        }

        .cart-btn-primary {
            background: rgb(40, 121, 176);
            color: #fff;
        }

        .cart-btn-primary:hover {
            background: #2980b9;
            transform: translateY(-2px);
        }

        .cart-btn-secondary {
            background: #ecf0f1;
            color: #2c3e50;
        }

        .cart-btn-secondary:hover {
            background: #dfe6e9;
            transform: translateY(-2px);
        }

        .cart-close-btn {
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 26px;
        color: var(--swal2-deny-button-background-color);
        cursor: pointer;
        transition: color 0.3s ease;
        }

        .cart-close-btn:hover {
            color: #2c3e50;
        }

        /* Mobile Compatibility */
        @media (max-width: 500px) {
            .cart-modal-content {
                padding: 20px;
                width: 95%;
            }

            .cart-modal-content h2 {
                font-size: 20px;
            }

            .cart-product-list {
                max-height: 150px;
            }

            .cart-product-image {
                width: 40px;
                height: 40px;
            }

            .cart-product-name {
                font-size: 14px;
            }

            .cart-product-price {
                font-size: 12px;
            }

            .cart-modal-btn {
                padding: 10px 15px;
                font-size: 14px;
            }

            .cart-modal-btn .material-icons-round {
                font-size: 18px;
            }
        }

        /* Scroll bar style */
        .cart-product-list::-webkit-scrollbar {
            width: 8px;
        }

        .cart-product-list::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }

        .cart-product-list::-webkit-scrollbar-thumb {
            background: #3498db;
            border-radius: 10px;
        }

        .cart-product-list::-webkit-scrollbar-thumb:hover {
            background: #2980b9;
        }