/* Custom styles and enhancements for Product Catalog Showcase */

@layer utilities {
    .glass-nav {
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #334155;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Card hover animation & glow */
.product-card {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover {
    transform: translateY(-4px);
}

/* Modal Transition */
#lightbox-modal, #demo-modal {
    transition: opacity 0.25s ease-in-out;
}

/* Gradient mesh background for Hero */
.hero-gradient {
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(147, 51, 234, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%);
}

.dark .hero-gradient {
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.18) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(147, 51, 234, 0.18) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
}

/* Pulsing online badge */
@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.4);
        opacity: 0.5;
    }
}

.pulsing-indicator {
    animation: pulse-dot 2s infinite ease-in-out;
}

/* =========================================================
   Realistic Smartphone Mockup Frame (Pixel-Perfect, Zero Crop)
   ========================================================= */
.phone-frame {
    width: 300px;
    height: 560px;
    background: #090d16;
    border-radius: 42px;
    border: 9px solid #1e293b;
    box-shadow: 
        0 0 0 1px #334155,
        0 20px 45px -12px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(59, 130, 246, 0.12);
    position: relative;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Realistic Slim Bezel Header (Houses Speaker & Sensor, Never Covers Screen Content) */
.phone-top-bezel {
    height: 20px;
    width: 100%;
    background: #090d16;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    z-index: 10;
}

.phone-speaker-slit {
    width: 44px;
    height: 3.5px;
    background: #334155;
    border-radius: 2px;
}

.phone-camera-dot {
    width: 6px;
    height: 6px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 50%;
}

/* Phone Screen (Zero Horizontal Crop, Fully Scrollable) */
.phone-screen {
    flex: 1;
    width: 100%;
    background: #000;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.phone-screen::-webkit-scrollbar {
    width: 4px;
}

.phone-screen::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.phone-screen img {
    width: 100%;
    height: auto;
    min-height: 100%;
    display: block;
    object-fit: contain;
    object-position: top;
}

/* Phone Bottom Bezel with Home Indicator Bar */
.phone-bottom-bezel {
    height: 18px;
    width: 100%;
    background: #090d16;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 10;
}

.phone-home-indicator {
    width: 100px;
    height: 4px;
    background: #475569;
    border-radius: 2px;
}

/* Device View Toggle Pills */
.device-toggle-btn {
    transition: all 0.2s ease;
}

.device-toggle-btn.active {
    background-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.dark .device-toggle-btn.active {
    background-color: #3b82f6;
    color: #ffffff;
}
