@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* 1. Base Panel & Reset */
.wpcp-panel * { box-sizing: border-box !important; }

.wpcp-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(2px);
    z-index: 999998; opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.wpcp-overlay.is-open { opacity: 1; visibility: visible; }

.wpcp-panel {
    position: fixed; background: #ffffff; z-index: 999999;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    display: flex; flex-direction: column;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    font-family: inherit;
}

@media (min-width: 769px) {
    .wpcp-panel { top: 0; right: -480px; width: 450px; height: 100vh; }
    .wpcp-panel.is-open { right: 0; }
    .wpcp-ribbon-text::before { content: "Click "; } 
}
@media (max-width: 768px) {
    .wpcp-panel { bottom: -100%; left: 0; width: 100%; height: 86vh; height: 86dvh; border-radius: 16px 16px 0 0; }
    .wpcp-panel.is-open { bottom: 0; }
    .wpcp-ribbon-text::before { content: "Tap "; } 
}

/* Fallback CSS empty cart hiding mechanism */
.wpcp-panel:has(.woocommerce-mini-cart__empty-message) .wpcp-golden-ribbon {
    display: none !important;
}

/* Header & Content */
.wpcp-header { display: flex; align-items: center; padding: 20px; border-bottom: 1px solid #eaeaea; gap: 15px; }

/* Fixed Premium Close Button */
#wpcp-panel .wpcp-close,
#wpcp-modal-wrap .wpcp-modal-close {
    background: rgba(240, 240, 245, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
    border-radius: 50% !important;
    width: 42px !important; 
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: #111 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    padding: 0 !important; margin: 0 !important; outline: none !important;
}

#wpcp-modal-wrap .wpcp-modal-close {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 100 !important;
}

#wpcp-panel .wpcp-close:hover,
#wpcp-modal-wrap .wpcp-modal-close:hover {
    transform: scale(1.08) !important;
    background: rgba(255, 255, 255, 1) !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12) !important;
}
#wpcp-panel .wpcp-close svg,
#wpcp-modal-wrap .wpcp-modal-close svg {
    width: 22px !important; 
    height: 22px !important; 
    stroke: #111 !important;
}

