/* Diseño general de la página de inventario */
.inventory-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}

/* Columna lateral de filtros */
.inventory-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Caja individual de filtros */
.inventory-filter-box {
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    overflow: hidden;
}

/* Permite que las sugerencias del buscador salgan fuera de su caja */
.inventory-search-box {
    overflow: visible;
}

/* Título de cada filtro */
.inventory-filter-box h3 {
    font-size: 16px;
    padding: 16px 18px;
    background: #111;
    color: #fff;
    margin: 0;
}

/* Contenido interno de cada filtro */
.inventory-filter-content,
.inventory-filter-field {
    padding: 16px 18px;
}

/* Enlaces del filtro de categorías */
.inventory-category-link {
    display: block;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 5px;
    color: #444;
    font-size: 14px;
    font-weight: 600;
    transition: background .20s ease, color .20s ease;
}

/* Hover de las categorías */
.inventory-category-link:hover {
    background: #f1f3e5;
    color: #7f9518;
}

/* Categoría seleccionada */
.inventory-category-link.active {
    background: #93ab20;
    color: #fff;
}

/* El último enlace no necesita margen inferior */
.inventory-category-link:last-child {
    margin-bottom: 0;
}

/* Menú compacto de categorías del inventario */
.inventory-category-menu {
    padding: 0;
}

/* Enlace para mostrar todo el inventario */
.inventory-category-all {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid #ececec;
    color: #444;
    font-size: 14px;
    font-weight: 700;
    transition: background .20s ease, color .20s ease;
}

/* Estado activo del inventario completo */
.inventory-category-all.active,
.inventory-category-all:hover {
    background: #f1f3e5;
    color: #7f9518;
}

/* Grupo de categoría principal y sus subcategorías */
.inventory-category-group {
    border-bottom: 1px solid #ececec;
}

/* El último grupo no lleva borde inferior */
.inventory-category-group:last-child {
    border-bottom: 0;
}

/* Fila de categoría principal */
.inventory-category-parent-row {
    display: flex;
    align-items: center;
}

/* Enlace de categoría principal */
.inventory-category-parent {
    flex: 1;
    display: block;
    padding: 12px 10px 12px 16px;
    color: #333;
    font-size: 14px;
    font-weight: 700;
    transition: background .20s ease, color .20s ease;
}

/* Hover y categoría principal activa */
.inventory-category-parent:hover,
.inventory-category-parent.active {
    background: #f1f3e5;
    color: #7f9518;
}

/* Botón para abrir y cerrar subcategorías */
.inventory-category-toggle {
    width: 42px;
    height: 42px;
    border: 0;
    border-left: 1px solid #ececec;
    background: transparent;
    color: #777;
    cursor: pointer;
    font-size: 18px;
    transition: background .20s ease, color .20s ease;
}

/* Hover del botón de categorías */
.inventory-category-toggle:hover {
    background: #f5f5f5;
    color: #93ab20;
}

/* Subcategorías ocultas inicialmente */
.inventory-subcategories {
    display: none;
    padding: 4px 0 8px;
    background: #fafafa;
}

/* Muestra las subcategorías del grupo abierto */
.inventory-category-group.open .inventory-subcategories {
    display: block;
}

/* Enlaces de subcategorías */
.inventory-category-child {
    display: block;
    padding: 9px 16px 9px 28px;
    color: #666;
    font-size: 13px;
    transition: background .20s ease, color .20s ease;
}

/* Hover y subcategoría activa */
.inventory-category-child:hover,
.inventory-category-child.active {
    background: #f1f3e5;
    color: #7f9518;
}

/* Campo de búsqueda del inventario */
.inventory-filter-field input {
    width: 100%;
    height: 46px;
    border: 1px solid #d7d7d7;
    border-radius: 6px;
    padding: 0 14px;
    outline: none;
}

/* Resalta el campo al recibir el foco */
.inventory-filter-field input:focus {
    border-color: #93ab20;
}

/* Contenedor del buscador con sugerencias */
.inventory-filter-field {
    position: relative;
}

/* Lista desplegable de sugerencias */
.inventory-search-suggestions {
    display: none;
    position: absolute;
    top: calc(100% - 16px);
    left: 18px;
    width: 360px;
    z-index: 50;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dcdcdc;
    border-top: 0;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 12px 28px rgba(0,0,0,.10);
}

/* Opción individual de sugerencia */
.inventory-search-suggestion {
    display: block;
    width: 100%;
    padding: 11px 13px;
    border: 0;
    border-bottom: 1px solid #eeeeee;
    background: #fff;
    color: #333;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
}

/* Última sugerencia sin borde inferior */
.inventory-search-suggestion:last-child {
    border-bottom: 0;
}

/* Hover de sugerencia */
.inventory-search-suggestion:hover {
    background: #f1f3e5;
    color: #7f9518;
}

/* Selector utilizado en los filtros del inventario */
.inventory-filter-select {
    width: 100%;
    height: 46px;
    border: 1px solid #d7d7d7;
    border-radius: 6px;
    padding: 0 12px;
    background: #fff;
    color: #444;
    outline: none;
    cursor: pointer;
}

/* Resalta el selector activo */
.inventory-filter-select:focus {
    border-color: #93ab20;
}

/* Área principal de resultados */
.inventory-content {
    min-width: 0;
}

/* Barra superior del listado */
.inventory-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    margin-bottom: 24px;
}

/* Título del listado */
.inventory-toolbar-title {
    font-size: 20px;
}

/* Selector de ordenamiento */
.inventory-toolbar-order select {
    height: 44px;
    min-width: 210px;
    border: 1px solid #d7d7d7;
    border-radius: 6px;
    padding: 0 12px;
    background: #fff;
    outline: none;
}

