/* products.css — Products listing & category pages */

/* ── Filter Bar ───────────────────────────────────────── */
.pf-bar-wrap {
    background: #fff;
    border-bottom: 1px solid var(--utl-line);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(15,37,64,.06);
}

.pf-bar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 14px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.pf-bar::-webkit-scrollbar { display: none; }

.pf-tab {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: .82rem;
    font-weight: 600;
    color: #4a5568;
    background: var(--utl-bg);
    border: 1.5px solid transparent;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}

.pf-tab:hover {
    background: #e8f0f8;
    color: var(--utl-navy);
    border-color: #c8d8e8;
}

.pf-tab.active {
    background: var(--utl-navy);
    color: #fff;
    border-color: var(--utl-navy);
    box-shadow: 0 4px 12px rgba(15,37,64,.2);
}

.pf-tab.pf-child {
    font-size: .78rem;
    font-weight: 500;
    padding: 7px 14px;
    background: #f8fafc;
    color: #718096;
}

.pf-tab.pf-child.active {
    background: var(--utl-red);
    border-color: var(--utl-red);
    color: #fff;
}

/* ── Sub-category pills ───────────────────────────────── */
.pf-sub-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.pf-sub-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--utl-navy);
    background: var(--utl-bg);
    border: 1.5px solid var(--utl-line);
    text-decoration: none;
    transition: all .18s;
}

.pf-sub-pill:hover,
.pf-sub-pill.active {
    background: var(--utl-red);
    color: #fff;
    border-color: var(--utl-red);
}

/* ── Page Section ─────────────────────────────────────── */
.products-pg-section { padding-top: 40px; }

/* ── Header Row ───────────────────────────────────────── */
.pf-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 12px;
    flex-wrap: wrap;
}

.pf-header h2 {
    margin: 0 0 4px;
    font-size: 1.55rem;
    color: var(--utl-navy);
}

.pf-count {
    margin: 0;
    font-size: .83rem;
    color: var(--utl-muted);
}

.pf-count-num {
    font-weight: 700;
    color: var(--utl-red);
}

/* View toggle */
.pf-view-toggle {
    display: flex;
    gap: 4px;
    background: var(--utl-bg);
    border-radius: 10px;
    padding: 4px;
    border: 1px solid var(--utl-line);
}

.pf-view-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #a0aec0;
    cursor: pointer;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

.pf-view-btn.active,
.pf-view-btn:hover {
    background: #fff;
    color: var(--utl-navy);
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

/* ── Product Grid ─────────────────────────────────────── */
.pf-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    transition: all .3s;
}

/* ── Product Card ─────────────────────────────────────── */
.pf-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--utl-line);
    display: flex;
    flex-direction: column;
    transition: box-shadow .25s, transform .25s;
    position: relative;
}

.pf-card:hover {
    box-shadow: 0 16px 48px rgba(15,37,64,.11);
    transform: translateY(-5px);
}

/* Image area */
.pf-card-img {
    display: block;
    position: relative;
    height: 210px;
    overflow: hidden;
    background: linear-gradient(135deg, #edf2f7, #e2eaf3);
    flex-shrink: 0;
}

.pf-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s cubic-bezier(.25,.46,.45,.94);
}

.pf-card:hover .pf-card-img img {
    transform: scale(1.07);
}

/* Placeholder when no image */
.pf-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    color: #c0cfe0;
}

/* Category tag overlaid on image */
.pf-card-cat-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(10,25,47,.72);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* Hover overlay */
.pf-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,37,64,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s;
    z-index: 3;
}

.pf-card:hover .pf-card-overlay { opacity: 1; }

.pf-card-overlay span {
    color: #fff;
    font-size: .88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,.15);
    border: 1.5px solid rgba(255,255,255,.35);
    border-radius: 24px;
    padding: 9px 20px;
    backdrop-filter: blur(4px);
}

/* Card body */
.pf-card-body {
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0;
}

.pf-card-name {
    margin: 0 0 8px;
    font-size: .98rem;
    line-height: 1.35;
}

.pf-card-name a {
    color: var(--utl-navy);
    text-decoration: none;
    font-weight: 700;
    transition: color .15s;
}

.pf-card-name a:hover { color: var(--utl-red); }

/* 2-line description clamp */
.pf-card-desc {
    margin: 0 0 16px;
    font-size: .8rem;
    color: #718096;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Action buttons */
.pf-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--utl-line);
}

.pf-btn-view,
.pf-btn-enq {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .18s;
    white-space: nowrap;
}

.pf-btn-view {
    background: var(--utl-bg);
    color: var(--utl-navy);
    border: 1.5px solid var(--utl-line);
}

.pf-btn-view:hover {
    background: var(--utl-navy);
    color: #fff;
    border-color: var(--utl-navy);
}

.pf-btn-enq {
    background: var(--utl-red);
    color: #fff;
    border: 1.5px solid var(--utl-red);
}

.pf-btn-enq:hover {
    background: #a93226;
    border-color: #a93226;
}

/* ── LIST VIEW MODE ───────────────────────────────────── */
.pf-grid.pf-list {
    grid-template-columns: 1fr;
    gap: 14px;
}

.pf-grid.pf-list .pf-card {
    flex-direction: row;
    border-radius: 14px;
    transform: none !important;
}

.pf-grid.pf-list .pf-card-img {
    width: 180px;
    height: auto;
    min-height: 140px;
    flex-shrink: 0;
    border-radius: 14px 0 0 14px;
}

.pf-grid.pf-list .pf-card-body {
    padding: 20px 22px;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.pf-grid.pf-list .pf-card-name { flex: 1 1 100%; }
.pf-grid.pf-list .pf-card-desc { flex: 1 1 100%; }
.pf-grid.pf-list .pf-card-actions { flex: 0 0 auto; border-top: none; padding-top: 0; }

/* ── Empty State ──────────────────────────────────────── */
.pf-empty {
    text-align: center;
    padding: 72px 20px;
    background: var(--utl-bg);
    border-radius: 20px;
    border: 1px solid var(--utl-line);
}

.pf-empty-icon {
    font-size: 3rem;
    color: #c0cfe0;
    margin-bottom: 16px;
}

.pf-empty h3 {
    margin: 0 0 8px;
    color: var(--utl-navy);
}

.pf-empty p {
    color: var(--utl-muted);
    margin-bottom: 20px;
}

/* ── CTA Band (shared) ────────────────────────────────── */
.cta-band {
    background: linear-gradient(120deg, var(--utl-navy) 0%, var(--utl-primary) 100%);
    color: #fff;
    border-radius: 20px;
    padding: 44px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cta-band h2 { margin: 0 0 6px; color: #fff; font-size: 1.6rem; }
.cta-band p  { margin: 0; color: #c5d4e4; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1200px) {
    .pf-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .pf-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-band { flex-direction: column; align-items: flex-start; padding: 28px 24px; }
}

@media (max-width: 575px) {
    .pf-grid { grid-template-columns: 1fr; }
    .pf-card-img { height: 200px; }

    .pf-grid.pf-list .pf-card { flex-direction: column; }
    .pf-grid.pf-list .pf-card-img { width: 100%; height: 180px; border-radius: 14px 14px 0 0; }
    .pf-grid.pf-list .pf-card-body { flex-direction: column; }
    .pf-grid.pf-list .pf-card-actions { width: 100%; border-top: 1px solid var(--utl-line); padding-top: 12px; }
}
