/* ============================================================
   Cart Already In Cart Popup – PrestaShop 8.1
   ============================================================ */

/* Blokada scrolla gdy popup otwarty */
.cap-body-lock {
    overflow: hidden;
}

/* Wrapper całości */
#cart-already-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

#cart-already-popup.cap-visible {
    display: flex;
    animation: capFadeIn 0.2s ease;
}

/* Przyciemnione tło */
.cap-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* Okno popup */
.cap-box {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 36px 32px;
    max-width: 420px;
    width: calc(100% - 32px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    text-align: center;
    animation: capSlideUp 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Przycisk X */
.cap-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: #999;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.cap-close:hover {
    color: #333;
    background: #f0f0f0;
}

/* Ikona koszyka */
.cap-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: #fff4e5;
    border-radius: 50%;
    color: #e67e22;
}
.cap-icon svg {
    width: 30px;
    height: 30px;
}

/* Tytuł */
.cap-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
    line-height: 1.3;
}

/* Treść */
.cap-message {
    font-size: 15px;
    color: #555;
    margin: 0 0 8px;
    line-height: 1.5;
}

/* Nazwa produktu */
.cap-product-name {
    font-size: 14px;
    color: #e67e22;
    font-weight: 600;
    margin-bottom: 24px;
    min-height: 20px;
}

/* Przyciski */
.cap-actions {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.cap-btn {
    display: block;
    width: 100%;
    padding: 13px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    border: none;
    text-align: center;
    line-height: 1.4;
}

.cap-btn--primary {
    background: #e67e22;
    color: #fff;
    box-shadow: 0 4px 14px rgba(230, 126, 34, 0.35);
}
.cap-btn--primary:hover {
    background: #cf6d17;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(230, 126, 34, 0.4);
    color: #fff;
    text-decoration: none;
}

.cap-btn--secondary {
    background: #f5f5f5;
    color: #444;
}
.cap-btn--secondary:hover {
    background: #eaeaea;
    transform: translateY(-1px);
}

/* Animacje */
@keyframes capFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes capSlideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Responsywność */
@media (max-width: 480px) {
    .cap-box {
        padding: 32px 20px 24px;
    }
    .cap-title {
        font-size: 18px;
    }
}
