
:root {
    --b2b-primary: var(--primary);
    --b2b-secondary: #6c757d;
    --b2b-success: #198754;
    --b2b-warning: #ffc107;
    --b2b-danger: #dc3545;
    --b2b-info:var(--primary-hover);
    --b2b-light: #f8f9fa;
    --b2b-dark: #212529;
    
    /* Stock colors */
    --stock-available: #28a745;
    --stock-low: #ffc107;
    --stock-critical: #fd7e14;
    --stock-out: #dc3545;
    
    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
#b2b-shop-container {
    padding: 20px 0;
}


#b2b-top-filters-form{
    display: flex;
}

/* ===== LAYOUT PRINCIPAL ===== */
.shop-layout {
    display: flex;
    gap: 20px;
}

.shop-sidebar {
    flex: 0 0 280px;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    padding: 20px;
    height: fit-content;
}

.shop-main {
    flex: 1;
}

/* ===== FILTROS SUPERIORES ===== */
.top-filters {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #f5f5f5;
}

.top-filters .row {
    align-items: end;
    gap: 16px;
}

.top-filters .form-label {
    font-weight: 500;
    color: #666;
    margin-bottom: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.top-filters .form-select,
.top-filters .form-control {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.top-filters .form-select:hover,
.top-filters .form-control:hover {
    border-color: var(--primary-hover);
}

.top-filters .form-select:focus,
.top-filters .form-control:focus {
    border-color: var(--primary-hover);
    outline: none;
}

/* ===== SIDEBAR FILTROS MINIMALISTA ===== */
.sidebar-filters {
    background: #fff;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f8f9fa;
    overflow: hidden;
}

.filter-section {
    border-bottom: 1px solid #f0f2f5;
    margin-bottom: 0;
    position: relative;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    cursor: pointer;
    background: #fff;
    transition: all 0.3s ease;
    position: relative;
}

.filter-header:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.filter-header i {
    font-size: 16px;
    color: #666;
    transition: all 0.3s ease;
}

.filter-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-title i {
    font-size: 14px;
    color: var(--primary-hover);
    opacity: 0.7;
}

.filter-toggle {
    font-size: 12px;
    color: #999;
    transition: all 0.3s ease;
    padding: 4px;
    border-radius: 4px;
}

.filter-toggle:hover {
    color: var(--primary-hover);
}

.filter-section.collapsed .filter-toggle {
    transform: rotate(-90deg);
}

.filter-section.collapsed .filter-toggle i {
    transform: rotate(-90deg);
}

.filter-content {
    padding: 0 24px 24px 24px;
    display: block;
    opacity: 1;
    max-height: 500px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.filter-section.collapsed .filter-content {
    max-height: 0;
    opacity: 0;
    padding: 0 24px;
}

/* Estados especiales para secciones */
.filter-section.active .filter-header {
    background: var(--b2b-danger);
    color: white;
}

.filter-section.active .filter-title {
    color: white;
}

.filter-section.active .filter-title i,
.filter-section.active .filter-toggle {
    color: white;
}

.filter-section.active .filter-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

/* ===== CUSTOM CHECKBOXES MINIMALISTAS ===== */
.custom-checkbox {
    margin-bottom: 14px;
    position: relative;
    transition: all 0.3s ease;
}

.custom-checkbox:hover {
    transform: translateX(2px);
}

.custom-checkbox input[type="checkbox"] {
    display: none;
}

.custom-checkbox label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    line-height: 1.5;
    padding: 2px 0;
    transition: all 0.3s ease;
}

.custom-checkbox label:hover {
    color: var(--primary-hover);
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    background: #fff;
}

.checkbox-custom .fa-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 10px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.custom-checkbox input[type="checkbox"]:checked + label .checkbox-custom .fa-check {
    transform: translate(-50%, -50%) scale(1);
}

.custom-checkbox input[type="checkbox"]:checked + label .checkbox-custom {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: var(--primary-hover);
}

.custom-checkbox input[type="checkbox"]:checked + label .checkbox-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.custom-checkbox input[type="checkbox"]:checked + label {
    color: var(--primary-hover);
    font-weight: 500;
}

.checkbox-text {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkbox-text i {
    font-size: 12px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.custom-checkbox input[type="checkbox"]:checked + label .checkbox-text i {
    color: var(--primary-hover);
}

/* ===== SEARCH BOXES MINIMALISTAS ===== */
.search-box {
    position: relative;
    margin: 18px 0px 18px 0px;
}

.color-filters{
    margin: 18px 0px 18px 0px;
}

.brand-filters .search-box {
    margin: 18px 0px 18px 0px;
}
.search-box input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: #f8f9fa;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #495057;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-hover);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

.search-box input::placeholder {
    color: #6c757d;
    font-style: normal;
    font-weight: 400;
}

.search-box .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 14px;
    pointer-events: none;
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
}

/* Mensaje de no hay resultados */
.no-results-message {
    padding: 15px 10px;
    text-align: center;
    color: #666;
    font-style: italic;
    font-size: 14px;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-top: 10px;
    border: 1px dashed #ddd;
}

/* Animación suave para mostrar/ocultar elementos */
.custom-checkbox {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.custom-checkbox:not([style*="display: none"]) {
    opacity: 1;
    transform: translateX(0);
}

/* Mejorar la apariencia cuando se está buscando */
.search-box input:not(:placeholder-shown) {
    background-color: #fff;
    border-color: var(--primary-hover);
}

/* ===== PRICE FILTER ===== */
.price-range-container {
    padding: 10px 0;
}

.price-range-slider {
    position: relative;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    margin-bottom: 20px;
}

.range-input {
    position: absolute;
    top: -2px;
    width: 100%;
    height: 10px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.range-input::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-hover);
    border: 2px solid #fff;
    cursor: pointer;
    pointer-events: all;
    -webkit-appearance: none;
    appearance: none;
}

.range-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-hover);
    border: 2px solid #fff;
    cursor: pointer;
    pointer-events: all;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-input-group {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 10px;
    flex: 1;
}

.price-input-group input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 13px;
    text-align: center;
}

.currency {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.price-separator {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* ===== COLOR FILTERS MINIMALISTAS ===== */
.color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 100%;
}

.color-item {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 2px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.color-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.color-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary-hover);
}

.color-item:hover::before {
    transform: scale(1.05);
}

.color-item.selected,
.color-item:has(input:checked) {
    transform: translateY(-2px);
    border-color: var(--primary-hover);
    border-width: 3px;
}

.color-item.selected::after,
.color-item:has(input:checked)::after {
    content: '';
}

.color-item.selected .fa-check,
.color-item:has(input:checked) .fa-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    z-index: 2;
}

