/* ==========================================
   Products Overview Page Styles
   ========================================== */

.product-hero-page {
    min-height: 100vh !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-block: 6rem;
}

.product-hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    flex-wrap: nowrap;
    width: 100%;
}

.product-hero-content {
    flex: 0 0 55%;
    text-align: left;
}

.product-hero-content p {
    max-width: 500px !important;
}

.product-hero-image {
    flex: 0 0 40%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
}

.product-hero-image img {
    width: 125%; /* Increased scale by 25% */
    max-width: none;
    position: relative;
    z-index: 1;
    object-fit: contain;
}

@media (max-width: 768px) {
    .product-hero-container {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: flex-start !important; /* Force left alignment of children */
        gap: 0 !important;
        height: auto !important;
        min-height: auto !important;
        width: 100% !important;
    }
    
    .product-hero-content {
        display: flex !important;
        flex-direction: column !important;
        text-align: left !important; /* Force text to align left */
        height: auto !important;
        width: 100% !important;
        padding: 0 !important; /* Removed excess padding to rely on .container */
        flex: none !important;
        margin: 0 !important;
        margin-top: 0 !important; /* Clearance under header */
    }

    .product-hero-content h1,
    .product-hero-content #hero-title,
    .product-hero-content #products-headline {
        line-height: 1.15 !important;
        margin-bottom: 1.5rem !important; /* Detach the paragraph slightly */
        margin-left: 0 !important;
    }

    .product-hero-content p {
        margin-bottom: 3rem !important; /* Creates a distinct visual break between text and image */
        margin-left: 0 !important;
    }

    .product-hero-image {
        margin: 0 !important;
        margin-top: 2.5rem !important; /* De-crowd the layout */
        flex: none !important;
        width: 100% !important;
    }

    .product-hero-image img {
        max-width: 100% !important;
        height: auto !important;
        max-height: 45vh !important;
        object-fit: contain !important;
        display: block !important;
        margin: 0 auto !important;
    }

    .product-hero-page {
        height: auto !important;
        min-height: auto !important;
        padding-top: 7rem !important; /* Increased to completely clear the logo/navbar */
        padding-bottom: 4rem !important; /* Healthy bottom padding */
    }
}

.product-page-block {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-block: 2rem;
}

.product-section {
    padding-block: 8rem 5rem;
    min-height: 100vh;
}

.product-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--color-brand-primary);
    color: var(--primary-bg);
    border-color: var(--color-brand-primary);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Products Page Mobile Optimizations ── */
@media (max-width: 768px) {
    .product-hero-page {
        min-height: auto;
        padding-block: 6rem 2rem;
    }

    .product-page-block {
        padding-block: 1rem;
    }

    .product-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .product-card {
        padding: 1.25rem;
    }

    .product-card img {
        height: 120px;
    }

    .product-card h3 {
        min-height: auto;
        font-size: 1.1rem;
    }

    .product-card p {
        min-height: auto;
    }
}

.product-card {
    background-color: var(--color-bg-dark) !important;
    border: none;
    border-radius: 1.5rem;
    padding: 1.5rem;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.product-card h3 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--text-main);
    min-height: 3.5rem;
    /* Ensures descriptions start at same position */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin: 0;
    min-height: 3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card:hover {
    background-color: var(--color-card-dark) !important;
    border-color: rgba(var(--rgb-brand-primary), 0.5) !important;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.product-sku {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-brand-primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.product-card img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(var(--rgb-brand-primary), 0.1));
}


/* Products Overview Page Specifics */
#products-headline {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1rem;
    text-wrap: wrap;
    letter-spacing: -0.03em;
}

#products-subheadline {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    opacity: 0.8;
}

.product-card .info-btn:hover {
    border-color: var(--color-brand-primary) !important;
    background-color: rgba(var(--rgb-brand-primary), 0.1) !important;
    box-shadow: 0 0 15px rgba(var(--rgb-brand-primary), 0.2) !important;
}

/* ==========================================
   Lab Monitor Macro Grid
   ========================================== */
.macro-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.macro-card {
    background: var(--bg-white);
    border: 1px solid var(--color-gray-200);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.macro-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.macro-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.macro-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* CSS filter to turn white/black into Brand Green (var(--color-brand-primary)) */
    filter: brightness(0) saturate(100%) invert(65%) sepia(77%) saturate(382%) hue-rotate(85deg) brightness(87%) contrast(87%);
}

.macro-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.macro-desc {
    color: var(--color-gray-400);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .macro-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .macro-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Lab Monitor Software Integration
   ========================================== */
.software-section {
    background-color: var(--color-bg-dark);
    color: var(--text-white);
}

.software-header {
    text-align: center;
    margin-bottom: 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.software-title {
    color: var(--text-white);
    margin-bottom: 1.5rem;
    width: 100%;
}

.software-subtitle {
    color: var(--color-gray-400);
    max-width: 100%;
    line-height: 1.6;
    margin: 0;
}

.software-feature-row {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 6rem;
}

.software-feature-row:nth-child(even) {
    flex-direction: row-reverse;
}

.software-feature-content {
    flex: 1;
}

.software-feature-content h3 {
    font-size: 2rem;
    color: var(--text-white);
    margin-bottom: 1rem;
}

.software-feature-content p {
    color: var(--color-gray-400);
    line-height: 1.7;
    font-size: 1.05rem;
}

.software-feature-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.software-compliance {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 4rem 3rem;
    text-align: center;
    margin-top: 2rem;
}

.software-compliance h3 {
    font-size: 1.8rem;
    color: var(--text-white);
    margin-bottom: 1rem;
}

.software-compliance p {
    color: var(--color-gray-400);
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 992px) {
    .software-feature-row, .software-feature-row:nth-child(even) {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }
}

/* ==========================================
   Lab Monitor Specifications
   ========================================== */
.spec-section {
    background-color: var(--bg-white);
}

.spec-header {
    text-align: left;
    margin-bottom: 4rem;
}

.spec-header-title {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.spec-header-desc {
    color: var(--color-gray-400);
    max-width: 100%;
    line-height: 1.6;
    margin: 0;
    text-align: left;
}

.spec-table-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 2rem auto 0 auto;
    overflow-x: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    border: 1px solid var(--color-gray-200);
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* Ensures horizontal scroll on small devices */
    text-align: left;
}

.spec-table thead {
    background-color: var(--bg-off-white);
}

.spec-table th, .spec-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-gray-200);
    color: var(--color-gray-400);
}

.spec-table th {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.spec-table tbody tr:last-child td {
    border-bottom: none;
}

.spec-table tbody tr {
    transition: background-color 0.2s ease;
}

.spec-table tbody tr:hover {
    background-color: var(--bg-off-white);
}
