/* contenedor */
.plp-container {
	max-width: 96rem;
	margin: 0 auto;
	padding: 3% 1rem;
}

/* breadcrumb */
.breadcrumb{
	font-size:.875rem;
	margin:1rem 0 .75rem;color:#666}

.breadcrumb li{display:inline}

.breadcrumb li+li:before{content:"›";margin:0 .4em}

/* layout sidebar + content */
.shop-page-grid{
	position: relative;
	display:grid;
	grid-template-columns: 260px 1fr;
	gap:2rem
}

@media(min-width: 960px) {
	.shop-sidebar {
		top: 180px;
		height: min-content;
		position: sticky;
	}
}

@media(max-width: 960px) {
	.shop-page-grid {
		grid-template-columns: 1fr
	}
}

.shop-sidebar{border:1px solid #eee;border-radius:.5rem;padding:1rem;background:#fafafa}
.filter-group{margin-bottom:1.5rem}
.filter-toggle{display:flex;justify-content:space-between;width:100%;background:none;border:none;font-weight:600;font-size:1rem;padding:.4rem 0;cursor:pointer}
.filter-list{max-height:0;overflow:hidden;transition:max-height .3s ease}
.filter-list.open{max-height:800px}
.filter-list li{margin:.35rem 0}

.price-filter .slider-wrapper{position:relative;height:4px;background:#ddd;margin:1.2rem 0}
.slider-range{position:absolute;height:4px;background:#1e73be;border-radius:2px}
.price-filter input[type=range]{position:absolute;top:-6px;width:100%;height:16px;background:none;-webkit-appearance:none}
.price-filter input[type=range]::-webkit-slider-thumb{width:14px;height:14px;background:#1e73be;border-radius:50%;cursor:pointer;-webkit-appearance:none}
.price-labels{display:flex;justify-content:space-between;font-size:.85rem;color:#555}

.apply-filters{display:block;width:100%;background:#1e73be;color:#fff;padding:.6rem 0;border:none;border-radius:.35rem;font-weight:600;cursor:pointer}
.shop-content .shop-loop-top-bar{display:flex;justify-content:space-between;align-items:center;margin-bottom:32px;gap:4px;}

.woocommerce ul.products:not(.elementor-grid),
.woocommerce-page ul.products:not(.elementor-grid) {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	row-gap: 1rem;
}

@media (max-width: 1300px) {
	.woocommerce ul.products:not(.elementor-grid),
	.woocommerce-page ul.products:not(.elementor-grid) {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 1100px) {
	.woocommerce ul.products:not(.elementor-grid),
	.woocommerce-page ul.products:not(.elementor-grid) {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 960px) {
	.woocommerce ul.products:not(.elementor-grid),
	.woocommerce-page ul.products:not(.elementor-grid) {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.woocommerce ul.products:not(.elementor-grid),
	.woocommerce-page ul.products:not(.elementor-grid) {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 576px) {
	.woocommerce ul.products:not(.elementor-grid),
	.woocommerce-page ul.products:not(.elementor-grid) {
		grid-template-columns: repeat(1, 1fr) !important;
	}
}

.woocommerce-pagination{
	margin-top: 20px;
	justify-content: center;
	display: flex;
}

/* Filtro Ordenar por dentro del Top Bar */
.shop-loop-top-bar .filter-group {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.shop-loop-top-bar .filter-group .filter-title {
    margin: 0;
    padding: 0;
    height: fit-content;
    border: none;
}

.shop-loop-top-bar .filter-group .filter-select {
    max-width: 205px;
}

/* =========================================
   ESTILOS MOBILE FILTERS (< 960px)
   ========================================= */

/* Por defecto (Desktop): Ocultar controles móviles y Modal */
.alfa-mobile-controls,
.alfa-filter-modal {
    display: none;
}

@media (max-width: 960px) {
    /* 1. Ocultar Sidebar y Filtro de Ordenar Desktop */
    .shop-sidebar {
        display: none !important;
    }
    .shop-loop-top-bar .filter-group {
        display: none !important;
    }

    /* 2. Mostrar Controles Móviles */
    .alfa-mobile-controls {
        display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
        gap: 10px;
        width: 100%;
		margin: 0;
    }

    /* Ajuste del Top Bar para que se vea bien en móvil */
    .shop-loop-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Botones de acción */
    .btn-mobile-filter,
    .btn-mobile-clear {
		padding: 8px 24px;
        display: flex;
		justify-content: center;
        align-items: center;
		min-width: 200px;
        border-radius: 4px;
        font-weight: 600;
        font-size: 14px;
        cursor: pointer;
		background: #fff;
        border: 1px solid #ddd;
        gap: 6px;
    }
    
    .btn-mobile-filter {
        background-color: #fd00ae;
        color: #fff;
        border: none;
    }
    
    .btn-mobile-clear {
        color: #fd00ae; /* Color rojo para limpiar */
        border-color: #fd00ae;
        display: none; /* Oculto por defecto */
    }

    /* =========================================
       MODAL DE FILTROS
       ========================================= */
    .alfa-filter-modal {
        display: none; /* Controlado por JS */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 99999;
        align-items: flex-end; /* Aparece desde abajo o centro */
        justify-content: center;
    }

    .alfa-modal-content {
        background: #fff;
        width: 100%;
        max-width: 500px;
        height: 85vh; /* Ocupa casi toda la altura */
        border-radius: 12px 12px 0 0;
        padding: 20px;
        display: flex;
        flex-direction: column;
        position: relative;
        animation: slideUp 0.3s ease-out;
    }

    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .alfa-modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
    }

    .alfa-modal-title {
        font-size: 18px;
        font-weight: bold;
        margin: 0;
    }

    .alfa-modal-close {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        line-height: 1;
    }

    .alfa-modal-body {
        flex: 1;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    /* Estilos para los filtros dentro del modal */
    .alfa-modal-body .filter-group {
        display: block !important; /* Forzar visibilidad */
        width: 100%;
    }
    
    .alfa-modal-body .filter-select {
        width: 100% !important;
        max-width: 100% !important;
        height: 40px;
        border: 1px solid #ccc;
        border-radius: 4px;
        padding: 0 10px;
    }

    .alfa-modal-footer {
        margin-top: 20px;
        border-top: 1px solid #eee;
        padding-top: 15px;
    }

    .btn-apply-filters {
        width: 100%;
        background-color: #fd00ae; /* Tu color rosa */
        color: #fff;
        border: none;
        padding: 12px;
        border-radius: 50px;
        font-weight: bold;
        font-size: 16px;
        cursor: pointer;
    }
}


@media (max-width: 576px) {
	.btn-mobile-filter, .btn-mobile-clear {
		width: 100%;
	}
}