/* ===== RATING FILTERS ===== */
.rating-filters .rating-option {
    margin-bottom: 10px;
}

.rating-filters .rating-option input[type="radio"] {
    display: none;
}

.rating-filters .rating-option label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    padding: 6px 0;
}

.rating-filters .radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 50%;
    background-color: #fff;
    position: relative;
    transition: all 0.2s ease;
    margin-right: 8px;
}

.rating-filters .radio-custom .fa-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: #fff;
    font-size: 10px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.rating-filters .stars {
    display: flex;
    gap: 2px;
    margin-left: 8px;
}

.rating-filters .star {
    font-size: 16px;
    color: #ddd;
    transition: color 0.2s ease;
}

.rating-filters .star.filled {
    color: #ffc107;
}

.rating-filters .rating-option input[type="radio"]:checked + label .star {
    color: #ffc107;
}

.rating-filters .rating-text {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    margin-left: 8px;
}

.rating-filters .rating-option input[type="radio"]:checked + label .rating-text {
    color: var(--primary);
}

.rating-filters .rating-option input[type="radio"]:checked + label .radio-custom {
    background-color: var(--primary);
    border-color: var(--primary);
}

.rating-filters .rating-option input[type="radio"]:checked + label .radio-custom .fa-check {
    transform: translate(-50%, -50%) scale(1);
}

/* ===== TAG FILTERS ===== */
.tag-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-btn {
    padding: 8px 14px;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    background: #fff;
    color: #495057;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.tag-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: all 0.3s ease;
}

.tag-btn:hover {
    border-color: var(--primary-hover);
    color: var(--primary-hover);
    transform: translateY(-1px);
}

.tag-btn:hover::before {
    left: 100%;
}

