/* SMART JACKS® - Industrial Life-Safety Equipment Styling
 * Designed for High-Trust Defense, Telecom, and Government Engineering Procurement
 */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:ital,wght@0,600;0,700;0,800;0,900;1,700&family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

:root {
    --brand-red: #D62027;
    --brand-red-dark: #B8141A;
    --brand-red-light: #FEF2F2;
    --brand-navy: #0F172A;
    --brand-slate: #1E293B;
    --brand-charcoal: #525357;
    --brand-silver: #E2E8F0;
    --brand-bg-offwhite: #F8FAFC;
    --hazard-yellow: #FACC15;
    
    /* Native CSS Accordion Smooth Interpolation */
    interpolate-size: allow-keywords;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1E293B;
    background-color: #FFFFFF;
    overflow-x: hidden;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Barlow Semi Condensed', 'Montserrat', sans-serif;
    letter-spacing: -0.01em;
}

/* 1. ENGINEERING MONOSPACE & TABULAR NUMBERS */
.font-mono-spec, .spec-mono, code, kbd, samp {
    font-family: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-feature-settings: 'tnum' on, 'zero' on;
    font-variant-numeric: tabular-nums;
}

/* 2. HAZARD STRIPE INDUSTRIAL ACCENTS */
.hazard-stripe {
    background: repeating-linear-gradient(
        -45deg,
        #FACC15,
        #FACC15 10px,
        #0F172A 10px,
        #0F172A 20px
    );
}

.hazard-stripe-sm {
    height: 4px;
    background: repeating-linear-gradient(
        -45deg,
        #FACC15,
        #FACC15 6px,
        #0F172A 6px,
        #0F172A 12px
    );
}

.hazard-stripe-badge {
    background: repeating-linear-gradient(
        -45deg,
        rgba(250, 204, 21, 0.18),
        rgba(250, 204, 21, 0.18) 6px,
        transparent 6px,
        transparent 12px
    );
}

/* 3. INDUSTRIAL "DATA PLATE" METAL SPEC STYLING */
.data-plate {
    position: relative;
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
    border: 1px solid #CBD5E1;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.data-plate-dark {
    position: relative;
    background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
    border: 1px solid #334155;
    border-radius: 0.75rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Data plate faux corner rivets */
.rivet-tl, .rivet-tr, .rivet-bl, .rivet-br {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background: radial-gradient(circle at 35% 35%, #E2E8F0 0%, #94A3B8 60%, #475569 100%);
    box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}
.rivet-tl { top: 6px; left: 6px; }
.rivet-tr { top: 6px; right: 6px; }
.rivet-bl { bottom: 6px; left: 6px; }
.rivet-br { bottom: 6px; right: 6px; }

/* 4. CERTIFICATION BADGES LIKE STAMPS */
.stamp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1.5px dashed #0F172A;
    border-radius: 0.25rem;
    color: #0F172A;
    background: rgba(248, 250, 252, 0.8);
    transform: rotate(-1.5deg);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.stamp-badge:hover {
    transform: rotate(0deg) scale(1.04);
    border-style: solid;
}
.stamp-badge-red {
    border-color: #D62027;
    color: #D62027;
    background: rgba(254, 242, 242, 0.7);
}
.stamp-badge-green {
    border-color: #047857;
    color: #047857;
    background: rgba(236, 253, 245, 0.7);
}
.stamp-badge-yellow {
    border-color: #B45309;
    color: #92400E;
    background: rgba(254, 243, 199, 0.7);
}

/* 5. SPOTLIGHT CARD (Soft glow that tracks mouse) */
.spot {
    position: relative;
    overflow: hidden;
}
.spot::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: radial-gradient(350px circle at var(--x, 50%) var(--y, 50%), rgba(214, 32, 39, 0.08), transparent 60%);
    z-index: 1;
}
.spot:hover::before {
    opacity: 1;
}

/* 6. PRIMARY CTA SHINE SWEEP */
@keyframes shineSweep {
    0% { transform: translateX(-150%) rotate(25deg); }
    30%, 100% { transform: translateX(250%) rotate(25deg); }
}
.btn-shine {
    position: relative;
    overflow: hidden;
}
.btn-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 60%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(25deg);
    animation: shineSweep 4.5s ease-in-out infinite;
    pointer-events: none;
}

