/* --- Steelcore Industrial - Global Custom Styles --- */

html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #faf8ff;
}
::-webkit-scrollbar-thumb {
    background: #c3c6d4;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a3a3af;
}

/* --- Header Scroll & Active Styles --- */
.header {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-color: #e5e5eb;
}
.nav-link.active {
    color: #a9202a !important; /* dki-red */
    font-weight: 600;
}

/* --- Mobile Menu Drawer --- */
@media (max-width: 767px) {
    .nav-menu {
        position: fixed;
        top: 5rem; /* h-20 */
        left: -100%;
        width: 100%;
        height: calc(100vh - 5rem);
        background: white;
        display: flex !important; /* Force flex display so it ignores 'hidden' class on mobile */
        flex-direction: column;
        align-items: center;
        padding-top: 3rem;
        gap: 2rem;
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        border-top: 1px solid #e5e5eb;
        z-index: 40;
    }
    .nav-menu.active {
        left: 0;
    }
}

/* --- Filter Tag Active State --- */
.filter-tag.active {
    background-color: #a9202a !important; /* dki-red */
    color: white !important;
}

/* --- Modal Transitions --- */
.modal {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal.active .modal-content {
    transform: scale(1);
}

/* --- Toast Transitions --- */
.toast {
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.toast.active {
    transform: translateY(0);
}

/* --- Smooth Hover Transitions --- */
.transition-all-300 {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Product Image Slider (Multi-Image Hover/Touch) --- */
.product-slider-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    border-radius: 0.25rem;
}
.product-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-slider-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Dots indicator styling */
.product-slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #d9d9e1;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
/* Active dot states */
.product-slider-dot.active {
    background-color: #0d47a1; /* dki-blue active */
    transform: scale(1.3);
}

/* ========================================
   MOBILE-FRIENDLY ENHANCEMENTS
   ======================================== */

/* Touch-friendly tap targets - minimum 44x44px */
@media (max-width: 767px) {
    a, button {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Header mobile fixes */
    .header .h-20 {
        height: 4rem;
    }
    .nav-menu {
        top: 4rem !important;
        height: calc(100vh - 4rem) !important;
    }
    .nav-menu a {
        font-size: 1.125rem;
        padding: 0.75rem 1.5rem;
        width: 100%;
        justify-content: center;
    }

    /* Footer stacked & centered on mobile */
    footer .grid {
        text-align: center;
    }
    footer .grid > div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    footer .flex.items-start,
    footer .flex.items-center {
        justify-content: center;
    }
    footer p.flex {
        justify-content: center;
    }

    /* Modal full-screen on mobile */
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
        margin: 1rem;
        padding: 1.5rem !important;
    }

    /* Product cards - better spacing */
    .catalog-card {
        margin-bottom: 0.5rem;
    }

    /* Bigger touch targets for phone/email links in footer */
    footer a[href^="tel:"],
    footer a[href^="mailto:"] {
        padding: 0.5rem 0;
        font-size: 1rem;
    }

    /* Toast notification mobile position */
    .toast {
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
        max-width: none;
    }
}

/* Small phone screens */
@media (max-width: 380px) {
    .hero-heading,
    h1 {
        font-size: 1.75rem !important;
    }
    .hero-subtext {
        font-size: 0.875rem !important;
    }
}

/* Sticky mobile call-to-action bar */
.mobile-cta-bar {
    display: none;
}
@media (max-width: 767px) {
    .mobile-cta-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 50;
        background: #1a1a23;
        border-top: 2px solid #a9202a;
        padding: 0.5rem 1rem;
        gap: 0.5rem;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    }
    .mobile-cta-bar a {
        flex: 1;
        text-align: center;
        padding: 0.75rem;
        border-radius: 0.375rem;
        font-weight: 600;
        font-size: 0.875rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        justify-content: center;
    }
    /* Add bottom padding to body so content isn't hidden behind CTA bar */
    body {
        padding-bottom: 4.5rem;
    }
}

/* Prevent horizontal overflow on mobile */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Smooth touch scrolling */
* {
    -webkit-tap-highlight-color: transparent;
}

/* --- Enhance Product Catalog Cards to Make Photos Larger --- */
.catalog-card > div:first-child {
    padding: 1rem !important; /* Reduce card padding from 1.5rem (p-6) to 1rem (p-4) */
}
@media (min-width: 640px) {
    .catalog-card > div:first-child {
        padding: 1.25rem !important; /* 20px (p-5) on larger screens */
    }
}

.catalog-card [class*="aspect-"],
.catalog-card > div:first-child > div:first-child {
    padding: 0.375rem !important; /* Reduce inner padding around product photos from 1rem (p-4) to 0.375rem (p-1.5) to make photos bigger */
    margin-bottom: 1rem !important; /* Reduce margin-bottom from 1.5rem (mb-6) to 1rem (mb-4) to give more vertical space to photo */
}

/* Adjust slider slide padding as well if used dynamically */
.product-slider-slide {
    padding: 0.375rem !important;
}

/* Card footer responsive padding */
.catalog-card > div:last-child {
    padding: 0.75rem 1rem !important; /* Reduce footer padding from px-6 py-4 to px-4 py-3 on mobile/tablet */
}
@media (min-width: 768px) {
    .catalog-card > div:last-child {
        padding: 1rem 1.5rem !important; /* Restore normal padding on larger screens */
    }
}

/* Card title responsive sizing to prevent excessive wrapping */
.catalog-card h3 {
    font-size: 0.875rem !important; /* text-sm (14px) on mobile/tablet */
    line-height: 1.25rem !important;
}
@media (min-width: 640px) {
    .catalog-card h3 {
        font-size: 1rem !important; /* text-base (16px) on desktop */
        line-height: 1.5rem !important;
    }
}