.tag-btn:has(input:checked) {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: var(--primary-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.tag-btn:has(input:checked) .fa-check {
    margin-left: 6px;
    font-size: 10px;
}

/* ===== SCROLLABLE LISTS ===== */
.category-list,
.brand-list {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

.category-list::-webkit-scrollbar,
.brand-list::-webkit-scrollbar {
    width: 4px;
}

.category-list::-webkit-scrollbar-track,
.brand-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.category-list::-webkit-scrollbar-thumb,
.brand-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.category-list::-webkit-scrollbar-thumb:hover,
.brand-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ===== FILTROS LEGACY ===== */
.filters-card {
    border: none;
    box-shadow: var(--shadow-sm);
    border-radius: 10px;
}

.filters-card .card-body {
    padding: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--b2b-dark);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-hover);
}

/* ===== TARJETAS DE PRODUCTO ===== */
.product-card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

/* ===== TARJETAS HORIZONTALES ===== */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-card-horizontal {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    transition: var(--transition);
    background: #fff;
}

.product-card-horizontal:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary-hover);
}

.product-image-container {
    position: relative;
    height: 120px;
    overflow: hidden;
    border-radius: 10px 0 0 10px;
}

.product-image-container .product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-container .no-image {
    height: 100%;
    border-radius: 10px 0 0 10px;
}

.product-select {
    position: absolute;
    top: 10px;
    left: 10px;
}

.product-select input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.color-variations {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: var(--transition);
}

.color-dot:hover {
    transform: scale(1.2);
    border-color: var(--primary-hover);
}

.info-badges .badge {
    font-size: 0.7rem;
    padding: 4px 8px;
}

.pricing {
    text-align: right;
}

.price-unit {
    font-size: 0.85rem;
}

.price-bulk {
    font-size: 1rem;
}

/* ===== INFORMACIÓN DE PRODUCTOS ===== */
.products-info {
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.products-count {
    font-weight: 600;
    color: var(--b2b-dark);
}

.sort-controls select {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.9rem;
}

/* ===== PAGINACIÓN ===== */
.pagination-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-top: 20px;
}

.pagination-controls input[type="number"] {
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.pagination-controls .btn {
    border-radius: 6px;
}

.page-navigation .pagination .page-link {
    border-radius: 6px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    color: var(--primary-hover);
}

.page-navigation .pagination .page-item.active .page-link {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.card-img-top-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.no-image {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--primary-hover);
    font-weight: 500;
}

/* ===== BADGES DE STOCK ===== */
.stock-badge {
    z-index: 10;
}

.stock-badge .badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.bg-success {
    background-color: var(--stock-available) !important;
}

.badge.bg-warning {
    background-color: var(--stock-low) !important;
    color: var(--b2b-dark) !important;
}

.badge.bg-danger {
    background-color: var(--stock-out) !important;
}

/* ===== CONTENIDO DE TARJETA ===== */
.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--b2b-dark);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.card-text {
    color: var(--primary-hover);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ===== VARIACIONES ===== */
.variations-container {
    margin-bottom: 1rem;
}

.variations-container .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    margin: 0.1rem;
    border: 1px solid #dee2e6;
}

.badge.bg-light {
    color: var(--b2b-dark) !important;
    background-color: #f8f9fa !important;
}

/* ===== PRECIOS ===== */
.price {
    border-top: 1px solid #f0f0f0;
}

.price .h5 {
    margin: 0;
    font-weight: 700;
}

/* ===== INFORMACIÓN DE STOCK ===== */
.stock-info {
    font-size: 0.9rem;
    font-weight: 500;
}

.stock-info i {
    margin-right: 0.25rem;
}

.text-success {
    color: var(--stock-available) !important;
}

.text-warning {
    color: var(--stock-low) !important;
}

.text-danger {
    color: var(--stock-out) !important;
}

/* ===== BOTONES ===== */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--b2b-primary) 0%, #0b5ed7 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #0a58ca 100%);
    transform: translateY(-1px);
}

.btn-outline-info {
    border: 1px solid var(--b2b-info);
    color: var(--b2b-info);
}

.btn-outline-info:hover {
    background-color: var(--b2b-info);
    border-color: var(--b2b-info);
    color: white;
}

.btn-outline-secondary {
    border: 1px solid var(--primary-hover);
    color: var(--primary-hover);
}

.btn-outline-secondary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
}

/* ===== LOADING ===== */
#b2b-loading {
    padding: 3rem 0;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary-hover);
}

/* ===== PAGINACIÓN ===== */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    border-radius: 8px;
    margin: 0 0.2rem;
    border: 1px solid #dee2e6;
    color: var(--primary-hover);
    font-weight: 500;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
    transform: translateY(-1px);
}

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

