/*
|--------------------------------------------------------------------------
| Search Wrapper
|--------------------------------------------------------------------------
*/
.site-content{
	background-color:white;
}
.search-icon {
    width: 20px !important;
    height: 20px !important;

    min-width: 20px;
    min-height: 20px;

    display: block;

    object-fit: contain;

    opacity: 1 !important;
    visibility: visible !important;
    color: black;
}


.search-toggle-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;

    padding: 0;

    overflow: visible;
}


.custom-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/*
|--------------------------------------------------------------------------
| Search Button
|--------------------------------------------------------------------------
*/

.search-toggle-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow:
        0 4px 14px rgba(0,0,0,0.08);

    transition: all 0.25s ease;
}

.search-toggle-btn:hover {
    transform: scale(1.05);
}

/*
|--------------------------------------------------------------------------
| Expandable Search
|--------------------------------------------------------------------------
*/

.search-box-container {
    position: absolute;
    right: 60px;
    top: 0;

    width: 0;

    opacity: 0;
    visibility: hidden;

    overflow: visible;

    transition:
        width 0.3s ease,
        opacity 0.2s ease;

    z-index: 99999;
}

.search-box-container.active {
    width: 280px;

    opacity: 1;
    visibility: visible;

    overflow: visible;
}

/*
|--------------------------------------------------------------------------
| Search Input
|--------------------------------------------------------------------------
*/

.custom-product-search-form input {
    width: 100%;
    height: 48px;

    border-radius: 999px;
    border: 1px solid #e5e7eb;

    padding: 0 22px;

    font-size: 15px;

    background: #ffffff;

    box-shadow:
        0 8px 24px rgba(0,0,0,0.06);

    outline: none;

    transition: all 0.25s ease;
}

.custom-product-search-form input:focus {
    border-color: #111827;

    box-shadow:
        0 10px 30px rgba(0,0,0,0.10);
}

/*
|--------------------------------------------------------------------------
| AJAX Results
|--------------------------------------------------------------------------
*/

#ajax-search-results {
    position: absolute;

    top: 58px;
    left: 0;

    width: 100%;

    background: #ffffff;

    border-radius: 22px;

    box-shadow:
        0 14px 44px rgba(0,0,0,0.12);

    overflow: hidden;

    z-index: 999999;

    display: none;

    max-height: 420px;
    overflow-y: auto;
}

.ajax-search-item {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 14px 18px;

    text-decoration: none;

    color: #111827;

    transition: background 0.2s ease;
}

.ajax-search-item:hover {
    background: #f9fafb;
}

.ajax-search-item img {
    width: 52px;
    height: 52px;

    object-fit: cover;

    border-radius: 12px;
}

.ajax-search-item-title {
    font-size: 14px;
    font-weight: 500;
}

.ajax-search-item-price {
    font-size: 13px;
    opacity: 0.7;
}

/*
|--------------------------------------------------------------------------
| Astra Header Overflow Fix
|--------------------------------------------------------------------------
*/

.ast-builder-layout-element,
.site-header-section,
.ast-header-html {
    overflow: visible !important;
}


/*
|--------------------------------------------------------------------------
| Search Layout
|--------------------------------------------------------------------------
*/

.custom-search-layout {
    display: grid;

    grid-template-columns: 300px 1fr;

    gap: 40px;

    width: 100%;

    margin: 40px 0;

    padding: 0 40px;

    box-sizing: border-box;
}

.custom-search-results {
    width: 100%;
    min-width: 0;
}

/*
|--------------------------------------------------------------------------
| Sidebar
|--------------------------------------------------------------------------
*/

.custom-search-sidebar {
    position: sticky;
    top: 120px;

    align-self: start;
}

.custom-search-sidebar h2 {
    font-size: 22px;
    margin-bottom: 24px;
}

/*
|--------------------------------------------------------------------------
| Results Area
|--------------------------------------------------------------------------
*/

