/* ── PIP Modal — CasketMart theme ── */
.pip-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(34,30,24,.55);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    /* Critical: prevent closed overlay from blocking clicks on other popups */
    pointer-events: none;
    visibility: hidden;
}
.pip-overlay.pip-overlay--open {
    display: flex;
    pointer-events: auto;
    visibility: visible;
}

.pip-modal {
    background: #FAF6EE;
    border-radius: 18px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 64px rgba(34,30,24,.18);
}

.pip-modal__close {
    position: absolute;
    top: 16px; right: 16px;
    background: #fff;
    border: 1px solid #E7DECD;
    border-radius: 999px;
    width: 32px; height: 32px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #938777;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.pip-modal__close:hover { background: #E7DECD; }

.pip-modal__header {
    background: #08403F;
    border-radius: 18px 18px 0 0;
    padding: 32px 32px 24px;
    text-align: center;
}
.pip-modal__icon { color: #B8841C; margin-bottom: 12px; }
.pip-modal__title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 24px;
    font-weight: 500;
    color: #fff;
    margin: 0 0 8px;
}
.pip-modal__subtitle {
    font-size: 13px;
    color: rgba(255,255,255,.7);
    margin: 0;
    line-height: 1.5;
}

.pip-modal__body { padding: 28px 32px 32px; }

.pip-form-group { margin-bottom: 16px; }
.pip-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #221E18;
    margin-bottom: 6px;
    font-family: 'Hanken Grotesk', sans-serif;
}
.pip-required { color: #B8841C; margin-left: 2px; }

.pip-form-group input,
.pip-form-group textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #E7DECD;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: 'Hanken Grotesk', sans-serif;
    color: #221E18;
    background: #fff;
    transition: border-color .15s;
    outline: none;
}
.pip-form-group input:focus,
.pip-form-group textarea:focus {
    border-color: #08403F;
}
.pip-form-group textarea { resize: vertical; min-height: 100px; }

.pip-submit-btn {
    width: 100%;
    background: #B8841C;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Hanken Grotesk', sans-serif;
    cursor: pointer;
    margin-top: 8px;
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.pip-submit-btn:hover { background: #9a6d16; }

.pip-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}
.pip-alert--success { background: #E8F5E9; color: #2E7D32; }
.pip-alert--error   { background: #FFEBEE; color: #C62828; }

.pip-spin {
    animation: pip-spin 1s linear infinite;
}
@keyframes pip-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Trigger button on product page */
button.pip-trigger-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px 24px;
    border: none;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Hanken Grotesk', sans-serif;
    cursor: pointer;
    margin-top: 16px;
    transition: opacity .15s;
}
button.pip-trigger-btn:hover { opacity: .88; }