/* ============================================
   NetKiyas – Custom CSS (Tailwind supplement)
   Only animations & utilities Tailwind can't handle
   ============================================ */

/* ====== SCROLL REVEAL ====== */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .06s; }
.reveal-delay-2 { transition-delay: .12s; }
.reveal-delay-3 { transition-delay: .20s; }
.reveal-delay-4 { transition-delay: .28s; }
.reveal-delay-5 { transition-delay: .36s; }
.reveal-delay-6 { transition-delay: .44s; }

/* ====== PRODUCT ROW ANIMATION ====== */
.product-row {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .4s cubic-bezier(.16,1,.3,1), transform .4s cubic-bezier(.16,1,.3,1),
                border-color .2s, box-shadow .2s;
}
.product-row.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ====== HERO GRID ====== */
.hero-grid {
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 52px 52px;
}

/* ====== FLOATING PARTICLES ====== */
.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(59,130,246,.4);
    border-radius: 50%;
    pointer-events: none;
}
.particle-1 { top: 18%; left: 12%; animation: particleFloat 8s ease-in-out infinite; }
.particle-2 { top: 32%; right: 18%; animation: particleFloat 10s ease-in-out infinite 1s; width: 4px; height: 4px; background: rgba(99,102,241,.35); }
.particle-3 { bottom: 25%; left: 25%; animation: particleFloat 12s ease-in-out infinite 2s; }
.particle-4 { top: 55%; right: 30%; animation: particleFloat 9s ease-in-out infinite 3s; width: 2px; height: 2px; background: rgba(6,182,212,.35); }
.particle-5 { bottom: 15%; right: 12%; animation: particleFloat 11s ease-in-out infinite 4s; width: 5px; height: 5px; background: rgba(139,92,246,.25); }

@keyframes particleFloat {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: .5; }
    25% { transform: translate(15px, -20px) scale(1.3); opacity: .8; }
    50% { transform: translate(-10px, -35px) scale(1); opacity: .4; }
    75% { transform: translate(20px, -15px) scale(1.2); opacity: .7; }
}