.search-results-title {
    font-size: 28px;
    margin-bottom: 36px;
    font-weight: 600;
}

.custom-products-grid {

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 24px;

    align-items: start;
}

/*
|--------------------------------------------------------------------------
| Product Card
|--------------------------------------------------------------------------
*/

.custom-product-card {
    display: flex;
    flex-direction: column;

    background: #ffffff;

    border-radius: 28px;

    overflow: hidden;

    text-decoration: none;

    color: inherit;

    box-shadow:
        0 6px 24px rgba(0,0,0,0.06);

    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease;
}

.custom-product-card:hover {
    transform: translateY(-8px);

    box-shadow:
        0 18px 44px rgba(0,0,0,0.12);
}


/*
|--------------------------------------------------------------------------
| Product Image
|--------------------------------------------------------------------------
*/

.custom-product-image {
    position: relative;

    overflow: hidden;

    aspect-ratio: 4 / 5;

    background: #f9fafb;
}

.custom-product-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.4s ease;
}

.custom-product-card:hover
.custom-product-image img {

    transform: scale(1.06);
}

/*
|--------------------------------------------------------------------------
| Product Info
|--------------------------------------------------------------------------
*/

.custom-product-info {
    padding: 22px;
}

.custom-product-title {
    font-size: 16px;
    font-weight: 600;

    line-height: 1.5;

    margin-bottom: 12px;

    color: #111827;

    display: -webkit-box;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;

    min-height: 48px;
}

.custom-product-price {
    font-size: 17px;
    font-weight: 700;

    color: #111827;
}

.custom-search-sidebar
.custom-search-wrapper {

    width: 100%;
}

.custom-search-sidebar
.search-box-container {

    position: relative;

    width: 100% !important;

    right: auto;

    opacity: 1;
    visibility: visible;
}

.custom-search-sidebar
.custom-product-search-form input {

    width: 100%;
}

.custom-search-sidebar
.search-toggle-btn {
    display: none;
}


.custom-search-sidebar {
    background: #ffffff;

    padding: 24px;

    border-radius: 28px;

    box-shadow:
        0 6px 24px rgba(0,0,0,0.06);
}


/*
|--------------------------------------------------------------------------
| Pagination
|--------------------------------------------------------------------------
*/

.custom-pagination {
    display: flex;
    justify-content: center;

    margin-top: 60px;
}

.custom-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 46px;
    height: 46px;

    margin: 0 6px;

    border-radius: 999px;

    background: #ffffff;

    text-decoration: none;

    color: #111827;

    font-weight: 600;

    box-shadow:
        0 4px 18px rgba(0,0,0,0.06);

    transition:
        all 0.25s ease;
}

.custom-pagination .page-numbers:hover {
    transform: translateY(-2px);

    box-shadow:
        0 10px 24px rgba(0,0,0,0.10);
}

.custom-pagination .current {
    background: #111827;
    color: #ffffff;
}

#ajax-product-wrapper {
    transition:
        opacity 0.25s ease;
}



.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.search-filter {
    border: 1px solid #ddd;
    background: white;
    padding: 10px 16px;
    cursor: pointer;
    transition: 0.2s;
}

.search-filter.active {
    background: black;
    color: white;
    border-color: black;
}

.search-count {
    margin-bottom: 20px;
    font-size: 14px;
    opacity: 0.7;
}

/*
|--------------------------------------------------------------------------
| Sidebar Filters
|--------------------------------------------------------------------------
*/

.search-filters {

    display: flex;
    flex-direction: column;
    gap: 10px;

    margin-top: 30px;
}

/*
|--------------------------------------------------------------------------
| Filter Button
|--------------------------------------------------------------------------
*/

.search-filter {

    width: 100%;

    border: 1px solid #ddd;
    background: #fff;

    padding: 12px 16px;

    border-radius: 12px;

    text-align: left;

    font-size: 15px;
    font-weight: 500;

    cursor: pointer;

    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease,
        transform .15s ease;
}