.wpcp-header h3 { margin: 0; font-size: 18px; font-weight: 500; color: #111; line-height: 1; }
.wpcp-promo-banner { margin: 15px 20px; padding: 12px; background: #f6fbf7; border: 1px solid #b7e4c7; border-radius: 4px; color: #10b981; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; line-height: 1; }
.wpcp-content { flex-grow: 1; overflow-y: auto; overflow-x: hidden; padding-bottom: 200px; }
.wpcp-panel .woocommerce-mini-cart { margin: 0; padding: 0; }
.wpcp-panel ul.cart_list li { position: relative; padding: 25px 25px 25px 105px !important; border-bottom: 1px solid #f0f0f0; min-height: 120px; list-style: none; display: block; margin: 0 !important; }
.wpcp-panel ul.cart_list li > a:not(.remove) { display: block; padding-right: 30px; margin-bottom: 15px; font-size: 14px; font-weight: 600; color: #111; text-decoration: none; text-transform: uppercase; line-height: 1.3; }
.wpcp-panel ul.cart_list li img { position: absolute; left: 25px; top: 25px; width: 65px; height: auto; object-fit: contain; box-shadow: none !important; margin: 0 !important; border: none !important; }
.wpcp-panel .remove { position: absolute; top: 22px; right: 20px; font-size: 22px; color: #111 !important; text-decoration: none; background: transparent !important; font-weight: 300; line-height: 1; }

.wpcp-panel .wpcp-qty-wrapper { display: flex; justify-content: space-between; align-items: center; }
.wpcp-panel .wpcp-price { font-weight: 600; font-size: 17px; color: #000; }
.wpcp-panel .wpcp-qty-controls { display: flex; align-items: center; border: 1px solid #e2e2e2; border-radius: 6px; background: #fff; height: 34px; transition: opacity 0.2s; }
.wpcp-panel .wpcp-qty-controls.is-loading { opacity: 0.5; pointer-events: none; }
.wpcp-panel .wpcp-qty-btn { background: transparent; border: none; color: #333; font-size: 18px; width: 32px; height: 100%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; padding: 0; outline: none; }
.wpcp-panel .wpcp-qty-input { width: 32px; text-align: center; border: none; padding: 0; font-size: 14px; font-weight: 500; color: #111; pointer-events: none; background: transparent; -moz-appearance: textfield; outline: none; }

/* Golden Ribbon Animation */
@keyframes sheen { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
.wpcp-golden-ribbon {
    position: absolute; bottom: 155px; left: 0; width: 100%; height: 30px; z-index: 10;
    background: linear-gradient(135deg, #bc8b5a 20%, #e2c88f 40%, #ffffff 50%, #e2c88f 60%, #bc8b5a 80%);
    background-size: 200% auto; animation: sheen 4s infinite linear;
    display: flex; justify-content: center; align-items: center; cursor: pointer;
    border-top: 1px solid #9c7145; box-shadow: 0 -2px 10px rgba(188,139,90,0.3);
}
.wpcp-ribbon-text { font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.4); text-transform: uppercase; letter-spacing: 0.5px; }

/* Locked Footer Area */
.wpcp-panel .woocommerce-mini-cart__total { position: absolute; bottom: 60px; left: 0; width: 38%; height: 95px; margin: 0 !important; padding: 0 0 0 25px !important; background: #fff; display: flex; flex-direction: column; justify-content: center; border-top: 1px solid #eaeaea; z-index: 10; }
.wpcp-panel .woocommerce-mini-cart__buttons { position: absolute; bottom: 60px; right: 0; width: 62%; height: 95px; margin: 0 !important; padding: 0 25px 0 15px !important; background: #fff; border-top: 1px solid #eaeaea; z-index: 10; display: flex; align-items: center; }
.wpcp-panel .woocommerce-mini-cart__total strong { visibility: hidden; display: block; line-height: 0; margin-bottom: 18px; }
.wpcp-panel .woocommerce-mini-cart__total strong::before { content: "TOTAL"; visibility: visible; font-size: 12px; color: #888; text-transform: uppercase; font-weight: 500; letter-spacing: 0.5px; display: block; line-height: 1; }
.wpcp-panel .woocommerce-mini-cart__total .amount { font-size: 24px; font-weight: 700; color: #000; line-height: 1; }
.wpcp-panel .woocommerce-mini-cart__buttons .button:not(.checkout) { display: none !important; }
.wpcp-panel .woocommerce-mini-cart__buttons .checkout { display: flex; justify-content: center; align-items: center; width: 100%; height: 50px; background: #000; color: #fff; border-radius: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; text-decoration: none; font-size: 14px; margin: 0 !important; }

/* Trust Badges */
.wpcp-trust-badges { display: flex; justify-content: center; align-items: center; gap: 15px; background: #fff; position: absolute; bottom: 0; left: 0; width: 100%; height: 60px; z-index: 10; border-top: 1px solid #f9f9f9; }
.wpcp-trust-badges .badge { display: flex; align-items: center; gap: 8px; color: #666; font-size: 10px; line-height: 1.2; font-weight: 500; }
.wpcp-trust-badges .badge svg { color: #888; display: block; }
.wpcp-trust-badges .badge-separator { color: #ccc; font-size: 12px; line-height: 1; }

.woocommerce-message, .woocommerce-error, .woocommerce-info, .woocommerce-store-notice { display: none !important; }

/* =========================================
   Apple UI Glassmorphism Modal 
   ========================================= */
@keyframes lightLoop { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.wpcp-modal-wrap { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; display: flex; justify-content: center; align-items: center; background: rgba(0,0,0,0.3); z-index: 9999999; opacity: 0; visibility: hidden; transition: 0.3s; padding: 20px; }
.wpcp-modal-wrap.is-open { opacity: 1; visibility: visible; }

.wpcp-modal-box {
    position: relative; width: 100%; max-width: 360px; border-radius: 24px; padding: 40px 30px;
    background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5); box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    font-family: 'Montserrat', sans-serif; text-align: center; overflow: hidden;
}

.wpcp-modal-glow { position: absolute; top: -50px; left: -50px; width: calc(100% + 100px); height: calc(100% + 100px); background: radial-gradient(circle at top left, rgba(188,139,90,0.2) 0%, transparent 50%), radial-gradient(circle at bottom right, rgba(130,190,255,0.1) 0%, transparent 50%); z-index: -1; background-size: 200% 200%; animation: lightLoop 8s ease infinite; }

.wpcp-step { display: none; animation: fadeIn 0.4s ease; }
.wpcp-step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.wpcp-modal-box h4 { font-size: 20px; color: #111; font-weight: 700; margin: 0 0 10px; }
.wpcp-modal-box p { font-size: 13px; color: #666; margin: 0 0 25px; line-height: 1.4; }

.wpcp-input-group { display: flex; align-items: center; border: 1px solid rgba(188,139,90,0.4); border-radius: 12px; background: #fff; margin-bottom: 20px; overflow: hidden; }
.wpcp-input-group .prefix { padding: 12px; font-weight: 600; color: #bc8b5a; background: rgba(188,139,90,0.1); }
.wpcp-modal-box input { width: 100%; border: none; padding: 12px 15px; font-size: 15px; outline: none; background: transparent; font-family: 'Montserrat'; }
.wpcp-modal-box input:focus { background: rgba(255,255,255,0.9); }
#wpcp-ig-input { border: 1px solid rgba(188,139,90,0.4); border-radius: 12px; margin-bottom: 20px; }

/* Enforcing Important styles for Buttons */
.wpcp-btn-luxury {
    width: 100% !important; padding: 14px !important; border: none !important; border-radius: 12px !important; font-size: 15px !important; font-weight: 600 !important;
    color: #fff !important; background: linear-gradient(135deg, #bc8b5a, #a67749) !important; cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(188,139,90,0.3) !important; transition: 0.2s !important; font-family: 'Montserrat' !important; display: block !important;
}
.wpcp-btn-luxury:hover { transform: translateY(-2px) !important; box-shadow: 0 6px 20px rgba(188,139,90,0.4) !important; }

/* Try Another Button Specific Style */
.wpcp-btn-luxury.secondary { background: #fff !important; color: #bc8b5a !important; border: 1px solid #bc8b5a !important; box-shadow: none !important; margin-bottom: 10px !important; }
.wpcp-btn-luxury.secondary:hover { color: #ffffff !important; background: #bc8b5a !important; border-color: #bc8b5a !important; }

/* Specific solid black background for the Checkout / Copy button */
#btn-checkout-now { background: #000 !important; border: none !important; box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;}

/* Spinner */
.wpcp-spinner { width: 40px; height: 40px; border: 4px solid rgba(188,139,90,0.2); border-top-color: #bc8b5a; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 20px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Coupon Display Flex Update */
.wpcp-coupon-code-box { 
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(188,139,90,0.1); border: 2px dashed #bc8b5a; 
    padding: 12px 20px; border-radius: 12px; font-size: 22px; 
    font-weight: 700; color: #bc8b5a; margin-bottom: 10px; letter-spacing: 2px; 
}

/* Force Coupon Code String to be uppercase */
.wpcp-the-code { text-transform: uppercase; }

.wpcp-copy-icon {
    cursor: pointer; transition: all 0.2s ease;
    background: #fff; padding: 4px; border-radius: 6px; box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.wpcp-copy-icon:hover { transform: scale(1.1); stroke: #111; }