/* ============================================================
   panels.css — Floating Cart / Wishlist slide panels
   Loaded on all pages (index.html, static pages via page-chrome.js).
   Product pages also load product.css which duplicates these rules.
   ============================================================ */

/* ── Slide Panel: overlay ── */
.fpanel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 50, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s;
    z-index: 190;
}
.fpanel-overlay.is-open { opacity: 1; pointer-events: auto; }

/* ── Slide Panel: drawer ── */
.fpanel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 100vw);
    height: 100dvh;
    background: #fff;
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 60px rgba(10, 20, 60, 0.20);
}
.fpanel.is-open { transform: translateX(0); }

/* ── Panel: header ── */
.fpanel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 16px;
    border-bottom: 1px solid #EEF0F5;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f8faff 0%, #fff 100%);
}
.fpanel-title {
    font-family: var(--font-display, 'Bricolage Grotesque', sans-serif);
    font-weight: 700;
    font-size: 17px;
    color: #0d1b2a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}
.fpanel-title svg { color: #0F4C81; flex-shrink: 0; }
.fpanel-count {
    background: #EEF2FF;
    color: #4F46E5;
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 99px;
    font-family: var(--font-body, sans-serif);
    letter-spacing: 0.01em;
}
.fpanel-close {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: #6B7280;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
    background: none;
    border: 1.5px solid transparent;
    flex-shrink: 0;
}
.fpanel-close:hover { background: #F3F4F6; border-color: #E5E7EB; color: #111827; }

/* ── Panel: scrollable body ── */
.fpanel-body {
    flex: 1;
    overflow-y: auto;
    padding: 6px 16px;
}
.fpanel-body::-webkit-scrollbar { width: 3px; }
.fpanel-body::-webkit-scrollbar-track { background: transparent; }
.fpanel-body::-webkit-scrollbar-thumb { background: #E5E7EB; border-radius: 4px; }

/* ── Panel: footer ── */
.fpanel-foot {
    padding: 16px 20px 18px;
    border-top: 1px solid #EEF0F5;
    background: #FAFBFD;
    flex-shrink: 0;
}

/* ── Empty state ── */
.fpanel-empty {
    padding: 52px 28px 36px;
    text-align: center;
}
.fpanel-empty-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(15,76,129,.1) 0%, rgba(0,188,212,.06) 100%);
    border: 1.5px dashed rgba(15,76,129,.25);
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    color: #0F4C81;
}
.fpanel-empty-icon svg { width: 30px; height: 30px; }
.fpanel-empty-icon--heart {
    background: linear-gradient(135deg, rgba(244,63,94,.1) 0%, rgba(251,113,133,.06) 100%);
    border-color: rgba(244,63,94,.25);
    color: #F43F5E;
}
.fpanel-empty-big {
    font-family: var(--font-display, 'Bricolage Grotesque', sans-serif);
    font-weight: 700;
    font-size: 15.5px;
    color: #111827;
    margin: 0 0 6px;
}
.fpanel-empty-sub {
    font-size: 12.5px;
    color: #9CA3AF;
    max-width: 240px;
    margin: 0 auto 20px;
    line-height: 1.65;
}
.fpanel-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: linear-gradient(135deg, #1565C0 0%, #0F4C81 100%);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 9px;
    text-decoration: none;
    transition: all .2s cubic-bezier(.22,.61,.36,1);
    box-shadow: 0 4px 14px rgba(15,76,129,.28);
    font-family: var(--font-body, sans-serif);
}
.fpanel-empty-btn:hover { transform: translateY(-1px); box-shadow: 0 7px 20px rgba(15,76,129,.38); }

/* ── Cart line item ── */
.fline {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #F3F4F6;
    align-items: start;
}
.fline:last-child { border-bottom: 0; }

.fline-thumb {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, rgba(15,76,129,.07) 0%, rgba(0,188,212,.05) 100%);
    border: 1px solid rgba(15,76,129,.12);
    border-radius: 12px;
    display: grid;
    place-items: center;
    overflow: hidden;
    flex-shrink: 0;
}
.fline-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.fline-svg {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 4px;
}
.fline-svg svg { width: 100%; height: 100%; }

.fline-info { min-width: 0; }
.fline-name {
    font-family: var(--font-display, 'Bricolage Grotesque', sans-serif);
    font-weight: 700;
    font-size: 13px;
    color: #111827;
    margin: 0 0 2px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fline-comp {
    font-size: 11px;
    color: #9CA3AF;
    margin: 0 0 2px;
}
.fline-rate {
    font-size: 11px;
    color: #6B7280;
    margin: 0 0 7px;
}
.fline-rate--price {
    font-size: 12.5px;
    font-weight: 700;
    color: #0F4C81;
    margin: 0;
}

.fline-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
    padding-top: 2px;
}
.fline-total {
    font-family: var(--font-display, 'Bricolage Grotesque', sans-serif);
    font-weight: 800;
    font-size: 13.5px;
    color: #111827;
}
.fline-remove {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    color: #D1D5DB;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
    padding: 0;
}
.fline-remove:hover { color: #EF4444; background: rgba(239,68,68,.08); }
.fline-remove svg { pointer-events: none; }

/* ── Qty stepper ── */
.fqty { display: flex; align-items: center; gap: 5px; }
.fqty-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1.5px solid rgba(15,76,129,.18);
    background: #fff;
    color: #0F4C81;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
    padding: 0;
}
.fqty-btn:hover { background: rgba(15,76,129,.07); border-color: rgba(15,76,129,.38); }
.fqty-btn svg { pointer-events: none; }
.fqty-inp {
    width: 42px;
    height: 28px;
    border: 1.5px solid #E5E7EB;
    border-radius: 8px;
    text-align: center;
    font-size: 12.5px;
    font-weight: 700;
    color: #111827;
    font-family: var(--font-body, sans-serif);
    outline: none;
    background: #fff;
    transition: border-color 0.15s;
}
.fqty-inp:focus { border-color: #0F4C81; }

/* ── Totals ── */
.ftotals { margin-bottom: 14px; }
.ftotals-row {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: #6B7280;
    padding: 4px 0;
}
.ftotals-row.grand {
    font-size: 14.5px;
    color: #111827;
    font-weight: 800;
    border-top: 1.5px solid #E5E7EB;
    margin-top: 8px;
    padding-top: 10px;
    font-family: var(--font-display, 'Bricolage Grotesque', sans-serif);
}

/* ── Checkout / Add-All button ── */
.fbtn-checkout {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #1565C0 0%, #0F4C81 100%);
    color: #fff;
    font-weight: 700;
    font-size: 13.5px;
    font-family: var(--font-display, 'Bricolage Grotesque', sans-serif);
    border-radius: 11px;
    cursor: pointer;
    border: none;
    margin-bottom: 8px;
    transition: all 0.2s cubic-bezier(.22,.61,.36,1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(15,76,129,.28);
    letter-spacing: .01em;
}
.fbtn-checkout:hover { transform: translateY(-1px); box-shadow: 0 7px 22px rgba(15,76,129,.38); }
.fbtn-checkout:active { transform: scale(0.98); }
.fbtn-checkout svg { pointer-events: none; }

.ffoot-note {
    font-size: 11px;
    color: #9CA3AF;
    text-align: center;
    line-height: 1.55;
}

/* ── Wishlist line item ── */
.fwish-line {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #F3F4F6;
}
.fwish-line:last-child { border-bottom: 0; }
.fwish-actions {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
    flex-shrink: 0;
    padding-top: 2px;
}
.fwish-move {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: #0F4C81;
    background: rgba(15,76,129,.08);
    border: none;
    border-radius: 7px;
    padding: 6px 11px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    font-family: var(--font-body, sans-serif);
}
.fwish-move:hover { background: rgba(15,76,129,.15); }
.fwish-move svg { pointer-events: none; }

@media (max-width: 480px) {
    .fpanel { width: 100vw; }
    .fline { grid-template-columns: 48px 1fr auto; }
    .fline-thumb { width: 48px; height: 48px; }
}
