/* =====================================================================
   Perfuma Gift Wrap — gift-wrap.css
   Matches Perfuma.lk dark/gold aesthetic
   ===================================================================== */

/* ── Wrap Me button ─────────────────────────────────────────────────── */
.pgw-btn-wrap {
    margin-bottom: 10px;
}

.pgw-open-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    font-family: inherit;
    line-height: 1;
}

.pgw-open-btn:hover {
    background: #f7f5f0;
    border-color: #555;
}

.pgw-open-btn.pgw-active {
    border-color: #c8a46e;
    color: #c8a46e;
    background: #fffcf5;
}

.pgw-open-btn .pgw-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.pgw-open-btn .pgw-check-mark {
    display: none;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.pgw-open-btn.pgw-active .pgw-icon {
    display: none;
}

.pgw-open-btn.pgw-active .pgw-check-mark {
    display: inline-block;
}

/* ── Overlay ─────────────────────────────────────────────────────────── */
.pgw-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.pgw-overlay.pgw-open {
    display: flex;
}

body.pgw-no-scroll {
    overflow: hidden;
}

/* ── Modal panel ─────────────────────────────────────────────────────── */
.pgw-modal {
    background: #fff;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 3px;
    padding: 32px 28px 28px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    box-sizing: border-box;
    animation: pgwSlideUp 0.25s ease;
}

@keyframes pgwSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ── Close button ────────────────────────────────────────────────────── */
.pgw-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #1a1a1a;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.pgw-close:hover { background: #444; }

.pgw-close svg {
    width: 14px;
    height: 14px;
    stroke: #fff;
    display: block;
}

/* ── Heading ─────────────────────────────────────────────────────────── */
.pgw-heading {
    font-size: 18px !important;
    font-weight: 700 !important;
    letter-spacing: 3px !important;
    text-transform: uppercase !important;
    margin: 0 0 20px !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    color: #1a1a1a !important;
    border: none !important;
}

/* ── Product row ─────────────────────────────────────────────────────── */
.pgw-product-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid #ebebeb;
}

.pgw-product-thumb {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
    border: 1px solid #f0f0f0;
}

.pgw-product-meta {
    flex: 1;
    min-width: 0;
}

.pgw-product-name {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #1a1a1a;
    display: block;
    line-height: 1.4;
}

/* ── Sections ────────────────────────────────────────────────────────── */
.pgw-section {
    margin-bottom: 20px;
}

.pgw-section-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 0 4px !important;
    padding: 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.pgw-section-sub {
    font-size: 11px !important;
    color: #b8860b !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    font-style: italic;
}

/* ── Option rows ─────────────────────────────────────────────────────── */
.pgw-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 3px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
    box-sizing: border-box;
}

.pgw-option:last-child { margin-bottom: 0; }

.pgw-option:hover {
    border-color: #bbb;
}

.pgw-option.pgw-selected {
    border-color: #c8a46e;
    background: #fffdf6;
}

/* Hide native inputs visually */
.pgw-option input.pgw-check,
.pgw-option input.pgw-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    pointer-events: none;
}

/* Custom radio/checkbox indicator */
.pgw-opt-indicator {
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pgw-radio-indicator {
    border-radius: 50%;
}

.pgw-check-indicator {
    border-radius: 2px;
}

.pgw-option.pgw-selected .pgw-opt-indicator {
    border-color: #c8a46e;
    background: #c8a46e;
}

/* Checkmark inside indicator */
.pgw-option.pgw-selected .pgw-opt-indicator::after {
    content: '';
    display: block;
}

.pgw-option.pgw-selected .pgw-radio-indicator::after {
    width: 7px;
    height: 7px;
    background: #fff;
    border-radius: 50%;
}

.pgw-option.pgw-selected .pgw-check-indicator::after {
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
}

/* Option icon */
.pgw-opt-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pgw-option.pgw-selected .pgw-opt-icon {
    color: #c8a46e;
}

.pgw-opt-icon svg {
    width: 22px;
    height: 22px;
}

/* Option label */
.pgw-opt-label {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.3;
}

/* Option price */
.pgw-opt-price {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    flex-shrink: 0;
}

.pgw-free {
    color: #888;
    font-weight: 500;
}

/* ── Save button ─────────────────────────────────────────────────────── */
.pgw-save-btn {
    width: 100%;
    padding: 13px 20px;
    margin-top: 22px;
    background: #c8a46e;
    color: #fff;
    border: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    border-radius: 2px;
}

.pgw-save-btn:hover {
    background: #b8935c;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .pgw-modal {
        padding: 24px 18px 20px;
        max-height: 95vh;
    }

    .pgw-heading {
        font-size: 15px !important;
    }

    .pgw-opt-label {
        font-size: 12px;
    }
}
