/* ========================================= */
/* 1. HERO SECTION (Shared by all pages)     */
/* ========================================= */
.inventory-hero {
    /* 1. Dark Overlay + Background Image */
    background: url('/assets/productspage-img/productherosectionbg.jpg');
    
    /* 2. Image Positioning */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* 3. Spacing (Adjust as needed) */
    padding: 100px 0;
    text-align: center;
    color: #fff;
    border-bottom: 1px solid #333;
}

.inventory-hero.small-hero {
    padding: 150px 0 50px 0; /* Smaller hero for sub-pages */
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.stroke {
    -webkit-text-stroke: 1px #fff;
    color: transparent;
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    transition: 0.3s;
}

.back-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* ========================================= */
/* 2. GRID LAYOUT SYSTEM                     */
/* ========================================= */
.catalog-section {
    padding: 80px 0 120px 0;
    background-color: #050505;
}

.grid-layout {
    display: grid;
    /* Automatically fits cards (min 350px wide) */
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
    gap: 30px;
    padding: 0 20px;
}

/* ========================================= */
/* 3. CATEGORY CARDS (For Main Products Page)*/
/* ========================================= */
.category-card {
    background: #111;
    border: 1px solid #333;
    padding: 50px 40px;
    text-decoration: none;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

/* Hover Effect: Turns Orange */
.category-card:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(230, 81, 0, 0.2);
}

.category-card h2 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-weight: 800;
    transition: color 0.3s;
}

.category-card p {
    color: #888;
    margin-bottom: 30px;
    line-height: 1.5;
    font-size: 1rem;
    transition: color 0.3s;
}

/* Text turns black on hover for contrast */
.category-card:hover h2,
.category-card:hover p {
    color: white;
}

.btn-arrow {
    display: inline-block;
    font-weight: 900;
    color: var(--accent-gold);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.category-card:hover .btn-arrow {
    color: var(--accent-gold); /* Black arrow on orange */
}

/* ========================================= */
/* 4. STATIC PRODUCT CARDS (For Sub-Pages)   */
/* ========================================= */
.product-card {
    /* Container for the card */
    position: relative;
}

.static-card {
    background: #0f0f0f;
    border: 1px solid #222;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%; /* Ensures equal height in grid */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.static-card:hover {
    border-color: var(--accent);
    background: #141414;
}

.static-card h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.static-card .grade {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.view-btn {
    background: transparent;
    border: 1px solid #444;
    color: #fff;
    padding: 10px 25px;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.static-card:hover .view-btn {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ========================================= */
/* 5. POPUP MODAL STYLES                     */
/* ========================================= */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9); /* Very dark overlay */
    z-index: 9999; /* Top of everything */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px); /* Blurs the background page */
    padding: 20px;
}

/* Update this section to make the card smaller */
/* Update this section */
.modal-content {
    background: #111;
    border: 1px solid #333;
    border-top: 4px solid var(--accent);
    
    /* 1. INCREASE WIDTH */
    max-width: 900px;    /* Increased from 450px to 900px */
    width: 95%;          /* Takes up almost full screen width */
    
    /* 2. REDUCE HEIGHT (Less Padding) */
    padding: 20px;       /* Reduced from 50px to 20px */
    
    position: relative;
    color: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.4s ease-out;
}

@keyframes modalSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2.5rem;
    line-height: 0.8;
    cursor: pointer;
    color: white;
    transition: 0.3s;
}

.close-modal:hover {
    color: white;
}

/* Modal Typography */
#m-title {
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 800;
}

.m-desc {
    font-size: 1.1rem;
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 90%;
}

/* Specs Box inside Modal */
.specs-box {
    background: #1a1a1a;
    padding: 25px;
    border-left: 3px solid var(--accent);
    margin-bottom: 35px;
}

.specs-box h4 {
    color: var(--accent-gold);
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.specs-box p {
    color: #ddd;
    font-family: 'Courier New', monospace; /* Tech/Industrial font */
    line-height: 1.8;
    font-size: 0.95rem;
}

.modal-contact-btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 15px 40px;
    text-decoration: none;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: 0.3s;
}

.modal-contact-btn:hover {
    background: #fff;
    color: var(--accent);
}

/* ========================================= */
/* 6. RESPONSIVE MOBILE STYLES               */
/* ========================================= */
@media (max-width: 768px) {
    .inventory-hero {
        padding: 120px 0 40px 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .grid-layout {
        grid-template-columns: 1fr; /* Stack cards on mobile */
    }

    .category-card {
        min-height: auto;
        padding: 40px 25px;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
    
    #m-title {
        font-size: 1.8rem;
    }
}

/* ========================================= */
/* FIX: TEXT COLOR ON HOVER (Force White)    */
/* ========================================= */

/* 1. Reset the main text color on hover */
.stack-card:hover .card-body {
    color: #ffffff !important; /* Forces main text white */
}

/* 2. Force specific text elements to stay white */
.stack-card:hover .card-body h3, 
.stack-card:hover .card-body p, 
.stack-card:hover .card-body .spec .value {
    color: #ffffff !important;
}

/* 3. Handle the labels (usually grey, now make them white or light grey) */
.stack-card:hover .card-body .spec .label {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* 4. Handle the "Card Category" (Cyan text) */
/* If you want this to stay Cyan, do nothing. 
   If you want it White too, add this: */
.stack-card:hover .card-body .card-category {
    color: #ffffff !important;
}

/* 5. Handle the big background number */
.stack-card:hover .card-body .card-number {
    color: rgba(255, 255, 255, 0.2) !important;
}