.cart-overlay,
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-overlay.active,
.modal-overlay.active {
    display: block;
    opacity: 1;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: var(--card-bg);
    border-left: 2px solid var(--border);
    z-index: 10001;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.cart-drawer.active,
.cart-drawer.open {
    transform: translateX(0);
}

@media (max-width: 991px) {
    .cart-drawer {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 360px !important;
        height: 100vh !important;
        z-index: 1000 !important;
        transform: translateX(100%) !important;
        transition: transform 0.3s ease-in-out !important;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5) !important;
    }

    .cart-drawer.active,
    .cart-drawer.open {
        transform: translateX(0) !important;
    }
}

@media (min-width: 992px) {
    .cart-drawer {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        width: 380px !important;
        height: 100vh !important;
        z-index: 1000 !important;
        background: #12151c !important;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6) !important;
        transform: translateX(100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .cart-drawer.active,
    .cart-drawer.open {
        transform: translateX(0) !important;
    }
}

.cart-header {
    padding: 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 1.4rem;
    font-weight: 900;
}

.close-cart {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

.cart-body {
    padding: 25px;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.empty-cart-msg {
    text-align: center;
    color: var(--text-muted);
    margin: auto 0;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-color);
    padding: 15px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.cart-item-info h4 {
    font-size: 0.9rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.cart-item-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cart-item-info span {
    color: var(--accent);
    font-weight: 800;
    font-size: 0.88rem;
}

.cart-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-btn-qty {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-footer {
    padding: 25px;
    border-top: 1px solid var(--border);
    background: var(--bg-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.cart-total-price {
    color: var(--accent);
    font-size: 1.5rem;
}

/* CHECKOUT MODAL FORM */
.modal-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 520px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 28px;
    padding: 35px;
    z-index: 10002;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9);
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-box.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 900;
}

.order-form-block {
    padding: 20px;
    background: var(--bg-color);
    border-radius: 16px;
    margin: 20px 0;
}

.order-form-block h3 {
    margin-bottom: 15px;
    color: var(--accent);
    font-size: 1.2rem;
}

.order-form-grid {
    display: grid;
    gap: 15px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.form-input,
.form-select {
    width: 100%;
    background: var(--bg-color);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 16px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    outline: none;
    transition: 0.2s;
    font-family: 'Montserrat', sans-serif;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--accent);
}

.radio-group {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
}

.radio-label input {
    accent-color: var(--accent);
}

.form-textarea {
    resize: vertical;
    min-height: 60px;
}

.form-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

/* NOTIFICATION MODAL */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    z-index: 20000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}

.notification-overlay.active {
    display: flex;
    opacity: 1;
}

.notification-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 28px;
    padding: 40px 30px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.notification-overlay.active .notification-card {
    transform: scale(1);
}

.notification-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
}

.notification-icon.success {
    background: rgba(255, 82, 0, 0.15);
    color: var(--accent);
}

.notification-icon.error {
    background: rgba(255, 60, 60, 0.15);
    color: #ff3c3c;
}

.notification-title {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    color: var(--text-main);
}

.notification-message {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

.notification-btn {
    background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 100%);
    color: #fff;
    border: 1px solid #ff8833;
    padding: 14px 40px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 6px 0 #b33a00, 0 12px 20px rgba(255, 82, 0, 0.4);
    transition: all 0.15s ease;
    font-family: 'Montserrat', sans-serif;
}

.notification-btn:hover {
    background: linear-gradient(180deg, #ff8822 0%, #ff6600 100%);
    box-shadow: 0 8px 0 #b33a00, 0 15px 25px rgba(255, 82, 0, 0.5);
}

.notification-btn:active {
    top: 4px;
    box-shadow: 0 2px 0 #b33a00, 0 5px 10px rgba(255, 82, 0, 0.3);
}

/* FLYING ANIMATION PARTICLE */
.flying-particle {
    position: fixed;
    width: 28px;
    height: 28px;
    background: var(--accent);
    border: 2px solid #fff;
    border-radius: 50%;
    z-index: 99999;
    pointer-events: none;
    box-shadow: 0 0 15px var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: transform 0.8s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.8s ease;
}

@media (max-width: 768px) {
    .cart-drawer {
        max-width: 100%;
    }

    .modal-box {
        width: 95%;
        padding: 25px 20px;
    }

    .notification-card {
        padding: 30px 20px;
    }
}