/* ===== ALERTAS ===== */
.alert {
    border-radius: 10px;
    border: none;
    font-weight: 500;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    #b2b-shop-container {
        padding: 10px 0;
    }
    
    .filters-card .card-body {
        padding: 1rem;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
    
    .card-img-top-wrapper {
        height: 180px;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 576px) {
    .card-img-top-wrapper {
        height: 160px;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .variations-container .badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    .stock-badge .badge {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.5s ease-out;
}

/* ===== UTILIDADES ADICIONALES ===== */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.border-radius-lg {
    border-radius: 12px !important;
}

.shadow-custom {
    box-shadow: var(--shadow) !important;
}

/* ===== MEJORAS VISUALES ===== */
.card-body {
    padding: 1.25rem;
}

.product-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card .mt-auto {
    margin-top: auto !important;
}

/* Efecto hover en botones */
.btn:active {
    transform: translateY(0) !important;
}

/* Mejora en la legibilidad */
.small {
    font-size: 0.85rem;
}

.text-muted {
    color: #6c757d !important;
}

/* ===== ICONOS BOOTSTRAP ===== */
/* Si decides usar Bootstrap Icons, estos estilos los mejorarán */
.bi {
    font-size: 1rem;
    vertical-align: -0.125em;
}

/* ===== FILTROS DE STOCK ===== */
.stock-filters {
    padding: 15px;
}

.stock-filters .custom-checkbox {
    margin-bottom: 12px;
}

.stock-filters .checkbox-text {
    font-size: 0.9rem;
    color: var(--b2b-dark);
    display: flex;
    align-items: center;
    font-weight: 500;
}

/* Colores específicos para estados de stock */
.stock-text.stock-instock, .stock-text.stock-onsale {
    color: var(--stock-available);
}

.stock-text.stock-outofstock {
    color: var(--stock-out);
}

.stock-text.stock-onbackorder, .stock-text.stock-featured {
    color: var(--stock-low);
}

/* Iconos de stock */
.stock-filters .bi {
    font-size: 1rem;
}

/* ===== FILTROS ACTIVOS ===== */
#active-filters {
    padding: 8px 0;
    border-top: 1px solid #e9ecef;
    margin-top: 8px;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary-hover);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.active-filter-tag:hover {
    background: var(--primary-hover);
    color: white;
    text-decoration: none;
}

/* Botón de eliminar filtro específico del B2B - hereda de .btn-base en style.css global */
.active-filter-tag .remove-filter {
    background: transparent;
    border: none;
    color: white;
}

/* Botón Limpiar Todo */
#reset-all-filters {
    font-size: 0.8rem;
    padding: 4px 8px;
}

#reset-all-filters:hover {
    transform: translateY(-1px);
}

/* ===== PRODUCTOS GRID Y CARDS ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.product_card {
    background: #fff;
    border-radius: 12px;
    padding: var(--space-s);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product_card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}


.product-category {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.product-title a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    line-height: normal;
}

.product-title a:hover {
    color: var(--primary-hover);
}

.product_image {
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
    overflow: hidden;
}

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

.product_card:hover .product_image img {
    transform: scale(1.05);
}



.price-add-to-cart {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--base-ultra-dark);;
}


/* ===== ESTILOS PARA CLASES PERSONALIZADAS (SIN BOOTSTRAP) ===== */

/* Contenedores principales */
.b2b-container {
    width: 100%;
    max-width: 100%;
    padding: 20px 0;
}

.b2b-top-section {
    margin-bottom: 20px;
}

.b2b-full-width {
    width: 100%;
}

