/* Extracted from products.php: $pageCSS and inline <style> */
.products-hero {
    background: linear-gradient(135deg, var(--primary-color), #1e3a8a);
    color: white;
    padding: 120px 0 80px;
}

.products-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width=\"60\" height=\"60\" viewBox=\"0 0 60 60\" xmlns=\"http://www.w3.org/2000/svg\"%3E%3Cg fill=\"none\" fill-rule=\"evenodd\"%3E%3Cg fill=\"%23ffffff\" fill-opacity=\"0.05\"%3E%3Ccircle cx=\"30\" cy=\"30\" r=\"2\"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}

.products-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.category-filter {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 40px;
}

.category-btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    background: #f8f9fa;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.4;
}

.product-description {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-color);
}

.product-btn {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.product-btn:hover {
    background: #1e3a8a;
    color: white;
    transform: translateX(5px);
}

.pagination-wrapper { display: flex; justify-content: center; margin-top: 20px; }
.pagination { display: flex; list-style: none; padding: 0; margin: 0; gap: 10px; }
.pagination li { display: flex; }
.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    background: white;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.pagination a:hover,
.pagination .current { background: var(--primary-color); color: white; border-color: var(--primary-color); }
.no-products { text-align: center; padding: 80px 20px; color: var(--text-light); }
.no-products i { font-size: 4rem; margin-bottom: 20px; opacity: 0.5; }

@media (max-width: 768px) {
    .products-hero h1 { font-size: 2.5rem; }
    .category-filter { padding: 20px; text-align: center; }
    .category-btn { display: block; margin: 10px 0; }
    .product-image { height: 200px; }
}

/* Inline <style> block extracted from products.php */
:root{
    --grid-gap: 16px;
    --card-radius: 16px;
    --overlay-bg: rgba(16,24,40,.55);
    --overlay-blur: 8px;
}
.products-toolbar{position:sticky; top:0; z-index:5; backdrop-filter:saturate(160%) blur(6px); background:rgba(255,255,255,.72); border-bottom:1px solid rgba(0,0,0,.06)}
.products-toolbar .container-fluid{padding:.75rem 1rem; display:flex; align-items:center; gap:.75rem; justify-content:space-between}
.toolbar-left{display:flex; align-items:center; gap:.5rem; overflow-x:auto; padding-bottom:.25rem; flex-wrap:nowrap; scrollbar-width: none; -ms-overflow-style: none;}
.toolbar-left::-webkit-scrollbar { display: none; }
.category-chip{display:inline-flex; align-items:center; gap:.35rem; border:1px solid #dee2e6; color:#495057; padding:.35rem .75rem; border-radius:999px; white-space:nowrap; background:#fff; transition:.2s; text-decoration:none; flex:0 0 auto}
.category-chip.active{background:#0d6efd; color:#fff; border-color:#0d6efd}
.category-chip:hover{transform:translateY(-1px)}
.category-dropdown-container { position: sticky; right: 0; display: inline-block; background: white; z-index: 10; padding-left: 8px; box-shadow: -4px 0 8px -4px rgba(0,0,0,0.1); }
.category-dropdown-menu { display: none; position: absolute; top: 100%; right: 0; min-width: 220px; background: white; border: 1px solid #dee2e6; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); padding: 8px; z-index: 1000; margin-top: 8px; flex-direction: column; gap: 4px; animation: fadeIn 0.2s ease-out; }
.category-dropdown-container:hover .category-dropdown-menu,
.category-dropdown-container.show .category-dropdown-menu,
.category-dropdown-container:focus-within .category-dropdown-menu { display: flex; }

/* Portal Dropdown Styles (Multi-column support) */
.category-dropdown-portal {
    display: grid !important;
    grid-template-rows: repeat(6, auto);
    grid-auto-flow: column;
    gap: 4px 24px;
    width: max-content;
    max-width: 90vw;
    position: fixed;
    z-index: 9999;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 8px;
    margin-top: 0;
    animation: fadeIn 0.2s ease-out;
}

@media (max-width: 768px) {
    .category-dropdown-portal {
        display: flex !important;
        flex-direction: column;
        width: auto;
        min-width: 200px;
        max-height: 60vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
        gap: 4px;
    }
}
.category-chip.dropdown-toggle { cursor: pointer; }
.dropdown-item { display: block; padding: 8px 16px; color: #495057; text-decoration: none; border-radius: 8px; transition: background 0.2s; font-size: 0.95rem; white-space: normal; }
.dropdown-item:hover { background: #f8f9fa; color: #0d6efd; }
.dropdown-item.active { background: #e7f1ff; color: #0d6efd; font-weight: 500; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.products-counter{display:none}
.products-gallery{padding:8px 0}
.gallery-grid{display:grid; grid-template-columns:repeat(3, 1fr); gap:var(--grid-gap); min-height:auto}
@media (max-width: 991.98px){ .gallery-grid{grid-template-columns:repeat(2, 1fr);} }
@media (max-width: 575.98px){ .gallery-grid{grid-template-columns:1fr;} }
.gallery-card{position:relative; border-radius:12px; overflow:hidden; background:#fff; display:flex; flex-direction:column; height:100%; border: 1px solid #e5e7eb; transition: all 0.3s ease; box-shadow: 0 4px 12px rgba(0,0,0,0.03); cursor: pointer;}
.gallery-card:hover{transform: translateY(-4px); box-shadow: 0 12px 24px rgba(220, 53, 69, 0.12); border-color: #dc3545;}
.gallery-media{position:relative; width:100%; aspect-ratio: 4/3; background:#f8f9fa;}
.gallery-media img{width:100%; height:100%; object-fit:cover; display:block; transition:transform 0.3s ease;}
.gallery-card:hover .gallery-media img{transform:scale(1.02);}
.gallery-media:hover img{transform:scale(1.02);}
.gallery-info{position:relative; margin:0; padding:1.25rem; background:#fff; border-top:1px solid #f3f4f6; border-left:0; border-right:0; border-bottom:0; border-radius:0; box-shadow:none; flex:1; display:flex; flex-direction:column;}
.gallery-info::before{display:none;}
.gallery-card:hover .gallery-info{box-shadow:none; transform:none}
.info-title{font-weight:700; font-size:1.25rem; color:#111827; margin-bottom:0.5rem; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:calc(1.4em * 2); transition:color 0.2s ease; text-align:left;}
.gallery-card:hover .info-title{color:#dc3545;}
.info-desc{margin-top:0; margin-bottom:1rem; font-size:0.95rem; color:#374151; line-height:1.6; text-align:left; flex-grow:1; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:calc(1.6em * 2);}
.info-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #f3f4f6; padding-top: 0.75rem; }
.info-footer small { color: #9ca3af; font-size: 0.85rem; max-width: calc(100% - 120px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info-footer .category-text { color: #6b7280; font-weight: 500; }
.info-footer .action-buttons { display: flex; gap: 8px; flex-shrink: 0; }
.info-footer .inquiry-btn { white-space: nowrap; padding: 4px 12px; font-size: 0.85rem; border-radius: 6px; background: #dc3545; color: #fff; border: 1px solid #dc3545; transition: all 0.2s; text-decoration: none; }
.info-footer .inquiry-btn:hover { background: #bb2d3b; border-color: #bb2d3b; }
.info-footer .view-btn { white-space: nowrap; padding: 4px 12px; font-size: 0.85rem; border-radius: 6px; color: #dc3545; border: 1px solid #dc3545; background: transparent; transition: all 0.2s; text-decoration: none; }
.info-footer .view-btn:hover, .gallery-card:hover .info-footer .view-btn { background: #dc3545; color: #fff; }
.search-form{display:flex; gap:10px; max-width:400px}
.search-input{flex:1; padding:10px 16px; border:1px solid #dee2e6; border-radius:999px; outline:none; transition:border-color .2s}
.search-input:focus{border-color:var(--primary-color)}
.search-btn{padding:10px 18px; background:var(--primary-color); color:#fff; border:none; border-radius:999px; cursor:pointer}
@media (max-width: 768px){
  .products-toolbar .container-fluid{flex-wrap:wrap; gap:.5rem; justify-content:flex-start}
  .toolbar-left{flex:1 1 100%; overflow-x:auto; -webkit-overflow-scrolling:touch}
  .search-form{max-width:100%; width:100%; flex:1 1 100%; order:2}
  .search-input{flex:1 1 auto}
  .search-btn{flex:0 0 auto}
}
