/* === POPUPS / MODALS === */
.modal{position:fixed;inset:0;z-index:10001;display:none;align-items:center;justify-content:center;padding:var(--space-lg)}
.modal.active{display:flex}
.modal-overlay{position:absolute;inset:0;background:rgba(0,0,0,0.6);cursor:pointer}
.modal-content{position:relative;background:#fff;border-radius:var(--radius-xl);width:100%;max-width:500px;max-height:90vh;overflow-y:auto;box-shadow:var(--shadow-xl);animation:modalIn 0.3s ease}
@keyframes modalIn{from{opacity:0;transform:scale(0.95) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}
.modal-close{position:absolute;top:var(--space-md);right:var(--space-md);width:36px;height:36px;border-radius:var(--radius-full);background:var(--color-bg-alt);color:var(--color-text);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all var(--transition-fast);z-index:5}
.modal-close:hover{background:var(--color-red);color:#fff}
.modal-close svg{width:18px;height:18px}
.modal-header{padding:var(--space-xl) var(--space-xl) var(--space-md);text-align:center}
.modal-header h3{font-size:var(--text-xl);margin-bottom:var(--space-xs)}
.modal-header p{color:var(--color-text-muted);font-size:var(--text-sm)}
.modal-body{padding:0 var(--space-xl) var(--space-xl)}
.modal-body .form-group{margin-bottom:var(--space-md)}
.modal-body .btn{width:100%}

/* Consultation Modal */
.modal-consultation .modal-header{background:var(--color-primary);color:#fff;border-radius:var(--radius-xl) var(--radius-xl) 0 0;padding:var(--space-xl)}
.modal-consultation .modal-header h3{color:#fff}
.modal-consultation .modal-header p{color:rgba(255,255,255,0.8)}
.modal-consultation .modal-close{background:rgba(255,255,255,0.3);color:#fff}

/* Want Cheaper Modal */
.modal-cheaper .modal-content{max-width:450px}
.modal-cheaper .price-tag{font-size:var(--text-3xl);font-weight:700;color:var(--color-primary);text-align:center;margin-bottom:var(--space-lg)}

/* Cookie Consent */
.cookie-consent{position:fixed;bottom:0;left:0;right:0;background:var(--color-black);color:#fff;padding:var(--space-md) var(--space-xl);z-index:var(--z-fixed);display:none;align-items:center;justify-content:space-between;gap:var(--space-lg);box-shadow:0 -4px 12px rgba(0,0,0,0.2)}
.cookie-consent.active{display:flex}
.cookie-consent p{font-size:var(--text-sm);line-height:1.5;flex:1}
.cookie-consent a{color:var(--color-accent);text-decoration:underline}
.cookie-consent-actions{display:flex;gap:var(--space-sm);flex-shrink:0}

/* Added to cart notification */
.cart-notification{position:fixed;top:20px;right:var(--space-xl);background:#fff;border-radius:var(--radius-lg);box-shadow:var(--shadow-xl);padding:var(--space-lg);z-index:10000;max-width:360px;display:none;animation:slideInRight 0.3s ease;border-left:4px solid var(--color-green)}
.cart-notification.active{display:block}
@keyframes slideInRight{from{opacity:0;transform:translateX(100px)}to{opacity:1;transform:translateX(0)}}
.cart-notification-header{display:flex;align-items:center;gap:var(--space-sm);margin-bottom:var(--space-md);color:var(--color-green);font-weight:600}
.cart-notification-header svg{width:20px;height:20px}
.cart-notification-product{display:flex;gap:var(--space-md);margin-bottom:var(--space-md)}
.cart-notification-product img{width:60px;height:60px;object-fit:contain;border-radius:var(--radius-sm);background:var(--color-bg-alt)}
.cart-notification-product .name{font-size:var(--text-sm);font-weight:500}
.cart-notification-product .price{font-weight:700;color:var(--color-primary);margin-top:4px}
.cart-notification-actions{display:flex;gap:var(--space-sm)}
.cart-notification-actions .btn{flex:1;font-size:var(--text-sm);padding:8px}

/* Scroll to top */
.scroll-top{position:fixed;bottom:var(--space-xl);right:var(--space-xl);width:48px;height:48px;background:var(--color-primary);color:#fff;border-radius:var(--radius-full);display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:var(--z-fixed);opacity:0;visibility:hidden;transition:all var(--transition-base);box-shadow:var(--shadow-md)}
.scroll-top.visible{opacity:1;visibility:visible}
.scroll-top:hover{background:var(--color-primary-hover);transform:translateY(-2px)}
.scroll-top svg{width:20px;height:20px}

@media(max-width:768px){
    .cookie-consent{flex-direction:column;text-align:center;padding:var(--space-lg)}
    /* Modal: slide-up from bottom on mobile, always above header */
    .modal{padding:0;align-items:flex-end}
    .modal-content{margin:0;max-height:92vh;border-radius:var(--radius-xl) var(--radius-xl) 0 0;animation:modalSlideUp 0.3s ease}
    @keyframes modalSlideUp{from{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}
    /* Close button always visible with high contrast */
    .modal-close{top:12px;right:12px;width:32px;height:32px;z-index:20;background:rgba(0,0,0,0.15)}
    .modal-consultation .modal-close{background:rgba(255,255,255,0.3)}
}
