/* ==========================================================================
   Quick View — storefront slide-in product overview drawer.
   Self-contained, theme-independent (uses --site-* tokens with fallbacks, the
   same convention as the ProductTabsSlider block). Loaded once per page by the
   <sys:quickview/> tag handler.
   ========================================================================== */

/* --- Trigger button (hover overlay on a product card) --------------------- */
/* Added to product cards in later steps. The card needs position:relative for
   the absolute overlay; card renderers already wrap the image in a positioned
   container, so we anchor to .mv-quickview-host. */
.mv-quickview-host { position: relative; }

.mv-quickview-trigger {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translate(-50%, 8px);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 0;
    border-radius: var(--site-radius, 6px);
    background: rgba(20, 20, 20, .82);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    z-index: 3;
}
.mv-quickview-trigger svg { width: 15px; height: 15px; fill: currentColor; }
/* Reveal the Quick View trigger when hovering ANYWHERE on the product card (not just
   the image box). The trigger stays absolutely positioned over its .mv-quickview-host. */
.mv-quickview-host:hover .mv-quickview-trigger,
.cell-product:hover .mv-quickview-trigger,
.product-line:hover .mv-quickview-trigger,
.mv-promo-card:hover .mv-quickview-trigger,
.mv-shorty-card:hover .mv-quickview-trigger,
.sf-cb-ptabs__card:hover .mv-quickview-trigger,
.mv-quickview-trigger:focus-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}
.mv-quickview-trigger:hover { background: var(--site-primary, #1d4ed8); }

/* --- Backdrop ------------------------------------------------------------- */
.mv-qv-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .30);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s;
    z-index: 100000;
}
.mv-qv-backdrop.is-open { opacity: 1; visibility: visible; }

/* --- Drawer panel --------------------------------------------------------- */
.mv-qv-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 420px;
    max-width: 92vw;
    background: #fff;
    box-shadow: -6px 0 24px rgba(0, 0, 0, .18);
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.22, .61, .36, 1);
    z-index: 100001;
    display: flex;
    flex-direction: column;
    font-family: var(--site-font, Arial, Helvetica, sans-serif);
}
.mv-qv-drawer.is-open { transform: translateX(0); }

