/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: #f5f5f5;
    -webkit-font-smoothing: antialiased;
}

/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: url("../img/desktop.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

/* Popup Container */
.popup-container {
    width: 100%;
    max-width: 524px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

/* Header */
.popup-header {
    background: #CD2280;
    padding: 24px;
    text-align: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.popup-header-text {
    color: white;
    font-size: 28px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    text-transform: capitalize;
    line-height: 24px;
}

/* Body */
.popup-body {
    background: white;
    padding: 32px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
}

.popup-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Heading */
.popup-heading {
    text-align: center;
    color: #333333;
    font-size: 28px;
    font-family: 'Roboto', sans-serif;
    font-weight: 900;
    text-transform: capitalize;
    line-height: 40px;
}

/* Products Section */
.popup-products {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 219px;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.popup-products::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

.popup-divider {
    height: 1px;
    background: #E4E4E4;
    flex-shrink: 0;
}

.popup-product-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 16px;
}

/* Checkbox */
.popup-checkbox-wrapper {
    display: flex;
    align-items: center;
}

.popup-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.popup-checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.popup-checkbox-custom {
    width: 16px;
    height: 16px;
    background: white;
    border: 1px solid #333333;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.popup-checkbox-custom.checked {
    background: #333333;
}

.popup-checkbox-custom.checked::after {
    content: '';
    background-image: url("../icons/check-white.svg");
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 10px;
    width: 10px;
}

/* Product Image */
.popup-product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Product Details */
.popup-product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.popup-product-name {
    color: #333333;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    line-height: 24px;
}

.popup-product-description {
    color: #828282;
    font-size: 12px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    line-height: 16px;
    width: 60%;
}

.popup-product-description p {
    margin: 0;
}

.popup-product-pricing {
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-product-price {
    color: #333333;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    line-height: 20px;
}

.popup-product-old-price {
    position: relative;
    color: #828282;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    line-height: 20px;
}

.popup-product-old-price::before {
    position: absolute;
    content: "";
    left: 0;
    top: 50%;
    right: 0;
    border-top: 1px solid #FF0000 !important;
    -webkit-transform:rotate(-10deg);
    -moz-transform:rotate(-10deg);
    -ms-transform:rotate(-10deg);
    -o-transform:rotate(-10deg);
    transform:rotate(-10deg);
}

/* CTA Section */
.popup-cta-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.popup-cta-button {
    width: 100%;
    max-width: 460px;
    padding: 18px 24px;
    background: #CD2280;
    border: none;
    border-radius: 6px;
    border-bottom: 2px solid #801550;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-cta-button:hover {
    background: #b01f71;
    transform: translateY(-1px);
}

.popup-cta-button:active {
    transform: translateY(0);
}

.popup-cta-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.popup-cta-text {
    color: white;
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 24px;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
}

.popup-cta-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-cta-icon svg {
    width: 100%;
    height: 100%;
    fill: white;
}

/* Loading Overlay */
.popup-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: grid;
    place-items: center;
    z-index: 10000;
}

.popup-spinner {
    width: 60px;
    height: 60px;
}

.popup-spin {
    width: 100%;
    height: 100%;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #CD2280;
    border-radius: 50%;
    animation: popup-spin 1s linear infinite;
}

@keyframes popup-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .popup-overlay {
        padding: 7px;
    }

    .popup-header {
        padding: 16px;
    }

    .popup-header-text {
        font-size: 24px;
    }

    .popup-body {
        padding: 16px;
        max-height: calc(100vh - 150px);
    }

    .popup-content {
        gap: 16px;
    }

    .popup-heading {
        font-size: 18px;
        line-height: 28px;
    }

    .popup-product-item {
        padding: 0 8px;
        gap: 12px;
    }

    .popup-product-name {
        font-size: 14px;
        line-height: 20px;
    }

    .popup-product-description {
        width: auto;
    }

    .popup-cta-section {
        margin-top: 8px;
    }

    .popup-cta-button {
        padding: 16px 20px;
    }
}

@media screen and (max-width: 992px) {

    .popup-overlay {
        background-image: url("../img/mobile.jpg");
    }
}