﻿.chip {
    display:inline-flex; align-items:center; gap:.4rem;
    padding:.4rem .65rem; border:1px solid #e9ecef; border-radius:999px;
    text-decoration:none; color:#495057; background:#fff;
    font-size:.875rem;
}
.chip:hover { background:#f8f9fa; }
.chip.active { border-color:#0d6efd; color:#0d6efd; }
body { background: #f8f9fa; }
.cat-panel {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    position: sticky;
    top: 12px;
}
.cat-head {
    background: #0d6efd;
    color: white;
    padding: 0.65rem 1.25rem;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.accordion-button {
    font-weight: 600;
    color: #212529;
    padding: 0.75rem 1.25rem;
}
.accordion-button:not(.collapsed) {
    background: #e7f1ff;
    color: #0d6efd;
}
.accordion-button:focus {
    box-shadow: none;
}

/* Thụt thò + đường kẻ phân cấp */
.accordion-body {
    padding: 0;
}
.nested-accordion {
    padding-left: 1.25rem;
}
.cat-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    color: #212529;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.cat-item:hover {
    background: #f1f3f5;
}
.cat-item.active {
    background: #e7f1ff;
    color: #0d6efd;
    font-weight: 600;
}

.badge-level {
    font-size: 0.75rem;
    padding: 0.4em 0.6em;
    font-weight: 600;
}

/* Sản phẩm */
.product-card {
    border-radius: 14px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.22s ease;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.product-thumb-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.promo-bubble {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #dc3545;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}
.product-price .old { text-decoration: line-through; color: #6c757d; margin-right: 0.5rem; }
.product-price .promo { color: #dc3545; font-weight: 700; }

.pagination-container { margin-top: 1.5rem; }

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    border-radius: 14px;
    overflow: hidden;
    background: white;
    border: 1px solid #e9ecef;
    height: 100%;
}

.skeleton-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
}

.skeleton-text {
    height: 1rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.skeleton-price {
    height: 1.2rem;
    width: 60%;
    border-radius: 4px;
}

.skeleton-btn {
    height: 38px;
    border-radius: 6px;
}

/* Accordion & Category cải tiến mượt */
.accordion {
    --bs-accordion-btn-icon-width: 0.9rem;
}
.accordion-collapse {
  transition: height 0.36s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.36s ease;
  overflow: hidden;
  will-change: height, opacity;
}

.accordion-button {
  transition: background-color 0.25s ease, color 0.25s ease, padding-left 0.25s ease;
}

.accordion-button:not(.collapsed) {
  background: #e7f1ff;
  color: #0d6efd;
}

.accordion-button::after {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cat-item {
  display: flex;
  align-items: center;
  padding: 0.56rem 1.25rem;
  color: #212529;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.24s ease;
  border-left: 3px solid transparent;
}

.cat-item:hover {
  background: #f8f9fa;
  padding-left: 1.6rem;
  border-left-color: #adb5bd;
}

.cat-item.active {
  background: #e7f1ff;
  color: #0d6efd;
  font-weight: 600;
  padding-left: 1.6rem;
  border-left: 4px solid #0d6efd;
}

.cat-item i.bi-dash-lg {
  transition: transform 0.28s ease;
}

.cat-item:hover i.bi-dash-lg,
.cat-item.active i.bi-dash-lg {
  transform: translateX(5px);
}