/* ====== HERO LIVE DATA WALL ====== */
.hero-wall-mask {
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.5) 15%, rgba(0,0,0,.7) 40%, rgba(0,0,0,.7) 60%, rgba(0,0,0,.5) 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.5) 15%, rgba(0,0,0,.7) 40%, rgba(0,0,0,.7) 60%, rgba(0,0,0,.5) 85%, transparent 100%);
}
.hero-wall-col {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    height: 100vh;
}
.hero-wall-track {
    display: flex;
    flex-direction: column;
    gap: 10px;
    will-change: transform;
}
.hero-wall-card {
    display: block;
    padding: 10px 12px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: background .3s, border-color .3s, opacity .3s;
    opacity: .55;
}
.hero-wall-card:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(59,130,246,.35);
    opacity: .95;
}
.hw-provider {
    font-size: 9px;
    font-weight: 600;
    color: rgba(96,165,250,.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: .02em;
}
.hw-name {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.hw-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 5px;
}
.hw-specs {
    font-size: 9px;
    color: rgba(148,163,184,.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hw-price {
    font-size: 10px;
    font-weight: 700;
    color: rgba(52,211,153,.7);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Mobile: smaller cards */
@media (max-width: 639px) {
    .hero-wall-card { padding: 7px 9px; }
    .hw-provider { font-size: 8px; }
    .hw-name { font-size: 9px; }
    .hw-specs { font-size: 8px; }
    .hw-price { font-size: 9px; }
    .hero-wall-track { gap: 7px; }
}

/* ====== MARQUEE ====== */
.marquee-track {
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    overflow: hidden;
}
.marquee-slide {
    display: flex;
    gap: 12px;
    width: max-content;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ====== PULSE SLOW ====== */
.animate-pulse-slow {
    animation: pulseSlow 6s ease-in-out infinite;
}
@keyframes pulseSlow {
    0%, 100% { opacity: .6; }
    50% { opacity: 1; }
}

/* ====== NO SCROLLBAR ====== */
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ====== THIN SCROLLBAR (sidebar) ====== */
.nk-scrollbar { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.nk-scrollbar::-webkit-scrollbar { width: 4px; }
.nk-scrollbar::-webkit-scrollbar-track { background: transparent; }
.nk-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* ====== LINE CLAMP ====== */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ====== MOBILE DRAWER STATES ====== */
#mobOverlay.open { opacity: 1; pointer-events: auto; }
#mobDrawer.open { transform: translateX(0); }

/* ====== MOBILE SEARCH BAR ====== */
#mobSearchBar.open { display: block; }

/* ====== SMOOTH SCROLL ====== */
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }

/* ====== FAVORITES DRAWER ====== */
#favOverlay.open { opacity: 1; pointer-events: auto; }
#favDrawer.open { transform: translateX(0); }

/* ====== FAV HEART ACTIVE ====== */
.fav-heart.active {
    color: #ef4444 !important;
    border-color: #fca5a5 !important;
}
.fav-heart.active svg { fill: #ef4444; }

/* ====== FAV HEART ANIMATION ====== */
@keyframes heartPop {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}
.fav-heart.pop { animation: heartPop .4s ease-out; }

/* ====== COMPARE CHECKBOX ====== */
.compare-check:checked + .compare-box {
    background-color: #2563eb;
    border-color: #2563eb;
}
.compare-check:checked + .compare-box svg { opacity: 1; }

/* ====== COMPARE BAR ====== */
#compareBar.show { transform: translateY(0); }

/* ====== BACK TO TOP ====== */
#backToTop.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ====== KB HINT ====== */
#kbHint.show { opacity: 1; }

/* ====== GRID VIEW ====== */
#productList.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
#productList.grid-view > * + * {
    margin-top: 0 !important;
}
#productList.grid-view .product-row {
    display: flex;
    flex-direction: column;
    height: 100%;
}
#productList.grid-view .nk-card {
    flex-direction: column;
    flex: 1;
}
#productList.grid-view .nk-card-main {
    flex: 1 1 auto;
}
#productList.grid-view .nk-card-side {
    width: auto;
    border-left-width: 0;
    border-top-width: 1px;
    padding: 1rem 1.25rem 1.25rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}
#productList.grid-view .nk-price { text-align: left; min-width: 0; width: auto; }
#productList.grid-view .nk-price-row { justify-content: flex-start; }
#productList.grid-view .nk-actions { flex-direction: row; align-items: center; width: auto; gap: 0.5rem; }
#productList.grid-view .nk-actions > a { order: 0; height: 2.25rem; }
#productList.grid-view .nk-actions > a:last-child { flex: 1 1 0%; }
#productList.grid-view .nk-compare-text { display: none; }

/* ====== PRICE ALARM PULSE ====== */
@keyframes alarmPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(249,115,22,.3); }
    50% { box-shadow: 0 0 0 6px rgba(249,115,22,0); }
}
#priceAlarmBtn.text-orange-500 { animation: alarmPulse 2s ease-in-out infinite; }

/* ====== SHIMMER (for "how it works" line) ====== */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.nk-noscroll { scrollbar-width: none; -ms-overflow-style: none; }
.nk-noscroll::-webkit-scrollbar { display: none; }
.nk-thin { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.nk-thin::-webkit-scrollbar { width: 4px; }
.nk-thin::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
details.nk-facet > summary::-webkit-details-marker { display: none; }
details.nk-facet > summary::marker { content: ""; }
.nk-progress { height: 2px; margin: -2px 0 0; border-radius: 2px; background: transparent; overflow: hidden; position: relative; }
#nkCatalog.nk-loading .nk-progress::after { content: ""; position: absolute; inset: 0; width: 40%; background: #2563eb; animation: nk-progress 0.9s ease-in-out infinite; }
#nkCatalog.nk-loading #nkResults { opacity: 0.55; pointer-events: none; transition: opacity 0.15s ease; }
@keyframes nk-progress { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.nk-backdrop { display: none; }
@media (min-width: 1024px) {
    #nkFilters { width: 272px; flex-shrink: 0; position: sticky; top: 84px; max-height: calc(100vh - 100px); display: flex; flex-direction: column; }
    #nkFilters .nk-drawer-body { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
}
@media (max-width: 1023.98px) {
    #nkFilters { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); z-index: 90; display: flex; flex-direction: column; background: #fff; box-shadow: -20px 0 40px rgba(15, 23, 42, 0.18); transform: translateX(100%); visibility: hidden; transition: transform 0.25s ease, visibility 0.25s; }
    #nkFilters .nk-drawer-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
    body.nk-filters-open #nkFilters { transform: none; visibility: visible; }
    body.nk-filters-open { overflow: hidden; }
    body.nk-filters-open .nk-backdrop { display: block; position: fixed; inset: 0; z-index: 85; background: rgba(15, 23, 42, 0.45); }
}
