/* ─── SLEEK Cross-Sell Popup CSS ─────────────────────────────────────────── */

/* Hide WooCommerce's native Cart block cross-sells — our own one-click
   section (.sleek-xsell-cart-section) replaces it with variation support. */
.wp-block-woocommerce-cart-cross-sells-block { display: none !important; }

.sleek-xsell-modal { position: fixed; inset: 0; z-index: 100000; font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif; }
.sleek-xsell-modal[hidden] { display: none; }

.sleek-xsell-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.65); }

.sleek-xsell-modal-panel {
    position: relative;
    max-width: 480px;
    width: calc(100% - 24px);
    margin: 4vh auto 0;
    max-height: 92vh;
    overflow-y: auto;
    background: #111;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.sleek-xsell-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255,255,255,.08);
    color: #fff;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.sleek-xsell-modal-close:hover { background: rgba(255,255,255,.16); }

.sleek-xsell-modal-title {
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 18px;
    padding-right: 36px;
}

/* ── Cart page section ────────────────────────────────────────────────── */

.sleek-xsell-cart-section {
    max-width: 700px;
    margin: 32px auto;
    padding: 0 16px;
}

.sleek-xsell-cart-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #111;
    margin-bottom: 12px;
}

/* ── Product cards (shared by popup + cart section) ──────────────────────── */

.sleek-xsell-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 0;
    border-top: 1px solid rgba(255,255,255,.1);
}
.sleek-xsell-modal-body .sleek-xsell-card:first-child { border-top: none; padding-top: 0; }

.sleek-xsell-cart-body .sleek-xsell-card {
    border-top: 1px solid rgba(0,0,0,.08);
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(0,0,0,.08);
}

.sleek-xsell-thumb {
    flex-shrink: 0;
    display: block;
    width: 76px;
    height: 76px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.sleek-xsell-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sleek-xsell-info { flex: 1; min-width: 0; }

.sleek-xsell-name {
    display: block;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    text-decoration: none;
    color: #fff;
}
.sleek-xsell-cart-body .sleek-xsell-name { color: #111; }
.sleek-xsell-name:hover { color: #a3d609; }

.sleek-xsell-variants { display: flex; flex-wrap: wrap; gap: 8px; }

.sleek-xsell-variant {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.04);
    color: #fff;
    border-radius: 24px;
    padding: 10px 16px;
    min-height: 44px;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, opacity .15s ease;
}
.sleek-xsell-cart-body .sleek-xsell-variant {
    border-color: rgba(0,0,0,.15);
    background: #f7f7f7;
    color: #111;
}

.sleek-xsell-variant:hover { border-color: #a3d609; background: rgba(163,214,9,.08); }
.sleek-xsell-variant.is-loading { opacity: .55; cursor: wait; }
.sleek-xsell-variant.added { border-color: #a3d609; background: #a3d609; color: #000; cursor: default; }
.sleek-xsell-variant.error { border-color: #e05a4e; background: rgba(224,90,78,.12); }

.sleek-xsell-variant-price { opacity: .75; font-weight: 700; }
.sleek-xsell-cart-body .sleek-xsell-variant-price { opacity: .6; }

.sleek-xsell-cart-icon { display: inline-flex; align-items: center; color: #a3d609; }
.sleek-xsell-cart-icon svg { width: 18px; height: 18px; }
.sleek-xsell-variant.added .sleek-xsell-cart-icon { color: #000; }

.sleek-xsell-variant-label { display: inline-flex; align-items: center; }
.sleek-xsell-variant-label svg { display: block; }

/* ── Responsive scaling ───────────────────────────────────────────────── */

/* Small phones — full-bleed sheet, extra-large tap targets */
@media (max-width: 380px) {
    .sleek-xsell-modal-panel { margin-top: 0; max-height: 100vh; border-radius: 0; width: 100%; padding: 20px 16px; }
    .sleek-xsell-thumb { width: 68px; height: 68px; }
    .sleek-xsell-name { font-size: 15px; }
    .sleek-xsell-variant { font-size: 14px; padding: 11px 16px; }
}

/* Tablets and up */
@media (min-width: 600px) {
    .sleek-xsell-modal-panel { max-width: 560px; padding: 32px 28px; border-radius: 20px; }
    .sleek-xsell-modal-title { font-size: 12px; margin-bottom: 22px; }
    .sleek-xsell-thumb { width: 88px; height: 88px; border-radius: 10px; }
    .sleek-xsell-name { font-size: 18px; margin-bottom: 14px; }
    .sleek-xsell-variant { font-size: 15px; padding: 11px 18px; }
    .sleek-xsell-cart-icon svg { width: 20px; height: 20px; }

    .sleek-xsell-cart-section { margin: 48px auto; }
    .sleek-xsell-cart-title { font-size: 18px; margin-bottom: 18px; }
    .sleek-xsell-cart-body .sleek-xsell-card { padding: 20px; }
}

/* Desktop — extra breathing room */
@media (min-width: 1024px) {
    .sleek-xsell-modal-panel { max-width: 640px; padding: 40px 36px; }
    .sleek-xsell-thumb { width: 100px; height: 100px; }
    .sleek-xsell-name { font-size: 19px; }
    .sleek-xsell-variant { font-size: 15px; padding: 12px 20px; }
}
