/* Custom Popup - tienda */
.custom-popup-overlay {
    --cpop-bg: #ffffff;
    --cpop-txt: #333333;
    --cpop-btn: #000000;
    --cpop-overlay: #000000;
    --cpop-width: 500px;
    --cpop-font: 16px;
    --cpop-radius: 12px;

    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.6);
    background-color: color-mix(in srgb, var(--cpop-overlay) 60%, transparent);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-popup-overlay[hidden] {
    display: none;
}

.custom-popup-overlay.is-visible {
    opacity: 1;
}

html.custom-popup-open,
html.custom-popup-open body {
    overflow: hidden;
}

.custom-popup-modal {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: var(--cpop-width);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 40px;
    background-color: var(--cpop-bg);
    color: var(--cpop-txt);
    border-radius: var(--cpop-radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    font-size: var(--cpop-font);
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-popup-overlay.is-visible .custom-popup-modal {
    transform: scale(1);
}

.custom-popup-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: none;
    color: var(--cpop-btn);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 10;
}

.custom-popup-close:hover {
    transform: scale(1.1);
}

.custom-popup-close:focus-visible {
    outline: 2px solid var(--cpop-btn);
    outline-offset: 2px;
}

.custom-popup-logo img,
.custom-popup-extra-img img {
    display: inline-block;
    max-width: 100%;
    height: auto;
}

.custom-popup-logo img {
    max-width: 150px;
}

.custom-popup-modal .mb-element {
    margin: 0 0 20px;
}

.custom-popup-modal .mb-element:last-child {
    margin-bottom: 0;
}

.custom-popup-modal .custom-popup-title {
    font-size: 1.5em;
    font-weight: 700;
    line-height: 1.2;
    color: inherit;
}

.custom-popup-modal .custom-popup-subtitle {
    font-size: 1.1em;
    font-weight: 400;
    line-height: 1.4;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: inherit;
}

.custom-popup-content {
    line-height: 1.6;
}

.custom-popup-content img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 600px) {
    .custom-popup-modal {
        padding: 44px 20px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .custom-popup-overlay,
    .custom-popup-modal {
        transition: none;
    }
}