/* 7. ANIMATED GRADIENT BORDER (FAST PROCUREMENT DESK CARD ONLY) */
@keyframes borderRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.animated-gradient-border {
    position: relative;
    background: #FFFFFF;
    border-radius: 1rem;
    z-index: 1;
}
.animated-gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 1.1rem;
    background: linear-gradient(90deg, #D62027, #0F172A, #FACC15, #D62027);
    background-size: 300% 300%;
    animation: borderRotate 6s ease infinite;
    z-index: -1;
}

/* 8. NOISE TEXTURE FOR DARK INDUSTRIAL PANELS */
.noise-bg {
    background-color: #0F172A;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 0);
    background-size: 16px 16px;
}

/* 9. NATIVE SMOOTH ACCORDION (<details> zero JS) */
details::details-content {
    height: 0;
    overflow: hidden;
    transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1), content-visibility 0.3s allow-discrete;
}
details[open]::details-content {
    height: auto;
}
details summary::-webkit-details-marker {
    display: none;
}
details summary {
    list-style: none;
}

/* 10. BLUEPRINT GRID WITH SLOW PAN */
@keyframes blueprintPan {
    0% { background-position: 0 0; }
    100% { background-position: 72px 72px; }
}
.blueprint-grid {
    background-color: #F8FAFC;
    background-image: 
        linear-gradient(to right, rgba(203, 213, 225, 0.45) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(203, 213, 225, 0.45) 1px, transparent 1px);
    background-size: 36px 36px;
    animation: blueprintPan 60s linear infinite;
    position: relative;
}
.blueprint-grid::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 60% 20%, rgba(255, 255, 255, 0) 0%, rgba(248, 250, 252, 0.88) 75%, rgba(248, 250, 252, 0.98) 100%);
    pointer-events: none;
}

/* 11. VIEW TRANSITIONS API */
@view-transition {
    navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.25s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
#site-header {
    view-transition-name: site-header;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
#site-header.header-scrolled {
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
}
#site-header.header-scrolled .header-inner-row {
    height: 4.25rem !important;
}
#site-header.header-scrolled .site-logo-img {
    height: 2.75rem !important;
}

/* 12. INFINITE BRAND MARQUEE */
@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}
.brand-marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 35s linear infinite;
}
.brand-marquee-track:hover {
    animation-play-state: paused;
}
.brand-marquee-track a img {
    filter: none;
    opacity: 1;
    transition: transform 0.3s ease;
}
.brand-marquee-track a:hover img {
    transform: scale(1.08);
}

/* 13. HERO HEADLINE STAGGERED REVEAL */
@keyframes heroWordSlide {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}
.hero-word-wrap {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-bottom: 2px;
}
.hero-word {
    display: inline-block;
    animation: heroWordSlide 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* 14. PRODUCT CARD HOVER LIFT */
.product-card-lift {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}
.product-card-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.12);
}

