/* =========================================================================
   PRODUCTS PAGE STYLESHEET
   File: assets/css/products.css
   Used by: every category page (restaurant-catering-equipment.php, etc.)
            + include/product-sidebar.php
   Namespacing: every class is prefixed "prod-" to avoid clashing with the
   rest of the theme's CSS.
   ========================================================================= */

:root{
    --prod-accent:#f0800a;
    --prod-accent-dark:#d8700a;
    --prod-accent-tint:#fdecd9;
    --prod-ink:#22262b;
    --prod-muted:#8a8f98;
    --prod-border:#ececec;
    --prod-bg:#f7f7f8;
    --prod-radius:14px;
}

.prod-page{
    background:var(--prod-bg);
    padding:46px 0 70px;
}
.prod-page .auto-container{
    max-width:1300px;
    margin:0 auto;
    padding:0 20px;
}

/* ---------------------------------------------------------------------
   Breadcrumb
--------------------------------------------------------------------- */
.prod-breadcrumb{
    font-size:13px;
    color:var(--prod-muted);
    margin-bottom:16px;
}
.prod-breadcrumb a{ color:var(--prod-muted); text-decoration:none; }
.prod-breadcrumb a:hover{ color:var(--prod-accent-dark); }
.prod-breadcrumb span{ color:var(--prod-ink); font-weight:600; }

/* ---------------------------------------------------------------------
   Header row: title + search + mobile filter button
--------------------------------------------------------------------- */
.prod-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:16px;
    margin-bottom:28px;
}
.prod-head__title h1{
    font-size:30px;
    font-weight:700;
    color:var(--prod-ink);
    margin:0 0 6px;
}
.prod-head__title p{
    color:var(--prod-muted);
    margin:0;
    font-size:14.5px;
}
.prod-head__tools{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.prod-search{
    display:flex;
    align-items:center;
    background:#fff;
    border:1px solid var(--prod-border);
    border-radius:10px;
    padding:0 6px 0 14px;
    min-width:260px;
}
.prod-search input{
    border:0;
    outline:0;
    padding:12px 8px;
    flex:1;
    font-size:14px;
    background:transparent;
    min-width:0;
}
.prod-search button{
    border:0;
    background:var(--prod-accent);
    color:#fff;
    width:36px;
    height:36px;
    border-radius:8px;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
}
.prod-search svg{ width:16px; height:16px; stroke:currentColor; fill:none; stroke-width:2; }

.prod-filter-toggle{
    display:none;
    align-items:center;
    gap:8px;
    background:#fff;
    border:1px solid var(--prod-border);
    border-radius:10px;
    padding:10px 16px;
    font-size:14px;
    font-weight:600;
    color:var(--prod-ink);
    cursor:pointer;
}
.prod-filter-toggle svg{ width:16px; height:16px; stroke:currentColor; fill:none; stroke-width:2; }

/* ---------------------------------------------------------------------
   Layout: sidebar + grid
--------------------------------------------------------------------- */
.prod-layout{
    display:grid;
    grid-template-columns:270px 1fr;
    gap:28px;
    align-items:start;
}

/* ---------------------------------------------------------------------
   Sidebar (also used standalone by include/product-sidebar.php)
--------------------------------------------------------------------- */
.prod-sidebar{
    background:#fff;
    border:1px solid var(--prod-border);
    border-radius:var(--prod-radius);
    padding:22px 18px;
    position:sticky;
    top:20px;
}
.prod-sidebar__head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:16px;
}
.prod-sidebar__head h4{
    font-size:13px;
    text-transform:uppercase;
    letter-spacing:.06em;
    color:var(--prod-ink);
    margin:0;
    padding-left:10px;
    border-left:3px solid var(--prod-accent);
}
.prod-sidebar__close{
    display:none;
    border:0;
    background:#f4f5f6;
    width:32px;
    height:32px;
    border-radius:8px;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    color:var(--prod-ink);
}
.prod-sidebar__close svg{ width:16px; height:16px; stroke:currentColor; fill:none; stroke-width:2.2; }
.prod-sidebar__overlay{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(20,20,25,.45);
    z-index:1000;
}

