/* 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:var(--card-radius); overflow:hidden; box-shadow:0 10px 24px rgba(16,24,40,.08); background:#f8f9fa}
.gallery-media{position:relative; width:100%; aspect-ratio: 4/3;}
.gallery-media img{width:100%; height:100%; object-fit:cover; display:block;}
.gallery-badge{position:absolute; left:12px; top:12px; background:rgba(255,255,255,.85); border:1px solid rgba(0,0,0,.08); border-radius:999px; padding:.25rem .6rem; font-size:.75rem}
.gallery-overlay{position:absolute; inset:0; display:flex; align-items:flex-end; justify-content:space-between; padding:16px; background:linear-gradient(to top, rgba(16,24,40,.55) 0%, rgba(16,24,40,.15) 40%, rgba(16,24,40,0) 80%); color:#fff; opacity:0; transition:.25s; pointer-events:none}
.gallery-card:hover .gallery-overlay{opacity:1}
.overlay-info{backdrop-filter:blur(var(--overlay-blur)); background:var(--overlay-bg); border:1px solid rgba(255,255,255,.15); border-radius:12px; padding:.5rem .75rem; max-width:76%;}
.overlay-title{font-weight:600; font-size:1rem; line-height:1.2}
.overlay-meta{font-size:.8rem; opacity:.85}
.overlay-actions{display:flex; align-items:center; gap:.5rem}
.overlay-btn{display:inline-flex; align-items:center; gap:.3rem; border:1px solid rgba(255,255,255,.7); color:#fff; padding:.35rem .7rem; border-radius:10px; background:transparent; transition:.2s; text-decoration:none; pointer-events:auto}
.overlay-btn:hover{background:rgba(255,255,255,.12)}
.view-toggle .btn{border-radius:999px}
.gallery-info{position:relative; margin:0; padding:14px 16px; background:linear-gradient(180deg,#ffffff 0%,#f9fafb 100%); border-top:1px solid rgba(0,0,0,.06); border-left:0; border-right:0; border-bottom:0; border-radius:0; box-shadow:none}
.gallery-info::before{content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:linear-gradient(180deg, var(--primary-color), var(--accent-color)); opacity:.85}
.gallery-card:hover .gallery-info{box-shadow:none; transform:none}
.info-title{font-size:1.06rem; font-weight:700; letter-spacing:.02em; color:#0f172a; margin-bottom:6px}
.info-desc{font-size:.92rem; color:#475569; line-height:1.55; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
.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}
}