/*
|--------------------------------------------------------------------------
| Hover
|--------------------------------------------------------------------------
*/

.search-filter:hover {

    border-color: #111;

    transform: translateX(2px);
}

/*
|--------------------------------------------------------------------------
| Active
|--------------------------------------------------------------------------
*/

.search-filter.active {

    background: #111;
    color: #fff;

    border-color: #111;
}

/*
|--------------------------------------------------------------------------
| Sidebar Layout
|--------------------------------------------------------------------------
*/

.custom-search-sidebar {

    width: 280px;

    position: sticky;
    top: 120px;

    align-self: flex-start;
}

/*
|--------------------------------------------------------------------------
| Filters Container
|--------------------------------------------------------------------------
*/

.search-filters {

    display: flex;
    flex-direction: column;

    gap: 12px;

    margin-top: 30px;
}

/*
|--------------------------------------------------------------------------
| Filter Button
|--------------------------------------------------------------------------
*/

.search-filter {

    width: 100%;

    padding: 14px 18px;

    border-radius: 999px;

    border: 2px solid transparent;

    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, #7b2cff, #00b7b7) border-box;

    color: #111;

    font-size: 15px;
    font-weight: 700;

    text-align: center;

    cursor: pointer;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

/*
|--------------------------------------------------------------------------
| Hover
|--------------------------------------------------------------------------
*/

.search-filter:hover {

    transform: translateY(-2px);

    border-color: #00b7b7;

    box-shadow:
        0 4px 12px rgba(0,0,0,.08);

    color: black;
}

/*
|--------------------------------------------------------------------------
| Active
|--------------------------------------------------------------------------
*/

.search-filter.active {

    background: linear-gradient(
            135deg,
            #7b2cff,
            #00b7b7
        );

    color: #fff;

    border-color: transparent;

    box-shadow:
        0 6px 16px rgba(123,44,255,.25);
}


/* ==========================================================
   MOBILE LAYOUT
========================================================== */

@media (max-width: 1024px) {

    .custom-products-grid {

        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }
	
	.search-box-container.active {
    width: 200px;
	}
}

@media (max-width: 768px) {

    /*
    |--------------------------------------------------------------------------
    | Main Layout
    |--------------------------------------------------------------------------
    */

    .custom-search-layout {

        display: flex;
        flex-direction: column;

        gap: 24px;

        padding: 16px;
    }

    /*
    |--------------------------------------------------------------------------
    | Sidebar
    |--------------------------------------------------------------------------
    */

    .custom-search-sidebar {

        width: 100%;

        position: relative;
        top: auto;

        padding: 24px;

        border-radius: 28px;

        background: #fff;

        z-index: 2;
    }

    /*
    |--------------------------------------------------------------------------
    | Disable Sticky
    |--------------------------------------------------------------------------
    */

    .custom-search-sidebar{

        position: relative;
    }

    /*
    |--------------------------------------------------------------------------
    | Filter Buttons
    |--------------------------------------------------------------------------
    */

    .search-filter {

        width: 100%;

        min-height: 52px;

        font-size: 16px;
    }

    /*
    |--------------------------------------------------------------------------
    | Results
    |--------------------------------------------------------------------------
    */

    .custom-search-results {

        width: 100%;
    }

    /*
    |--------------------------------------------------------------------------
    | Product Grid
    |--------------------------------------------------------------------------
    */

    .custom-products-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 16px;
    }

    /*
    |--------------------------------------------------------------------------
    | Product Card
    |--------------------------------------------------------------------------
    */

    .custom-product-card {

        min-width: 0;
    }

    /*
    |--------------------------------------------------------------------------
    | Prevent Overflow
    |--------------------------------------------------------------------------
    */

    body,
    html {

        overflow-x: hidden;
    }

    /*
    |--------------------------------------------------------------------------
    | Search Popup Fix
    |--------------------------------------------------------------------------
    */

    .search-box-container {

        position: fixed;

        top: 70px;
        left: 16px;
        right: 16px;

        width: auto;

        z-index: 9999;
    }

    /*
    |--------------------------------------------------------------------------
    | Search Input
    |--------------------------------------------------------------------------
    */

    #ajax-product-search {

        width: 100%;

        min-width: 0;
    }

    /*
|--------------------------------------------------------------------------
| Mobile Search Wrapper
|--------------------------------------------------------------------------
*/