/* 15. FLY-TO-BASKET & BADGE BOUNCE */
.flying-thumbnail {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(214, 32, 39, 0.35);
    transition: all 0.65s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes badgeBounce {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.45); }
    70% { transform: scale(0.9); }
}
.badge-bounce {
    animation: badgeBounce 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 16. WHATSAPP GENTLE PULSE */
@keyframes pulse-ring {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
    70% { transform: scale(1); box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
.whatsapp-pulse {
    animation: pulse-ring 2.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 17. MEGA MENU DROPDOWN */
.nav-mega-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.group:hover .nav-mega-menu,
.nav-mega-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 18. FLOATING-LABEL INPUTS */
.floating-label-group {
    position: relative;
}
.floating-label-input {
    width: 100%;
    padding: 1.15rem 0.85rem 0.4rem 0.85rem;
    border: 1px solid #CBD5E1;
    border-radius: 0.5rem;
    background: #FFFFFF;
    font-size: 0.875rem;
    color: #0F172A;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.floating-label-input:focus {
    outline: none;
    border-color: #0F172A;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}
.floating-label-text {
    position: absolute;
    top: 0.75rem;
    left: 0.85rem;
    font-size: 0.8125rem;
    color: #64748B;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.floating-label-input:focus ~ .floating-label-text,
.floating-label-input:not(:placeholder-shown) ~ .floating-label-text {
    top: 0.3rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0F172A;
}

/* 19. 3D FLIP CARD */
.flip-card {
    background-color: transparent;
    perspective: 1000px;
}
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner,
.flip-card.is-flipped .flip-card-inner {
    transform: rotateY(180deg);
}
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 1rem;
}
.flip-card-back {
    transform: rotateY(180deg);
}

/* 20. ANIMATED ROUTE LINE */
@keyframes dash-draw {
    to { stroke-dashoffset: 0; }
}
.route-line {
    stroke-dasharray: 8 6;
    stroke-dashoffset: 200;
    animation: dash-draw 4s linear infinite;
}

/* 21. REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .brand-marquee-track, .blueprint-grid, .btn-shine::after, .route-line {
        animation: none !important;
        transform: none !important;
    }
}

/* 22. PRINT STYLES */
@media print {
    header, footer, .no-print, #rfq-drawer, .whatsapp-floating-btn, .mobile-action-bar, #command-search-modal {
        display: none !important;
    }
    body { background: #FFF !important; color: #000 !important; }
}


/* Additional Button & Utility Classes for Complete Compatibility */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 48px;
    padding: 0 1.5rem;
    background-color: #D62027;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 4px rgba(214, 32, 39, 0.25);
    text-decoration: none;
}
.btn-primary:hover {
    background-color: #B8141A;
    box-shadow: 0 4px 12px rgba(214, 32, 39, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 48px;
    padding: 0 1.5rem;
    background-color: #FFFFFF;
    color: #0F172A;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    border: 1.5px solid #E2E8F0;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    text-decoration: none;
}
.btn-secondary:hover {
    border-color: #0F172A;
    background-color: #F8FAFC;
    transform: translateY(-1px);
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 48px;
    padding: 0 1.25rem;
    background-color: #059669;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.25);
    text-decoration: none;
}
.btn-whatsapp:hover {
    background-color: #047857;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.badge-clean {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 12px;
    font-weight: 600;
    border-radius: 9999px;
    background-color: #F1F5F9;
    color: #334155;
    border: 1px solid #E2E8F0;
}

/* ==========================================================================
   23. COMPREHENSIVE MOBILE & TOUCH OPTIMIZATIONS (iOS & Android)
   ========================================================================== */
@media screen and (max-width: 768px) {
    /* Prevent content from being hidden behind sticky bottom action bar */
    body {
        padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
        -webkit-overflow-scrolling: touch;
    }

    /* CRITICAL iOS SAFARI FIX: Prevent automatic zoom-in when tapping form inputs (requires min 16px) */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="password"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Safe Area Inset Support for Sticky Action Bar & Floating WhatsApp Button */
    .mobile-action-bar {
        padding-bottom: calc(0.625rem + env(safe-area-inset-bottom, 0px)) !important;
    }

    .whatsapp-floating-btn {
        bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Ensure touch-friendly tap targets across mobile interactions */
    button, a, input, select, textarea {
        touch-action: manipulation;
    }

    /* Prevent text cutoffs & awkward clipping in brand marquee on small mobile screens */
    .brand-marquee-track img {
        max-width: 140px;
    }

    /* Smooth horizontal touch scrolling for category filter chips */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }
}