.b2b-main-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.b2b-sidebar {
    flex: 0 0 280px;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.b2b-content {
    flex: 1;
}

/* Sección de resultados */
.b2b-results-section {
    margin-bottom: 20px;
}

.b2b-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.b2b-results-text {
    color: #666;
    font-size: 14px;
}

.b2b-controls-group {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.b2b-control-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.b2b-label {
    font-weight: 500;
    color: #666;
    margin: 0;
    font-size: 14px;
    white-space: nowrap;
}

.b2b-label-small {
    font-weight: 500;
    color: #666;
    margin-bottom: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.b2b-select {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    transition: var(--transition);
    background: #fff;
    min-width: auto;
}

.b2b-select:hover {
    border-color: var(--primary-hover);
}

.b2b-select:focus {
    border-color: var(--primary-hover);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Botones B2B - heredan de .btn-base en style.css global */
.b2b-btn {
    /* Solo colores específicos, estructura heredada de .btn-base */
}

.b2b-btn-primary {
    background: var(--b2b-primary);
    color: #fff;
    border-color: var(--b2b-primary);
}

.b2b-btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
}

.b2b-btn-danger {
    background: var(--b2b-danger);
    color: #fff;
    border-color: var(--b2b-danger);
}

.b2b-btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
    color: #fff;
}

.b2b-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Inputs */
.b2b-input {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    transition: var(--transition);
    background: #fff;
    width: 100%;
}

.b2b-input:hover {
    border-color: var(--primary-hover);
}

.b2b-input:focus {
    border-color: var(--primary-hover);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Filtros activos */
.b2b-filters-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.b2b-active-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.b2b-filters-list {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

/* Filtros superiores */
.b2b-top-filters {
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #f5f5f5;
}

.b2b-filters-grid {
    display: flex;
    gap: 16px;
    align-items: end;
    flex-wrap: wrap;
}

.b2b-filter-group {
    flex: 1;
    min-width: 200px;
}

.b2b-search-group {
    flex: 1;
    min-width: 300px;
    width: 100%;
}

/* Selects con iconos integrados */
.b2b-select {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px 12px 40px;
    font-size: 14px;
    transition: var(--transition);
    background: #fff;
    min-width: auto;
    width: 100%;
    position: relative;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
}

.b2b-select:hover {
    border-color: var(--primary-hover);
}

.b2b-select:focus {
    border-color: var(--primary-hover);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Wrapper para iconos HTML */
.b2b-select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.b2b-select-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #999;
    pointer-events: none;
    z-index: 1;
}

/* Barra de búsqueda */
.b2b-search-container {
    display: flex;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    min-width: 300px;
}

.b2b-search-input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 14px;
    background: transparent;
    outline: none;
}

.b2b-search-input::placeholder {
    color: #999;
}

.b2b-search-btn {
    background: var(--primary);
    border: none;
    padding: 12px 16px;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.b2b-search-btn:hover {
    background: var(--primary-hover);
}

.b2b-search-btn i {
    font-size: 16px;
}

/* Paginación */
.b2b-pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Estilos del paginador (basados en fibik-search) */
.b2b-pagination .fibik-live-pagination {
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    padding: 20px;
    margin-top: 0;
    width: 100%;
}

.b2b-pagination .fibik-pag-wrap {
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* Botones de paginación específicos del B2B - heredan de .btn-base en style.css global */
.b2b-pagination .fibik-pag-btn {
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
}

.b2b-pagination .fibik-pag-btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
}

.b2b-pagination .fibik-pag-current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 700;
}

.b2b-pagination .fibik-pag-dots {
    display: flex;
    align-items: center;
    padding: 10px 8px;
    color: #666;
    font-weight: 500;
    font-size: 14px;
}

/* Loading */
.b2b-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.b2b-hidden {
    display: none !important;
}

.b2b-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--b2b-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error */
.b2b-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.b2b-text-center {
    text-align: center;
}

.b2b-error h4 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
}

.b2b-error p {
    margin: 0 0 16px 0;
    font-size: 14px;
}

/* Botón Filtros Móvil */
.b2b-filters-mobile-btn {
    display: none; /* Oculto por defecto */
}

/* Modal de Filtros */
.b2b-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.b2b-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.b2b-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.b2b-modal-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.b2b-modal-title i {
    margin-right: 8px;
}

/* Botón de cerrar modal específico del B2B - hereda de .btn-base en style.css global */
.b2b-modal-close {
    background: none;
    border: none;
    color: white;
}

.b2b-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.b2b-modal-body {

    max-height: 60vh;
    overflow-y: auto;
}

.b2b-modal-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: #f8f9fa;
}

/* Responsive */
@media (max-width: 768px) {
    .b2b-main-layout {
        flex-direction: column;
        gap: 16px;
    }
    
    .b2b-sidebar {
        display: none; /* Ocultar sidebar en móvil */
    }
    
    .b2b-filters-mobile-btn {
        display: block; /* Mostrar botón filtros en móvil */
    }
    
    .b2b-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .b2b-controls-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .b2b-filters-grid {
        flex-direction: column;
        gap: 12px;
    }
    
    .b2b-filter-group {
        min-width: auto;
        width: 100%;
    }
}