/* categories.css
   Styles for category.php (sidebar + product grid)
   Designed to follow the theme in index.css (soft shadows, rounded cards)
*/

/* ---------- Variables (fallbacks) ---------- */
  
:root {
    --bg: #ffffff;
    --muted: #6b7280;
    --accent1: #ff8c00;
    --accent2: #ff3c00;
    --card-shadow: 0 8px 28px rgba(11, 22, 39, 0.06);
    --card-radius: 12px;
    
}

/* ---------- Page wrapper ---------- */
.categories-page {
    padding-top: 20px;
    padding-bottom: 40px;
    color: #151515;
    
}

/* ---------- Sidebar card ---------- */
.categories-sidebar .card {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.06);
    transition: transform .18s ease, box-shadow .18s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.categories-sidebar .card-header {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    text-align: center;
}

.categories-sidebar .cat-list-gp-item {
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    padding: 0.4rem 0.75rem;
}

.categories-sidebar .cat-list-gp-item:last-child {
    border-bottom: none;
}

.categories-sidebar .cat-list-gp-item a {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #222;
}

.categories-sidebar .cat-list-gp-item:hover {
    text-decoration: none;
    background-image: linear-gradient(90deg, rgba(255, 140, 0, 1) 0%, rgba(255, 60, 0, 1) 100%) !important;
    border-radius: 5px;
}

.categories-sidebar .cat-list-gp-item .active-cat {
    font-weight: 700;
    color: var(--accent1);
}

.categories-sidebar .cat-list-gp-item .active-cat:hover {
    font-weight: 700;
    color: black;
}

/* small chevron */
.categories-sidebar .bi-chevron-right {
    color: var(--muted);
}

/* ---------- Top heading ---------- */
.category-header h4 {
    font-weight: 700;
    margin-bottom: 4px;
}

.category-header small {
    color: var(--muted);
}

/* ---------- Product cards (image + name only) ---------- */
.product-cards .product-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform .16s ease, box-shadow .16s ease;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.06);
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: 100%;
}

.product-cards .product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.12);
}

.product-cards .product-card a {
    color: inherit;
    display: block;
    height: 100%;
    padding: 5px;
}

/* image */
.product-cards .card-img-top {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background: #f3f4f6;

}

/* card body: center the title */
.product-cards .card-body {
    padding: 10px 8px;
    text-align: center;
}

.product-cards .card-title {
    font-size: 0.95rem;
    line-height: 1.2;
    font-weight: 600;
    color: #222;
    margin-top: 5px;
}

/* small muted SKU or price (if later added) */
.product-cards .small.text-muted {
    color: var(--muted);
}

/* ---------- Grid responsiveness ---------- */
/* Use your col classes (col-6 col-md-4 col-lg-3); below only small tweaks */
@media (max-width: 575.98px) {
    .product-cards .card-img-top {
        height: 140px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .product-cards .card-img-top {
        height: 150px;
    }
}

/* ---------- Utilities ---------- */
.categories-empty {
    padding: 24px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    color: #333;
}

/* Back-to-categories small button */
.back-to-cats {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
    color: #333;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

/* focus for accessibility */
.product-card:focus-within,
.categories-sidebar .cat-list-gp-item a:focus {
    outline: 3px solid rgba(2, 132, 199, 0.12);
    outline-offset: 3px;
}

/* small polish for header action */
.category-header .btn-sm {
    box-shadow: none;
}

/* keep long product names wrapping */
.product-cards .card-title {
    white-space: normal;
    word-break: break-word;
}

  
/* end of categories.css */

/* Hide card header on mobile since button already shows heading */
@media (max-width: 767.98px) {
    .categories-sidebar .card-header {
      display: none;
    }
  }
  