/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Product Modal */
.product-modal {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.product-modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--white);
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.9);
    border: none;
    font-size: 1.6rem;
    color: var(--text-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background-color: var(--white);
    color: var(--text-dark);
}

.modal-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
    display: block;
}

.modal-body {
    padding: 24px;
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.modal-desc {
    color: var(--text-medium);
    font-size: 0.92rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 10px;
    font-weight: 600;
}

/* Selector Buttons (size / inclusion) */
.selector-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selector-btn {
    padding: 10px 16px;
    border: 2px solid #eee;
    border-radius: 10px;
    background-color: var(--white);
    color: var(--text-dark);
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 90px;
}

.selector-btn:hover {
    border-color: var(--primary-light);
}

.selector-btn.active {
    border-color: var(--primary-color);
    background-color: rgba(168, 138, 138, 0.08);
    color: var(--primary-color);
    font-weight: 600;
}

.selector-label {
    font-size: 0.85rem;
}

.selector-price {
    font-size: 0.8rem;
    color: var(--text-light);
}

.selector-btn.active .selector-price {
    color: var(--primary-color);
}

.modal-qty {
    margin-top: 4px;
}

/* Checkbox group for optional ingredients */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 14px;
    border: 2px solid #eee;
    border-radius: 10px;
    background-color: var(--white);
    transition: border-color 0.2s ease, background-color 0.2s ease;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.checkbox-label:hover {
    border-color: var(--primary-light);
}

.checkbox-input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    flex-shrink: 0;
    cursor: pointer;
}

.checkbox-text {
    user-select: none;
}

.modal-add-btn {
    width: 100%;
    padding: 14px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-family: 'Inter', sans-serif;
    margin-top: 8px;
}

.modal-add-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}