.prod-cat-list{
    list-style:none;
    margin:0;
    padding:0;
    display:flex;
    flex-direction:column;
    gap:4px;
}
.prod-cat-list a{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 10px;
    border-radius:10px;
    text-decoration:none;
    color:#4c515a;
    font-size:14.5px;
    font-weight:500;
    transition:background .15s, color .15s;
}
.prod-cat-list a:hover{ background:var(--prod-accent-tint); color:var(--prod-accent-dark); }
.prod-cat-list a.is-active{
    background:var(--prod-accent);
    color:#fff;
    box-shadow:0 6px 14px -6px rgba(240,128,10,.55);
}
.prod-cat-list__icon{ width:20px; height:20px; flex:0 0 20px; display:flex; }
.prod-cat-list__icon svg{ width:100%; height:100%; fill:none; stroke:currentColor; stroke-width:2.6; stroke-linecap:round; stroke-linejoin:round; }
.prod-cat-list__label{ flex:1; }
.prod-cat-list__count{
    font-size:12px;
    font-weight:700;
    background:#f1f2f4;
    color:#767b84;
    border-radius:20px;
    padding:2px 9px;
    min-width:24px;
    text-align:center;
}
.prod-cat-list a.is-active .prod-cat-list__count{ background:rgba(255,255,255,.25); color:#fff; }

/* ---------------------------------------------------------------------
   Grid & Cards
--------------------------------------------------------------------- */
.prod-grid{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:22px;
}

.prod-card{
    background:#fff;
    border:1px solid var(--prod-border);
    border-radius:16px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    transition:transform .2s, box-shadow .2s, border-color .2s;
}
.prod-card:hover{
    transform:translateY(-3px);
    box-shadow:0 14px 30px -14px rgba(20,20,30,.18);
    border-color:#f3d9bd;
}

.prod-card__photo{
    position:relative;
    aspect-ratio:1/0.82;
    background:#f4f5f6;
    display:flex;
    align-items:center;
    justify-content:center;
}
.prod-card__photo img{
    width:100%;
    height:100%;
    object-fit:contain;
    padding:14px;
}
.prod-card__fallback{
    display:none;
    flex-direction:column;
    align-items:center;
    gap:8px;
    color:#c7cbd1;
}
.prod-card__fallback svg{ width:44px; height:44px; stroke:currentColor; fill:none; stroke-width:1.6; }
.prod-card__fallback span{ font-size:11px; letter-spacing:.04em; text-transform:uppercase; }
.prod-card__photo.is-broken img{ display:none; }
.prod-card__photo.is-broken .prod-card__fallback{ display:flex; }

.prod-card__tag{
    position:absolute;
    top:10px;
    left:10px;
    background:var(--prod-ink);
    color:#fff;
    font-size:11px;
    font-weight:700;
    padding:4px 10px;
    border-radius:20px;
    letter-spacing:.02em;
}

.prod-card__body{
    padding:16px 18px 18px;
    display:flex;
    flex-direction:column;
    gap:10px;
    flex:1;
}
.prod-card__body h3{
    font-size:16.5px;
    font-weight:700;
    color:var(--prod-ink);
    margin:0;
    line-height:1.3;
}
.prod-card__pill{
    display:inline-block;
    align-self:flex-start;
    background:var(--prod-accent-tint);
    color:var(--prod-accent-dark);
    font-size:12px;
    font-weight:700;
    padding:3px 11px;
    border-radius:20px;
}
.prod-card__features{
    list-style:none;
    margin:0;
    padding:0;
    display:flex;
    flex-direction:column;
    gap:5px;
}
.prod-card__features li{
    font-size:12.8px;
    color:#767b84;
    padding-bottom:5px;
    border-bottom:1px dashed var(--prod-border);
}
.prod-card__features li:last-child{ border-bottom:0; padding-bottom:0; }
.prod-card__model{ font-size:11.5px; color:#b3b7bd; margin-top:-2px; }

.prod-card__cta{
    margin-top:auto;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    border:1.5px solid var(--prod-accent);
    color:var(--prod-accent-dark);
    background:transparent;
    font-size:13.5px;
    font-weight:700;
    padding:10px 14px;
    border-radius:9px;
    text-decoration:none;
    transition:background .15s, color .15s;
}
.prod-card__cta:hover{ background:var(--prod-accent); color:#fff; }
.prod-card__cta svg{ width:14px; height:14px; stroke:currentColor; fill:none; stroke-width:2.4; transition:transform .15s; }
.prod-card__cta:hover svg{ transform:translateX(3px); }

.prod-empty{
    background:#fff;
    border:1px dashed var(--prod-border);
    border-radius:var(--prod-radius);
    padding:60px 20px;
    text-align:center;
    color:var(--prod-muted);
    grid-column:1/-1;
}
.prod-empty a{ color:var(--prod-accent-dark); font-weight:700; }

/* ---------------------------------------------------------------------
   Pagination
--------------------------------------------------------------------- */
.prod-pagination{
    display:flex;
    justify-content:center;
    gap:6px;
    margin-top:34px;
    flex-wrap:wrap;
}
.prod-pagination a, .prod-pagination span{
    min-width:38px;
    height:38px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:9px;
    text-decoration:none;
    font-size:13.5px;
    font-weight:600;
    color:#4c515a;
    background:#fff;
    border:1px solid var(--prod-border);
}
.prod-pagination a:hover{ border-color:var(--prod-accent); color:var(--prod-accent-dark); }
.prod-pagination .is-current{ background:var(--prod-accent); color:#fff; border-color:var(--prod-accent); }
.prod-pagination .is-disabled{ opacity:.4; pointer-events:none; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

/* Tablets: 2-column grid */
@media (max-width: 1100px){
    .prod-grid{ grid-template-columns:repeat(2, 1fr); }
}

/* Sidebar becomes an off-canvas drawer below 900px */
@media (max-width: 900px){
    .prod-layout{ grid-template-columns:1fr; }

    .prod-filter-toggle{ display:inline-flex; }

    .prod-sidebar{
        position:fixed;
        top:0;
        left:0;
        height:100%;
        width:82%;
        max-width:320px;
        z-index:1001;
        border-radius:0;
        transform:translateX(-100%);
        transition:transform .25s ease;
        overflow-y:auto;
    }
    .prod-sidebar.is-open{ transform:translateX(0); }
    .prod-sidebar__close{ display:flex; }

    .prod-sidebar__overlay.is-open{ display:block; }
}

/* Phones: single column, search takes full width */
@media (max-width: 640px){
    .prod-page{ padding:30px 0 50px; }
    .prod-grid{ grid-template-columns:1fr; }
    .prod-head{ flex-direction:column; align-items:stretch; }
    .prod-head__tools{ flex-direction:column; align-items:stretch; }
    .prod-search{ min-width:0; width:100%; }
    .prod-filter-toggle{ justify-content:center; }
    .prod-head__title h1{ font-size:24px; }
}