.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    background-color: white;
    border-radius: 32px;
    padding: 20px;
    transform: translateY(100%);
    animation: slideUpModal 0.3s forwards;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    color: #333;
}

.close-button {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 8px;
}

.modal-body {
    padding: 0;
}

.modal-body > span {
    display: block;
    margin-bottom: 12px;
    font-size: 16px;
    color: #333;
}

.quantity-section {
    background-color: var(--white-color);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 24px;
}

.quantity-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 16px;
}

.quantity-button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#quantityDisplay {
    color: white;
    font-size: 20px;
    font-weight: 500;
}

.special-instructions {
    margin-bottom: 24px;
}

.special-instructions span {
    display: block;
    margin-bottom: 12px;
    font-size: 16px;
    color: #333;
}

.special-instructions textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    background-color: #F9F9F9;
    font-size: 14px;
    resize: none;
    min-height: 100px;
}

.special-instructions textarea::placeholder {
    color: #999;
}

.price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 16px;
}

#modalTotalPrice {
    font-weight: bold;
    font-size: 18px;
}

.add-cart-button {
    width: 100%;
    padding: 16px;
    background: #8B1D1D;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
}

@keyframes slideUpModal {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    color: #333;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
}

.toast.success {
    background-color: #4CAF50;
    color: white;
}

.toast.error {
    background-color: #F44336;
    color: white;
}

/* Media Queries */
@media (max-width: 375px) {
    .modal-header h2 {
        font-size: 18px;
    }

    .quantity-button {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    #quantityDisplay {
        font-size: 18px;
    }

    .modal-footer {
        padding: 16px;
    }

    .cancel-button,
    .add-cart-button {
        padding: 14px;
        font-size: 15px;
    }
}

/* Addons Section Styles */
#addonsSection {
    margin: 16px 0;
}

.addon-category {
    margin-bottom: 16px;
}

.addon-category label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.addon-category .required {
    color: #e53e3e;
    margin-left: 4px;
}

.addon-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.addon-item {
    position: relative;
    width: 100%;
}

.addon-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: #f9fafb;
}

.addon-label:hover {
    background: #f3f4f6;
}

/* Hide default radio and checkbox */
.addon-label input[type="radio"],
.addon-label input[type="checkbox"] {
    display: none;
}

.addon-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-right: 32px;
}

/* Left side content */
.addon-name {
    font-size: 14px;
    color: #333;
}

/* Right side content */
.addon-price {
    font-size: 14px;
    color: #8B1D1D;
    font-weight: 500;
}

/* Custom tick mark */
.checkmark {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Show tick mark when selected */
.addon-label input:checked ~ .checkmark::after {
    content: '✓';
    color: #8B1D1D;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
}

/* Addon Select Dropdown Styles */
.addon-select {
    width: 100%;
    padding: 16px;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    background-color: #F9F9F9;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 48px;
}

.addon-select:hover {
    background-color: #F3F4F6;
}

.addon-select:focus {
    outline: none;
    border-color: #8B1D1D;
    box-shadow: 0 0 0 2px rgba(139, 29, 29, 0.1);
}

.addon-select option {
    padding: 12px;
    font-size: 14px;
}

.spicy-level-control {
    display: flex;
    align-items: center;
    background: var(--white-color);
    border-radius: 12px;
    padding: 8px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin: 8px 0;
}

.spicy-level-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--white-color);
    color: var(--text-color);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.spicy-level-select:hover {
    border-color: var(--primary-color);
}

.spicy-level-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}

.spicy-level-select option {
    padding: 8px;
    font-size: 16px;
    background: var(--white-color);
    color: var(--text-color);
}

.validation-error {
    background-color: #FEE2E2;
    color: #991B1B;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    animation: slideIn 0.3s ease;
}

.validation-error svg {
    flex-shrink: 0;
    color: #DC2626;
}

.add-cart-button.error {
    background-color: #DC2626;
    animation: shake 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Mobile Modal Styles */
@media (max-width: 375px) {
    .modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }
    
    .modal-content {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 414px;
        margin: 0 auto;
        background-color: white;
        border-radius: 32px;
        padding: 20px;
        transform: translateY(100%);
        animation: slideUpModal 0.3s forwards;
    }
}

/* PC Modal Styles */
@media (min-width: 1024px) {
    .modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }
    
    .modal-content {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin-bottom: 50px;
        background-color: white;
        border-radius: 32px;
        padding: 20px;
        transform: translateY(100%);
        animation: slideUpModal 0.3s forwards;
    }
}