/* ==========================================================================
   BL Electronics — custom CSS
   Supplements Tailwind CDN with utility tweaks, smooth scrolling, and
   component polish. Loaded after Tailwind.
   ========================================================================== */

:root {
    --brand: #0057FF;
    --accent: #00C2FF;
    --ink: #0a0e1a;
}

* {
    -webkit-tap-highlight-color: transparent;
}

html, body {
    overflow-x: hidden;
}

body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--brand);
    color: #fff;
}

/* --------------------------------------------------------------------------
   Scrollbar (WebKit)
   -------------------------------------------------------------------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* --------------------------------------------------------------------------
   Focus ring
   -------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 6px;
}

/* --------------------------------------------------------------------------
   Typography helpers
   -------------------------------------------------------------------------- */
.font-display { font-family: 'Space Grotesk', system-ui, sans-serif; }

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Hero gradient background animation
   -------------------------------------------------------------------------- */
@keyframes hero-gradient {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
.hero-gradient-animated {
    background: linear-gradient(120deg, #0057FF, #00C2FF, #0057FF);
    background-size: 200% 200%;
    animation: hero-gradient 8s ease infinite;
}

/* --------------------------------------------------------------------------
   Swiper overrides
   -------------------------------------------------------------------------- */
.swiper { width: 100%; }
.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 16px !important;
    font-weight: 800 !important;
}
.hero-swiper .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.4;
    width: 10px;
    height: 10px;
}
.hero-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--accent);
    width: 28px;
    border-radius: 5px;
}

.product-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-thumbs .swiper-slide {
    opacity: 0.5;
    transition: opacity 0.2s, border-color 0.2s;
}
.product-thumbs .swiper-slide-active,
.product-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--brand) !important;
}

/* Product gallery: mobile-first fallback when Swiper/Tailwind JS or CDN CSS is unavailable */
.product-swiper {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    max-height: 560px;
}
.product-swiper .swiper-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}
.product-swiper .swiper-slide {
    flex: 0 0 100%;
    min-width: 100%;
    width: 100%;
    height: 100%;
}
.product-swiper img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 560px;
    object-fit: cover;
    object-position: right center;
}
.product-thumbs {
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden !important;
}
.product-thumbs .swiper-wrapper {
    display: flex;
    gap: 0.5rem;
}
.product-thumbs .swiper-slide {
    flex: 0 0 4rem;
    width: 4rem !important;
    height: 4rem !important;
}
@media (min-width: 640px) {
    .product-thumbs .swiper-slide {
        flex-basis: 5rem;
        width: 5rem !important;
        height: 5rem !important;
    }
}
@media (max-width: 767px) {
    .product-swiper {
        aspect-ratio: 1 / 1;
        max-height: 75vh;
    }
}

/* --------------------------------------------------------------------------
   Card hover lift
   -------------------------------------------------------------------------- */
.lift-on-hover {
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
}
.lift-on-hover:hover {
    transform: translateY(-4px);
}

/* --------------------------------------------------------------------------
   Marquee strip (for brand logos if added)
   -------------------------------------------------------------------------- */
.marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* --------------------------------------------------------------------------
   Glass effect
   -------------------------------------------------------------------------- */
.glass {
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.18);
}
.glass-dark {
    background: rgba(10,14,26,0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* --------------------------------------------------------------------------
   Image placeholder
   -------------------------------------------------------------------------- */
.image-placeholder {
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
}
.image-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s linear infinite;
}

/* --------------------------------------------------------------------------
   Hide scrollbar utility
   -------------------------------------------------------------------------- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* --------------------------------------------------------------------------
   Mobile nav — uses Tailwind 'hidden' class toggled by JS.
   (No CSS max-height rules here — they conflict with Tailwind's hidden class.)
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   Print styles
   -------------------------------------------------------------------------- */
@media print {
    header, footer, aside, .no-print { display: none !important; }
    body { color: #000; }
    a { text-decoration: underline; }
}

/* --------------------------------------------------------------------------
   Swiper indicators
   -------------------------------------------------------------------------- */
.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.75);
    opacity: 1;
}
.swiper-pagination-bullet-active {
    background: #00C2FF;
}

/* Product gallery navigation: icon-only, transparent, polished */
.product-gallery-nav {
    width: 2.75rem !important;
    height: 2.75rem !important;
    color: #fff !important;
    background: transparent !important;
    border: 0 !important;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,.55));
}
.product-gallery-nav::after {
    font-size: 1.65rem !important;
    font-weight: 900 !important;
}
@media (max-width: 767px) {
    .hero-swiper img {
        object-position: right center !important;
        transform: scale(1.08);
    }
    .hero-swiper .swiper-slide .relative.h-full > div {
        display: none !important;
    }
}
