/* ============================================================
   EMMZED — SHOP-ENHANCE.CSS  (BATCH 1 / 001CPANEL)
   Quick-View modal · Low-stock urgency badges · Recently Viewed
   Loaded by products.php, shop.php, product.php
   ============================================================ */

/* ---------- Low-stock urgency badge ---------- */
.stock-badge {
    position: absolute; top: 8px; left: 8px; z-index: 5;
    background: linear-gradient(135deg,#ff4d4d,#e53935);
    color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .02em;
    padding: 4px 9px; border-radius: 50px; line-height: 1;
    box-shadow: 0 4px 12px rgba(229,57,53,.35);
    animation: emzPulse 1.6s ease-in-out infinite; white-space: nowrap;
}
@keyframes emzPulse {
    0%,100% { transform: scale(1); }
    50%     { transform: scale(1.06); }
}
/* position the card relatively so the badge anchors */
.product-card, .sh-card, .related-card { position: relative; }
.sh-thumb, .product-card > a, .related-card > a:first-child { position: relative; }

/* small low-stock line under price (non-card contexts) */
.low-stock-line {
    color: #e53935; font-size: 11px; font-weight: 700; margin-top: 3px;
}

/* ---------- Quick-View button on cards ---------- */
.qv-btn {
    position: absolute; top: 8px; right: 8px; z-index: 5;
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(17,17,17,.82); color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 0;                 /* 017CPANEL: kill any inherited button padding */
    line-height: 0;             /* 017CPANEL: no text baseline interference */
    opacity: 0; transform: translateY(-4px); transition: opacity .22s, transform .22s, background .22s;
    backdrop-filter: blur(3px);
}
/* 017CPANEL: iOS Safari ignores flexbox on <button> elements, which left the
   eye icon off-centre on iPhones. Absolute centre the SVG so it is perfectly
   centred in EVERY browser, flex support or not. */
.qv-btn svg {
    display: block;
    position: absolute;
    top: 50%; left: 50%;
    width: 16px; height: 16px;
    transform: translate(-50%, -50%);
    margin: 0; padding: 0;
}
.product-card:hover .qv-btn, .sh-card:hover .qv-btn { opacity: 1; transform: translateY(0); }
.qv-btn:hover { background: #d7ff22; color: #111; }
@media (max-width: 700px) { .qv-btn { opacity: 1; transform: none; } }   /* touch: always visible */

/* ---------- Quick-View modal ---------- */
.qv-overlay {
    position: fixed; inset: 0; z-index: 2400;
    background: rgba(8,9,11,.62); backdrop-filter: blur(3px);
    display: none; align-items: center; justify-content: center; padding: 16px;
    opacity: 0; transition: opacity .22s ease;
}
.qv-overlay.open { display: flex; opacity: 1; }
.qv-modal {
    background: #fff; color: #222; border-radius: 16px; max-width: 760px; width: 100%;
    max-height: 90vh; overflow: auto; position: relative;
    box-shadow: 0 30px 80px rgba(0,0,0,.4); transform: translateY(18px) scale(.98);
    transition: transform .26s cubic-bezier(.2,.7,.3,1);
    display: grid; grid-template-columns: 1fr 1fr;
}
.qv-overlay.open .qv-modal { transform: translateY(0) scale(1); }
@media (max-width: 600px) { .qv-modal { grid-template-columns: 1fr; } }
.qv-img {
    background: #f6f6f6; min-height: 240px; display: flex; align-items: center; justify-content: center;
}
.qv-img img { width: 100%; height: 100%; max-height: 460px; object-fit: cover; display: block; }
.qv-img .qv-noimg { font-size: 64px; color: #ddd; }
.qv-body { padding: 26px 24px; display: flex; flex-direction: column; }
.qv-cat { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #999; font-weight: 800; }
.qv-name { font-size: 22px; font-weight: 900; margin: 6px 0 8px; line-height: 1.2; color: #111; }
.qv-price { font-size: 26px; font-weight: 900; color: #111; }
.qv-price b { color: #6a1b9a; } /* fallback */
.qv-stock { font-size: 12px; margin: 8px 0 0; font-weight: 700; }
.qv-desc { font-size: 13.5px; line-height: 1.6; color: #555; margin: 14px 0; flex: 1; }
.qv-actions { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.qv-add {
    flex: 1; min-width: 140px; background: #111; color: #fff; border: none; border-radius: 10px;
    padding: 14px; font-size: 13px; font-weight: 800; cursor: pointer; text-align: center;
    transition: background .2s, transform .15s; text-decoration: none; display: inline-flex;
    align-items: center; justify-content: center; gap: 7px;
}
.qv-add:hover { background: #d7ff22; color: #111; transform: translateY(-2px); }
.qv-full {
    background: #fff; color: #111; border: 2px solid #eee; border-radius: 10px;
    padding: 14px 18px; font-size: 13px; font-weight: 800; cursor: pointer; text-decoration: none;
    transition: border-color .2s; display: inline-flex; align-items: center; gap: 7px;
}
.qv-full:hover { border-color: #d7ff22; }
.qv-close {
    position: absolute; top: 10px; right: 10px; z-index: 6; width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,.92); color: #333; border: none; cursor: pointer; font-size: 20px;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(0,0,0,.18);
}

/* ---------- Recently Viewed strip ---------- */
.rv-section { max-width: 1180px; margin: 10px auto 0; padding: 6px 15px 0; }
.rv-title { font-size: 13px; font-weight: 800; color: #888; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 12px; }
.rv-track { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.rv-track::-webkit-scrollbar { height: 6px; }
.rv-track::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.rv-card {
    flex: 0 0 132px; background: #fff; border: 1px solid #eee; border-radius: 12px; overflow: hidden;
    text-decoration: none; color: inherit; scroll-snap-align: start; transition: transform .2s, box-shadow .2s; position: relative;
}
.rv-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.08); }
.rv-card img { width: 100%; height: 110px; object-fit: cover; display: block; background: #f6f6f6; }
.rv-card .rv-noimg { width: 100%; height: 110px; display: flex; align-items: center; justify-content: center; font-size: 34px; background: #f6f6f6; }
.rv-card .rv-info { padding: 9px 10px 11px; }
.rv-card .rv-name { font-size: 12px; font-weight: 700; line-height: 1.3; color: #222; margin-bottom: 4px;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 30px; }
.rv-card .rv-price { font-size: 13px; font-weight: 900; color: #111; }

/* dark mode friendliness */
@media (prefers-color-scheme: dark) {
    .qv-modal { background: #1b1c1f; color: #eee; }
    .qv-name, .qv-price { color: #fff; }
    .qv-desc { color: #b9b9c2; }
    .rv-card { background: #1b1c1f; border-color: #2c2d31; }
    .rv-card .rv-name { color: #eee; }
}


/* ============================================================
   023CPANEL — MOBILE: remove BOTH card circles
   024CPANEL — the quick-view EYE is now removed EVERYWHERE
   (mobile AND desktop). Only the wishlist heart remains,
   and only on desktop.
   ============================================================ */
.qv-btn { display: none !important; }   /* eye: gone on all screens */

@media (max-width: 768px) {
    .wishlist-btn { display: none !important; }   /* heart: desktop only */
}
