/* Item List Specific Styles */

/* Mobile Category Toggle Button */
.mobile-category-toggle {
    position: fixed;
    top: 250px; /* 200px lower than current position */
    right: 0; /* Touch/hug the right side */
    z-index: 1000;
    padding: 0;
}

.mobile-category-toggle .btn {
    padding: 15px 20px; /* Make button bigger */
    font-size: 16px;
    font-weight: 600;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    box-shadow: -2px 2px 8px rgba(0,0,0,0.2);
    border: none;
    min-width: 120px;
}

.mobile-category-toggle .btn:hover {
    transform: translateX(-2px);
    box-shadow: -4px 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.mobile-menu-text {
    font-size: 14px;
    font-weight: 600;
}



/* Category Sidebar */

.category-sidebar {

    background-color: #f8f9fa;

    border-right: 1px solid #dee2e6;

    padding: 2rem 1.5rem;

}



.category-sidebar h5 {

    color: #495057;

    border-bottom: 2px solid #dee2e6;

    padding-bottom: 0.75rem;

    margin-bottom: 1.5rem;

}



/* Category Tree Enhancements */

.category-tree .category-item {

    margin-bottom: 0.5rem;

}



.category-tree .category-link {

    display: flex;

    align-items: center;

    padding: 0.6rem 0.75rem;

    border-radius: 8px;

    text-decoration: none;

    color: #6c757d;

    transition: all 0.2s ease;

    border: 1px solid transparent;

}



.category-tree .category-link:hover {

    background-color: #e3f2fd;

    color: #1976d2;

    border-color: #bbdefb;

    text-decoration: none;

}



.category-tree .category-link.active {

    background-color: #1976d2;

    color: white;

    font-weight: 500;

    box-shadow: 0 2px 4px rgba(25, 118, 210, 0.2);

}



.category-toggle {

    background: none;

    border: none;

    color: inherit;

    padding: 0;

    margin-right: 0.5rem;

    width: 18px;

    height: 18px;

    text-align: center;

    border-radius: 50%;

    transition: background-color 0.2s ease;

}



.category-toggle:hover {

    background-color: rgba(0, 0, 0, 0.1);

}



.category-count {

    background-color: #e9ecef;

    color: #6c757d;

    padding: 0.2rem 0.5rem;

    border-radius: 12px;

    font-size: 0.75rem;

    font-weight: 500;

    margin-left: auto;

    min-width: 1.5rem;

    text-align: center;

}



.category-link.active .category-count {

    background-color: rgba(255, 255, 255, 0.2);

    color: white;

}



.category-children {

    margin-left: 1rem;

    padding-left: 1rem;

    border-left: 2px solid #e9ecef;

    margin-top: 0.5rem;

}



/* Item Card Enhancements */

.item-card {

    transition: all 0.3s ease;

}



.item-card:hover {

    transform: translateY(-8px);

}



.item-card .card {

    border: none;

    border-radius: 12px;

    overflow: hidden;

    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);

    transition: box-shadow 0.3s ease;

}



.item-card:hover .card {

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);

}



.item-image-container {

    position: relative;

    overflow: hidden;

    height: 250px;

    background: linear-gradient(45deg, #f8f9fa, #e9ecef);

}



.item-image {

    width: 100%;

    height: 100%;

    object-fit: cover;

    transition: transform 0.4s ease;

}



.item-image-placeholder {

    width: 100%;

    height: 100%;

    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);

    display: flex;

    align-items: center;

    justify-content: center;

    color: #adb5bd;

}



.item-overlay {

    position: absolute;

    top: 0;

    left: 0;

    right: 0;

    bottom: 0;

    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));

    display: flex;

    align-items: center;

    justify-content: center;

    opacity: 0;

    transition: opacity 0.3s ease;

}



.item-card:hover .item-overlay {

    opacity: 1;

}



.item-card:hover .item-image {

    transform: scale(1.05);

}



.item-title-link {

    color: #495057;

    text-decoration: none;

    font-weight: 500;

    transition: color 0.2s ease;

}