.custom-search-wrapper {

    width: 100%;
}

/*
|--------------------------------------------------------------------------
| Search Box Container
|--------------------------------------------------------------------------
*/

.search-box-container {

    position: relative !important;

    top: auto !important;
    left: auto !important;
    right: auto !important;

    width: 100%;

    margin-top: 16px;
    margin-bottom: 10px;

    display: block;

    opacity: 1 !important;
    visibility: visible !important;

    transform: none !important;
}

/*
|--------------------------------------------------------------------------
| Search Form
|--------------------------------------------------------------------------
*/

.custom-search-form {

    width: 100%;

    display: flex;
    align-items: center;

    gap: 12px;
}

/*
|--------------------------------------------------------------------------
| Search Input
|--------------------------------------------------------------------------
*/

#ajax-product-search {

    flex: 1;

    width: 100%;

    height: 52px;

    padding: 0 18px;

    border-radius: 999px;

    border: 1px solid #ddd;

    font-size: 15px;
}

/*
|--------------------------------------------------------------------------
| Search Toggle Button
|--------------------------------------------------------------------------
*/

.search-toggle-btn {

    width: 52px;
    height: 52px;

    min-width: 52px;

    border-radius: 999px;
}


    /*
    |--------------------------------------------------------------------------
    | Hide Toggle Button
    |--------------------------------------------------------------------------
    */

    .search-toggle-btn {

        display: none !important;
    }

    /*
    |--------------------------------------------------------------------------
    | Always Show Search
    |--------------------------------------------------------------------------
    */

    .search-box-container {

        display: block !important;

        position: relative !important;

        opacity: 1 !important;
        visibility: visible !important;

        transform: none !important;

        width: 100%;

        margin-top: 20px;
    }

    /*
    |--------------------------------------------------------------------------
    | Search Form
    |--------------------------------------------------------------------------
    */

    .custom-search-form {

        width: 100%;
    }

    /*
    |--------------------------------------------------------------------------
    | Search Input
    |--------------------------------------------------------------------------
    */

    #ajax-product-search {

        width: 100%;

        height: 54px;

        padding: 0 20px;
		
		margin-top:10px;

        border-radius: 999px;

        border: 1px solid #ddd;

        font-size: 16px;

        background: #fff;
		
		border-color:purple;
    }

}

/*
|------------------------------------------------------------------
| Mobile Category Dropdown
|------------------------------------------------------------------
*/

.mobile-category-filter {

    display: none;
}

@media (max-width: 768px) {

    /*
    |------------------------------------------------------------------
    | Hide Desktop Buttons
    |------------------------------------------------------------------
    */

    .search-filters {

        display: none;
    }

    /*
    |------------------------------------------------------------------
    | Show Mobile Dropdown
    |------------------------------------------------------------------
    */

    .mobile-category-filter {

        display: block;

        width: 100%;

        margin-top: 16px;
    }

    #mobile-category-select {

        width: 100%;

        height: 52px;

        padding: 0 16px;

        border-radius: 14px;

        border: 1px solid #ddd;

        background: #fff;

        font-size: 15px;

        outline: none;
    }
}

/* ==========================================================
   ASTRA HEADER - FORCE SEARCH TO FULL WIDTH ROW
========================================================== */

