/* Entrance Pop-up Styles Refined for Luxury Experience - Dynamic Version */
:root {
    --popup-bg: var(--dynamic-popup-bg, #111111);
    --popup-title-color: var(--dynamic-popup-title-color, #c9a96e);
    --popup-subtitle-color: var(--dynamic-popup-subtitle-color, rgba(255, 255, 255, 0.7));
    --popup-btn-bg: var(--dynamic-popup-btn-bg, #c9a96e);
    --popup-btn-text: var(--dynamic-popup-btn-text, #000000);
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    backdrop-filter: blur(8px);
}

.popup-container {
    background: var(--popup-bg);
    max-width: 900px;
    width: 95%;
    display: flex;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    animation: popupFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.popup-image-side {
    flex: 1.2;
    background-image: var(--dynamic-popup-image, url('../img/popup-jewelry.jpg'));
    background-color: #2c2c2c;
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 500px;
}

/* Fallback elegant gradient if image is missing */
.popup-image-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(20, 20, 20, 0.4), rgba(201, 169, 110, 0.1));
}

.popup-content-side {
    flex: 1;
    padding: 4rem 3rem;
    color: var(--popup-subtitle-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--popup-bg);
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--popup-subtitle-color);
    opacity: 0.5;
    transition: all 0.3s;
    z-index: 10;
}

.popup-close:hover {
    color: var(--popup-title-color);
    opacity: 1;
    transform: rotate(90deg);
}

.popup-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    text-align: left;
    letter-spacing: 1px;
    line-height: 1.2;
    color: var(--popup-title-color);
}

.popup-subtitle {
    text-align: left;
    color: var(--popup-subtitle-color);
    margin-bottom: 2.5rem;
    font-size: 1rem;
    line-height: 1.6;
}

.popup-form .form-group {
    margin-bottom: 1.5rem;
}

.popup-form input {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-family: inherit;
    color: #fff;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.popup-form input:focus {
    outline: none;
    border-bottom-color: var(--popup-title-color);
}

.popup-form input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.popup-form .checkbox-group {
    margin-bottom: 2rem;
}

.popup-form .checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    font-size: 0.75rem;
    color: var(--popup-subtitle-color);
    opacity: 0.7;
    line-height: 1.5;
}

.popup-form .checkbox-item a {
    color: var(--popup-title-color);
    text-decoration: none;
}

.popup-form .checkbox-item input {
    width: auto;
    margin-top: 2px;
}

.popup-btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--popup-btn-bg);
    color: var(--popup-btn-text);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.4s;
}

.popup-btn:hover {
    background: #fff;
    color: #000;
    letter-spacing: 4px;
}

/* Responsive Scaling */
@media (max-width: 850px) {
    .popup-container {
        flex-direction: column;
        max-width: 450px;
        width: 90%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .popup-image-side {
        min-height: 200px;
    }

    .popup-content-side {
        padding: 2.5rem 2rem;
    }

    .popup-title {
        font-size: 1.83rem;
        margin-bottom: 1rem;
    }

    .popup-subtitle {
        font-size: 0.9rem;
        margin-bottom: 2rem;
    }

    .popup-close {
        top: 1rem;
        right: 1rem;
        opacity: 0.8;
    }
}

@media (max-width: 480px) {
    .popup-image-side {
        display: none;
        /* Hide image to save space on very small screens */
    }

    .popup-content-side {
        padding: 3.5rem 2rem;
    }

    .popup-container {
        border: 1px solid var(--popup-title-color);
    }
}