/* Cart Modal Component */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cart-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.cart-modal__content {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    max-width: 480px;
    background: white;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.cart-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    color: white;
}

.cart-modal__title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-modal__close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
    transition: opacity 0.2s;
    padding: 8px;
}

.cart-modal__close:hover {
    opacity: 0.7;
}

.cart-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.cart-empty i {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 16px;
}

.cart-empty p {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 24px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.cart-item__image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item__details {
    flex: 1;
}

.cart-item__name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.cart-item__price {
    color: #D4AF37;
    font-weight: 700;
    font-size: 16px;
}

.cart-item__quantity {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.cart-item__quantity button {
    width: 28px;
    height: 28px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.cart-item__quantity button:hover {
    background: #f3f4f6;
    border-color: #D4AF37;
}

.cart-item__remove {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 8px;
    transition: opacity 0.2s;
}

.cart-item__remove:hover {
    opacity: 0.7;
}

.cart-modal__footer {
    border-top: 1px solid #e5e7eb;
    padding: 24px;
    background: #fafafa;
}

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

.cart-total span:last-child {
    color: #D4AF37;
}

.btn-checkout {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.btn-checkout .spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    animation: spin 0.75s linear infinite;
}

.btn-primary {
    padding: 12px 32px;
    background: #D4AF37;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #B8941F;
}

/* ============================================
   CINETPAY POPIN
   ============================================ */
.cinetpay-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    overflow-y: auto;
    box-sizing: border-box;
}

.cinetpay-modal.show {
    display: flex !important;
}

.cinetpay-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.cinetpay-modal__content {
    position: relative;
    width: min(520px, 95vw);
    max-height: 92vh;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
    overflow: hidden;
    z-index: 1;
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.25s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.92);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.cinetpay-modal__header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    gap: 16px;
}

.cinetpay-modal__header h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #0f172a;
}

.cinetpay-modal__close {
    border: none;
    background: rgba(15, 23, 42, 0.06);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cinetpay-modal__close:hover {
    background: rgba(15, 23, 42, 0.12);
}

.cinetpay-modal__body {
    position: relative;
    padding: 0;
    min-height: 520px;
    background: #f8fafc;
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: calc(92vh - 88px);
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 23, 42, 0.3) transparent;
}

.cinetpay-modal__body iframe {
    width: 100%;
    border: none;
    background: transparent;
    display: block;
    height: clamp(520px, calc(92vh - 88px), 720px);
}

.cinetpay-modal__body::-webkit-scrollbar {
    width: 8px;
}

.cinetpay-modal__body::-webkit-scrollbar-track {
    background: transparent;
}

.cinetpay-modal__body::-webkit-scrollbar-thumb {
    background-color: rgba(15, 23, 42, 0.25);
    border-radius: 12px;
}

.cinetpay-modal__loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    background: rgba(248, 250, 252, 0.96);
    color: #1e293b;
    font-weight: 500;
}

.cinetpay-modal__spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: #2563eb;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

    .cinetpay-modal {
        padding: 16px 12px;
        align-items: flex-start;
    }

    .cinetpay-modal__content {
        width: 100%;
        max-height: 96vh;
    }

    .cinetpay-modal__body {
        max-height: calc(96vh - 88px);
    }

    .cinetpay-modal__body iframe {
        height: clamp(480px, calc(96vh - 88px), 680px);
    }
}
