/* --- START OF FILE product-pages.css --- */
/* Shared styles for product category pages (products-*.html) */

/* --- Product Filtering Tabs --- */
.subcategory-tabs-container {
    margin-bottom: 3rem;
    overflow-x: auto; /* Allow horizontal scrolling on small screens */
    white-space: nowrap; /* Keep tabs on one line */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    padding-bottom: 1rem; /* Space for scrollbar */
    border-bottom: 1px solid var(--border-color);
    text-align: center; /* Center the inline-flex container */
}
:root.dark-mode .subcategory-tabs-container { border-bottom-color: var(--border-color-dark); }
/* Hide scrollbar visually but keep functionality */
.subcategory-tabs-container::-webkit-scrollbar { display: none; }
.subcategory-tabs-container { -ms-overflow-style: none; scrollbar-width: none; }

.subcategory-tabs-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex; /* Allow centering */
    gap: 0.8rem;
}
.subcategory-tab-item { display: inline-block; } /* Needed for nowrap */
.subcategory-tab-button {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted-color);
    padding: 0.7em 1.5em;
    border-radius: 25px; /* Pill shape */
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    white-space: nowrap; /* Prevent text wrapping */
}
.subcategory-tab-button i,
.subcategory-tab-button img { /* Include img for BCT logo */
    font-size: 1em;
    vertical-align: middle; /* Align icons/images nicely */
    margin-inline-end: 4px; /* Space between icon and text */
}
:root.dark-mode .subcategory-tab-button {
    border-color: var(--border-color-dark);
    color: var(--text-muted-color-dark);
}
.subcategory-tab-button:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}
:root.dark-mode .subcategory-tab-button:hover {
    background-color: var(--bg-light-dark);
    color: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
}
.subcategory-tab-button.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 90, 156, 0.2);
}
:root.dark-mode .subcategory-tab-button.active {
    background-color: var(--primary-color-dark);
    color: #111;
    border-color: var(--primary-color-dark);
     box-shadow: 0 2px 5px rgba(77, 171, 247, 0.2);
}

/* --- Product Showcase Grid & Cards --- */
.products-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); /* Adjusted minmax slightly */
    gap: var(--grid-gap);
}
.product-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-base);
    position: relative; /* For badge positioning */
}
:root.dark-mode .product-card {
    background-color: var(--card-bg-dark);
    border-color: var(--border-color-dark);
    box-shadow: var(--box-shadow-dark);
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}
:root.dark-mode .product-card:hover {
    box-shadow: var(--box-shadow-hover-dark);
}
.product-image {
    height: 210px; /* Slightly adjusted height */
    overflow: hidden;
    background-color: #fff; /* White background for better product visibility */
    position: relative; /* For badge */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem; /* Small padding around image */
    border-bottom: 1px solid var(--border-color);
}
:root.dark-mode .product-image {
    background-color: var(--bg-light); /* Use light bg even in dark mode for contrast */
    border-bottom-color: var(--border-color-dark);
}
.product-image img {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.4s ease;
}
.product-card:hover .product-image img {
    transform: scale(1.05);
}
.product-category-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background-color: rgba(0, 90, 156, 0.8); /* Use primary with alpha */
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: calc(var(--border-radius) / 2);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
    text-transform: capitalize; /* Capitalize subcategory names */
}
html[lang="en"] .product-category-badge { left: 0.8rem; right: auto; }
:root.dark-mode .product-category-badge { background-color: rgba(77, 171, 247, 0.8); color: #111; }
.product-category-badge i { font-size: 0.9em; }


.product-content {
    padding: 1.25rem; /* Adjusted padding */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.product-brand {
    font-size: 0.8rem; /* Smaller brand */
    font-weight: 600;
    color: var(--text-muted-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}
:root.dark-mode .product-brand { color: var(--text-muted-color-dark); }
.product-name {
    font-size: 1.1rem; /* Slightly smaller */
    color: var(--text-color); /* Use standard text color */
    margin-bottom: 0.6rem;
    line-height: 1.3;
    font-weight: 600; /* Less bold */
    min-height: 2.6em; /* Ensure space for 2 lines */
}
:root.dark-mode .product-name { color: var(--text-color-dark); }
.product-description {
    font-size: 0.9rem;
    color: var(--text-muted-color);
    margin-bottom: 1.2rem;
    line-height: 1.5;
    flex-grow: 1; /* Push button down */
    /* Limit description lines */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.7em; /* Approx height for 2 lines */
}
:root.dark-mode .product-description { color: var(--text-muted-color-dark); }
.product-cta {
    margin-top: auto; /* Push to bottom */
    align-self: center; /* Center button */
    width: 90%; /* Make button wider */
    max-width: 200px; /* Max width */
}

/* Optional: Link back to all categories */
.back-to-categories {
     margin-top: 3rem;
     text-align: center;
}
.back-to-categories .btn {
     /* Uses base styles */
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .products-showcase-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1.5rem;
    }
     .product-card { padding: 1rem; }
     .product-name { font-size: 1rem; }
     .product-description { font-size: 0.85rem; }
     .subcategory-tab-button { padding: 0.6em 1.2em; font-size: 0.9rem; }
}

/* --- END OF FILE product-pages.css --- */