.item-title-link:hover {

    color: #1976d2;

    text-decoration: none;

}



/* Breadcrumb Enhancement */

.breadcrumb {

    background-color: transparent;

    padding: 0;

    margin-bottom: 2rem;

}



.breadcrumb-item + .breadcrumb-item::before {

    content: "›";

    color: #6c757d;

    font-weight: bold;

}



.breadcrumb-item a {

    color: #6c757d;

    text-decoration: none;

}



.breadcrumb-item a:hover {

    color: #1976d2;

}



.breadcrumb-item.active {

    color: #495057;

    font-weight: 500;

}



/* Price styling */

.text-primary {

    color: #1976d2 !important;

}



/* Badge enhancements */

.badge {

    font-weight: 500;

    padding: 0.4rem 0.75rem;

}



/* Button enhancements */

.btn-outline-primary {

    border-color: #1976d2;

    color: #1976d2;

}



.btn-outline-primary:hover {

    background-color: #1976d2;

    border-color: #1976d2;

}



/* Responsive adjustments */

@media (max-width: 991.98px) {

    .category-sidebar {

        border-right: none;

        border-bottom: 1px solid #dee2e6;

        padding: 1.5rem;

    }

    

    .main-content {

        padding: 1.5rem !important;

    }

}



@media (max-width: 768px) {

    .item-image-container {

        height: 200px;

    }

    

    .category-children {

        margin-left: 0.5rem;

        padding-left: 0.5rem;

    }

    

    .main-content {

        padding: 1rem !important;

    }

}



/* Loading states and animations */

@keyframes fadeIn {

    from { opacity: 0; transform: translateY(20px); }

    to { opacity: 1; transform: translateY(0); }

}



.item-card {

    animation: fadeIn 0.5s ease-out forwards;

}



/* Empty state styling */

.empty-state {

    padding: 4rem 2rem;

    text-align: center;

    color: #6c757d;

}



.empty-state i {

    margin-bottom: 1.5rem;

    color: #adb5bd;

}

/* Responsive Item Grid Optimizations */
/* Tighter spacing for mobile and better layout */
@media (max-width: 575.98px) {
    .main-content {
        padding: 1rem !important;
    }
    
    .item-card .card {
        margin-bottom: 0.5rem;
    }
    
    .item-card .card-body {
        padding: 0.75rem;
    }
    
    .item-card .card-title {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .item-card .card-text {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .main-content {
        padding: 1.5rem !important;
    }
    
    .item-card .card-body {
        padding: 0.875rem;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .item-card .card-body {
        padding: 1rem;
    }
}

/* Ensure consistent card heights in grid */
.item-card {
    display: flex;
    flex-direction: column;
}

.item-card .card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Category Information Section */
.category-info-section {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.category-image-container {
    height: 100%;
    display: flex;
    align-items: center;
}

.category-description {
    height: 100%;
}

.category-description .card {
    height: 100%;
    border: none;
    background: #f8f9fa;
}

.category-description .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

.category-description .card-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
}

.category-description .card-text {
    line-height: 1.6;
    color: #6c757d;
}

/* Responsive adjustments for category section */
@media (max-width: 991.98px) {
    .category-description .card-body {
        padding: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .category-description .card-body {
        padding: 1rem;
    }
    
    .category-description .card-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
}

/* Category Information Section */
.category-info-section {
    margin-bottom: 2rem;
}

.category-image-container {
    overflow: hidden;
    border-radius: 8px;
}

.category-description .card {
    border: none;
    background-color: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-description .card-title {
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
}

.category-description .card-text {
    color: #6c757d;
    line-height: 1.6;
}

.category-description .card-text p {
    margin-bottom: 1rem;
}

.category-description .card-text p:last-child {
    margin-bottom: 0;
}

/* Responsive adjustments for category section */
@media (max-width: 991.98px) {
    .category-info-section {
        margin-bottom: 1.5rem;
    }
    
    .category-description .card-title {
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .category-info-section {
        margin-bottom: 1rem;
    }
    
    .category-description .card-body {
        padding: 1rem;
    }
    
    .category-description .card-title {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }
}