@media (max-width: 768px) {

    /*
    |--------------------------------------------------------------------------
    | Allow header section to wrap items
    |--------------------------------------------------------------------------
    */

    .site-header-below-section-center {

        display: flex !important;

        flex-wrap: wrap !important;

        align-items: center;
    }

    /*
    |--------------------------------------------------------------------------
    | Force search container to break row
    |--------------------------------------------------------------------------
    */

    .ast-header-html-1 {

        flex: 0 0 100% !important;

        width: 100% !important;

        max-width: 100% !important;

        order: 3; /* pushes it below logo + burger */
    }

    /*
    |--------------------------------------------------------------------------
    | Make wrapper full width
    |--------------------------------------------------------------------------
    */

    .custom-search-wrapper {

        width: 100% !important;

        display: flex;

        justify-content: center;
    }

    /*
    |--------------------------------------------------------------------------
    | Search container full width
    |--------------------------------------------------------------------------
    */

    .search-box-container {

        width: 100% !important;

        max-width: 100% !important;
    }

    /*
    |--------------------------------------------------------------------------
    | Input full width
    |--------------------------------------------------------------------------
    */

    #ajax-product-search {

        width: 100% !important;

        max-width: 100% !important;
    }
}

/* =============================================
   BUSCADOR FULL WIDTH EN CELULARES - MÁS ANCHO (Edge to Edge)
   ============================================= */
@media (max-width: 768px) {

    /* Header containers - Padding mínimo */
    .site-header .ast-container,
    .site-header-below-section-center,
    .ast-builder-grid-row-container,
    .ast-builder-grid-row {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 10px !important;        /* reducido */
        box-sizing: border-box !important;
    }

    /* Contenedor del buscador Astra */
    .ast-header-html-1 {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Wrapper del buscador */
    .custom-search-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        padding: 0 !important;
    }

    /* Caja del buscador - Muy poco padding */
    .search-box-container {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 3px !important;           /* casi al borde */
        margin: 0 auto !important;
    }

    /* Input - Máximo ancho */
    .custom-product-search-form input,
    #ajax-product-search {
        width: 100% !important;
        max-width: 100% !important;
        height: 56px !important;
        padding: 0 20px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* Ocultar toggle */
    .search-toggle-btn {
        display: none !important;
    }
	
	
}

/* =============================================
   BUSCADOR FULL WIDTH EN TABLETAS - TARGET DIRECTO
   ============================================= */


@media (max-width: 768px) {
    .ast-header-break-point .ast-header-html-1 {
        display: flex;
		margin-top:20px !important;
		padding: 0px !important;
    }
	
}
	
@media (max-width: 768px) {
	.site-header .ast-container, .site-header-below-section-center, .ast-builder-grid-row-container, .ast-builder-grid-row {
		width: 100% !important;
		max-width: 100% !important;
		padding: 0px !important;
		padding-left:10px !important;
		box-sizing: border-box !important;
		
	}
}
	
@media (max-width: 768px) {
	.custom-product-search-form input, #ajax-product-search {
		width: 90vw !important;
		max-width: 100% !important;
		height: 56px !important;
		padding: 20px !important;
		margin: 0 !important;
		margin-bottom:10px !important;
		box-sizing: border-box !important;
	}
}
	
	@media (max-width: 767px) {
	.custom-product-search-form input, #ajax-product-search {
		width: 76vw !important;
		max-width: 100% !important;
		height: 56px !important;
		padding: 0 20px !important;
		margin: 0 !important;
		box-sizing: border-box !important;
		margin-bottom:10px !important;
	}
	.site-header .ast-container, .site-header-below-section-center, .ast-builder-grid-row-container, .ast-builder-grid-row {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0px !important;
        box-sizing: border-box !important;
    }
}
	
		@media (max-width: 320px) {
	.custom-product-search-form input, #ajax-product-search {
		width: 100% !important;
		max-width: 100% !important;
		height: 56px !important;
		padding-right:10px !important;
		box-sizing: border-box !important;
	}
}