/* Breadcrumb */
.breadcrumb {
    background: linear-gradient(135deg, #8b1a1a 0%, #c41e1e 50%, #de8d1e 100%);
    padding: 18px 0;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(237, 12, 12, 0.3);
}

.breadcrumb ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb li::after {
    content: '›';
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    font-weight: 400;
}

.breadcrumb li:last-child {
    color: #ffffff;
    font-weight: 600;
}

.breadcrumb li:last-child::after {
    display: none;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.breadcrumb a:hover {
    color: #ffffff;
    font-weight: 600;
}

/* Category Page Layout */
.category-page {
    padding: 40px 0 60px;
}

.page-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.widget {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 12px;
}

.category-list a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 15px;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s;
}

.category-list a:hover,
.category-list a.active {
    background: var(--bg-light);
    color: var(--primary-color);
    padding-left: 18px;
}

/* Category Sub List */
.category-list-sub {
    list-style: none;
    padding-left: 0;
    margin-top: 8px;
    margin-left: 12px;
}

.category-list-sub li {
    margin-bottom: 8px;
}

.category-list-sub a {
    padding: 6px 12px 6px 24px;
    font-size: 14px;
    position: relative;
}

.category-list-sub a::before {
    content: '›';
    position: absolute;
    left: 12px;
    color: var(--text-light);
    font-weight: 600;
}

.category-list-sub a:hover::before,
.category-list-sub a.active::before {
    color: var(--primary-color);
}

/* Price Filter */
.price-filter {
    padding: 10px 0;
}

/* Price Checkbox Group */
.price-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.price-checkbox-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.price-checkbox-item:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
    transform: translateX(3px);
}

.price-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.price-checkbox-item span {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
    user-select: none;
    white-space: nowrap;
    flex: 1;
}

.price-checkbox-item input[type="checkbox"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

.price-checkbox-item:has(input[type="checkbox"]:checked) {
    border-color: var(--primary-color);
    background: rgba(220, 38, 38, 0.05);
}

.btn-filter {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-filter:hover {
    background: var(--secondary-color);
}

/* Featured Products Widget */
.featured-products {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mini-product {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafafa;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
}

.mini-product:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateX(3px);
    border-color: var(--primary-color);
}

.mini-product-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.mini-product-image .placeholder-image {
    width: 100%;
    height: 100%;
    padding-top: 0;
}

.mini-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mini-product:hover .mini-product-image img {
    transform: scale(1.05);
}

.mini-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.mini-product-info h4 {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-color);
    line-height: 1.4;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s;
}

.mini-product:hover .mini-product-info h4 {
    color: var(--primary-color);
}

.mini-product-info .price {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-color);
}

/* Main Content */
.main-content {
    min-height: 600px;
}

.category-header {
    margin-bottom: 30px;
}

.category-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color);
}

.category-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-light);
    border-radius: 8px;
}

.result-count {
    font-size: 14px;
    color: var(--text-light);
}

.sort-select {
    padding: 8px 30px 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    outline: none;
}

/* Category Products Grid */
.category-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-link {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s;
}

.page-link:hover,
.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 1024px) {
    .page-layout {
        grid-template-columns: 240px 1fr;
        gap: 30px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .category-toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .sort-select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }

    .category-title {
        font-size: 24px;
    }
}