/* Header bar: persistent chrome (title + open-full-page + close) */
.mv-qv-drawer__head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--site-border, #e3e3e3);
}
.mv-qv-drawer__title {
    font-size: 17px;
    font-weight: 700;
    color: var(--site-text, #1a1a1a);
    margin-right: auto;
}
.mv-qv-drawer__open,
.mv-qv-drawer__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--site-muted, #555);
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
.mv-qv-drawer__open svg { width: 18px; height: 18px; fill: currentColor; }
.mv-qv-drawer__open:hover,
.mv-qv-drawer__close:hover { background: var(--site-surface, #f3f3f3); color: var(--site-text, #1a1a1a); }
.mv-qv-drawer__close { font-size: 26px; line-height: 1; }

/* Scrollable body where the fetched partial is injected */
.mv-qv-drawer__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 18px 20px 96px;
}

/* Loading + error states */
.mv-qv-loading,
.mv-qv-error {
    padding: 40px 10px;
    text-align: center;
    color: var(--site-muted, #777);
    font-size: 14px;
}
.mv-qv-spinner {
    width: 28px;
    height: 28px;
    margin: 0 auto 12px;
    border: 3px solid var(--site-border, #ddd);
    border-top-color: var(--site-primary, #1d4ed8);
    border-radius: 50%;
    animation: mv-qv-spin .8s linear infinite;
}
@keyframes mv-qv-spin { to { transform: rotate(360deg); } }

/* --- Injected product body (.mv-qv from Panel.cshtml) --------------------- */
.mv-qv__media {
    position: relative;
    text-align: center;
    margin-bottom: 12px;
}
.mv-qv__img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}
.mv-qv__wish {
    position: absolute;
    top: 0;
    right: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
    color: var(--site-muted, #888);
    transition: color .15s ease;
}
.mv-qv__wish svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.mv-qv__wish:hover { color: var(--site-button-bg, #2c5aa0); }
.mv-qv__wish:hover svg { fill: var(--site-button-bg, #2c5aa0); stroke: var(--site-button-bg, #2c5aa0); }

/* Manufacturer logo + discount badge, stacked at the TOP-LEFT over the image. */
.mv-qv__tl {
    position: absolute;
    top: 8px; left: 8px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.mv-qv__logo {
    display: inline-block;
    background: rgba(255, 255, 255, .95);
    border: 1px solid var(--site-border, #e0e0e0);
    border-radius: 4px;
    padding: 3px 6px;
    line-height: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.mv-qv__logo img { max-height: 30px; max-width: 110px; width: auto; display: inline-block; }
.mv-qv__badge {
    /* doubled size vs a normal card badge */
    background: var(--site-button-bg, #e1251b);
    color: #fff;
    font-weight: 800;
    font-size: 22px;
    line-height: 1;
    padding: 9px 14px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
}

/* Thumbnails: a single horizontal row; prev/next arrows appear only when it overflows. */
.mv-qv__thumbsrow {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}
.mv-qv__thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    flex: 1 1 auto;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.mv-qv__thumbs::-webkit-scrollbar { display: none; }
.mv-qv__thumb {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    padding: 2px;
    border: 1px solid var(--site-border, #ddd);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.mv-qv__thumb:hover { box-shadow: 0 1px 6px rgba(0, 0, 0, .16); }
.mv-qv__thumb.is-active { border-color: var(--site-primary, #1d4ed8); }
.mv-qv__thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mv-qv__thumbnav {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--site-border, #ddd);
    border-radius: 50%;
    background: #fff;
    color: var(--site-content-text, #333);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: none; /* shown (inline-flex) by JS only when the row overflows */
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.mv-qv__thumbnav:hover { background: var(--site-surface, #f5f5f5); }
.mv-qv__thumbnav:disabled { opacity: .35; cursor: default; }

.mv-qv__name {
    display: block;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--site-text, #1a1a1a);
    text-decoration: none;
    margin-bottom: 4px;
}
.mv-qv__name:hover { color: var(--site-primary, #1d4ed8); }
.mv-qv__sku {
    font-size: 12px;
    color: var(--site-muted, #888);
    margin-bottom: 14px;
}
.mv-qv__price { margin-bottom: 14px; }
.mv-qv__desc {
    font-size: 13px;
    line-height: 1.55;
    color: var(--site-text, #333);
    margin-bottom: 16px;
}

/* Sticky action bar pinned to the bottom of the drawer */
.mv-qv__actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 20px;
    background: #fff;
    border-top: 1px solid var(--site-border, #e3e3e3);
    display: flex;
    align-items: center;
    gap: 14px;
}
.mv-qv__add { flex: 1 1 auto; justify-content: center; }
.mv-qv__details {
    flex: 0 0 auto;
    font-size: 13px;
    color: var(--site-muted, #555);
    text-decoration: underline;
}
.mv-qv__details:hover { color: var(--site-primary, #1d4ed8); }

/* Add-to-cart button states: adding (dimmed) → added (green, check icon) → restore */
.mv-qv__add .mv-qv__check-icon { display: none; }
.mv-qv__add.is-adding { opacity: .7; pointer-events: none; }
.mv-qv__add.is-added { background: #1a9c4e; border-color: #1a9c4e; }
.mv-qv__add.is-added .mv-qv__add-icon { display: none; }
.mv-qv__add.is-added .mv-qv__check-icon { display: inline-block; }

/* Price block (theme .prices markup) tuned for the drawer: muted struck reference
   prices, the price-to-pay emphasized. */
.mv-qv__price .prices { margin: 0; }
.mv-qv__price .prices p { margin: 2px 0; }
.mv-qv__price .public-price { color: var(--site-muted, #888); text-decoration: line-through; font-size: 13px; }
.mv-qv__price .your-siteprice { color: var(--site-muted, #888); text-decoration: line-through; font-size: 14px; }
.mv-qv__price .your-price { font-size: 22px; font-weight: 700; color: var(--site-primary, #1d4ed8); }
.mv-qv__price .ht-price,
.mv-qv__price .small-TTC { font-size: 12px; color: var(--site-muted, #888); }
.mv-qv__price .yousave-price { font-size: 12px; font-weight: 600; color: #e0245e; }
.mv-qv__price .mention { font-size: .7em; font-weight: 400; }