/* Área donde se cargarán los productos */
.inventory-results {
    min-height: 300px;
}

/* Reduce el espacio superior únicamente en la página de inventario */
.inventory-page {
    padding-top: 30px;
}

/* Barra compacta de navegación del inventario */
.inventory-breadcrumb {
    display: flex;
    align-items: center;
    min-height: 48px;
    margin-bottom: 24px;
    padding: 0 18px;
    background: #f7f7f5;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}

/* Ruta de navegación dentro del inventario */
.inventory-breadcrumb-path {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    color: #777;
}

/* Enlaces de la ruta */
.inventory-breadcrumb-path a {
    color: #555;
    transition: color .20s ease;
}

/* Hover de los enlaces de navegación */
.inventory-breadcrumb-path a:hover {
    color: #93ab20;
}

/* Separadores de la ruta */
.inventory-breadcrumb-path span {
    color: #b5b5b5;
}

/* Categoría actual */
.inventory-breadcrumb-path strong {
    color: #111;
    font-weight: 700;
}

/* Muestra tres productos por fila en escritorio */
.inventory-products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

/* Tarjeta individual del inventario */
.inventory-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

/* Efecto visual al pasar el mouse sobre la tarjeta */
.inventory-card:hover {
    transform: translateY(-4px);
    border-color: #d6d6d6;
    box-shadow: 0 12px 28px rgba(0,0,0,.08);
}

/* Área uniforme para mostrar completa la imagen principal del producto */
.inventory-card-image {
    position: relative;
    display: flex;
    height: 190px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #ffffff;
}

/* Mantiene visible la imagen completa sin recortar la maquinaria */
.inventory-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .35s ease;
}

/* Zoom ligero al pasar el mouse */
.inventory-card:hover .inventory-card-image img {
    transform: scale(1.03);
}

/* Etiqueta de producto destacado */
.inventory-card-featured {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    background: #93ab20;
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.inventory-card-upcoming {
    background: #e59a16;
}

.inventory-card-sold {
    background: #c62828;
}

/* Contenido de la tarjeta */
.inventory-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px;
}

/* Categoría del producto */
.inventory-card-category {
    margin-bottom: 7px;
    color: #84991c;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .8px;
    text-transform: uppercase;
}

/* Nombre del producto */
.inventory-card-title {
    margin: 0 0 4px;
    color: #171717;
    font-size: 19px;
    line-height: 1.3;
}

/* Datos principales del producto */
.inventory-card-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
    margin-bottom: 16px;
}

/* Cada dato de marca modelo y año */
.inventory-card-detail {
    min-width: 0;
}

/* Etiqueta de cada dato */
.inventory-card-detail span {
    display: block;
    margin-bottom: 3px;
    color: #8a8a8a;
    font-size: 11px;
}

/* Permite mostrar completos los valores de marca, modelo y año */
.inventory-card-detail strong {
    display: block;
    color: #333;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

/* Organiza el precio y el enlace sin comprimirlos dentro de la tarjeta */
.inventory-card-footer {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 17px;
    border-top: 1px solid #ededed;
}

/* Muestra el precio actual y el precio anterior cuando existe una oferta */
.inventory-card-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px 8px;
    line-height: 1.2;
}

.inventory-card-price strong {
    color: #111;
    font-size: 18px;
    font-weight: 800;
    white-space: nowrap;
}

.inventory-card-price span {
    color: #92979b;
    font-size: 12px;
    font-weight: 400;
    text-decoration: line-through;
    white-space: nowrap;
}

/* Mantiene visible y alineado el enlace para abrir la ficha del producto */
.inventory-card-link {
    align-self: flex-end;
    color: #7d911c;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: color .20s ease;
}

/* Hover del enlace de detalles */
.inventory-card-link:hover {
    color: #111;
}

/* Separa el resumen de búsqueda de las tarjetas encontradas */
.inventory-search-summary {
    margin-bottom: 22px;
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}

/* Resalta los filtros aplicados dentro del resumen */
.inventory-search-summary strong {
    color: #111;
    font-weight: 700;
}

/* Ajusta el inventario para tablet */
@media (max-width: 1050px) {

    .inventory-layout {
        grid-template-columns: 240px 1fr;
        gap: 24px;
    }

    .inventory-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

/* Ajusta el inventario para móvil */
@media (max-width: 760px) {

    .inventory-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .inventory-products-grid {
        grid-template-columns: 1fr;
    }

    .inventory-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .inventory-toolbar-order select {
        width: 100%;
        min-width: 0;
    }

    .inventory-card-image {
        height: 240px;
    }
	
    /* Ajusta el pie de resultados en móvil */
    .inventory-results-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    /* Permite que la paginación se acomode en varias líneas */
    .inventory-pagination {
        flex-wrap: wrap;
    }
	
    /* Ajusta las sugerencias del buscador al ancho disponible en móvil */
    .inventory-search-suggestions {
        left: 18px;
        right: 18px;
        width: auto;
    }

}

/* Pie de resultados del inventario */
.inventory-results-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

/* Contador de resultados */
.inventory-results-count {
    color: #777;
    font-size: 13px;
}

/* Contenedor de la paginación */
.inventory-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Botones de paginación */
.inventory-page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #dcdcdc;
    border-radius: 5px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: background .20s ease, color .20s ease, border-color .20s ease;
}

/* Hover de los botones de paginación */
.inventory-page-btn:hover {
    background: #f1f3e5;
    border-color: #93ab20;
    color: #7d911c;
}

/* Página actual */
.inventory-page-btn.active {
    background: #93ab20;
    border-color: #93ab20;
    color: #fff;
}

/* Puntos suspensivos de la paginación */
.inventory-page-dots {
    padding: 0 4px;
    color: #999;
    font-size: 13px;
}