/* Container de categorias y botón de compartir */
.sas-archive-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 20px;
}

.sas-archive-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.sas-archive-breadcrumb a {
    color: #8A8A8A;
    text-decoration: none;
    transition: color .2s ease;
}

.sas-archive-breadcrumb a:hover {
    color: #ffffff;
}

.sas-breadcrumb-sep {
    color: #8A8A8A;
}

.sas-breadcrumb-current {
    color: #cc0000;
    font-weight: 600;
}

/* Container de Categorias, grilla y filtros */
.sas-archive-main {
    display: flex;
    padding: 0 15px;
    gap: 15px;
    align-items: flex-start;
}

.sas-archive-categories, .sas-archive-filters {
    width: 20%;
    flex-shrink: 0;
}

.sas-archive-products {
    flex: 1;
    min-width: 0;
}

/* Estilo categorias */
.sas-archive-categories {
    width: 20%;
    flex-shrink: 0;
    background: #0A0A0A;
    border-radius: 12px;
    overflow: hidden;    
    border: 1px solid #555;
}

.sas-archive-categories-title {
    padding: 14px 16px;
    color: #ffffff;
    font-size: 28px;
    font-weight: 600;
    position: relative;
}

.sas-archive-categories-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: #cc0000;
    margin-top: 8px;
}

.sas-categorias-lista,
.sas-subcategorias {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sas-categoria-padre-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
}

.sas-categoria-padre-link {
    flex: 1;
    color: #ffffff;
    text-decoration: none;
    font-size: 22px;
    font-weight: 500;
    transition: color .2s ease;
}

.sas-categoria-padre-link:hover {
    color: #cc0000;
}

.sas-archive-categories .sas-toggle {
    background: transparent;
    border: none;
    box-shadow: none;
    outline: none;
    color: #ffffff;
    font-size: 36px;
    width: 36px;
    font-weight: 400;
    cursor: pointer;
    text-align: center;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.sas-archive-categories .sas-toggle:hover {
    background: transparent;
    color: #cc0000;
}

.sas-archive-categories .sas-toggle:focus,
.sas-archive-categories .sas-toggle:active,
.sas-archive-categories .sas-toggle:focus-visible {
    outline: none;
    box-shadow: none;
    background: transparent;
}

.sas-subcategorias {
    height: 0;
    overflow: hidden;
    transition: height .35s ease;
}

.sas-categoria-hija-link {
    display: block;
    position: relative;
    padding: 6px 10px 6px 20px;
    color: #B0B0B0;
    text-decoration: none;
    font-size: 20px;
    transition: color .2s ease, padding-left .2s ease;
}

.sas-categoria-hija-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: #cc0000;
    transition: width .2s ease;
}

.sas-categoria-hija-link:hover::before{
    width: 2px;
}

.sas-categoria-hija-link.sas-categoria-activa::before {
    width: 0;
}
.sas-categoria-hija-link:hover,
.sas-categoria-hija-link.sas-categoria-activa {
    color: #cc0000;
    padding-left: 27px;
}

/* Grilla de productos */
.sas-archive-products{
    background-color: #0A0A0A;
    border-radius: 12px;
    border: 1px solid #555;
}

.sas-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
    align-items:start;
    padding: 10px;
}

.sas-card{
    position:relative;
    background:#fff;
    border-radius:16px;
    padding:15px;
    overflow:hidden;
    height:100%;
    display:flex;
    flex-direction:column;
}

/* Titulo categoria y productos encontrados */
.sas-products-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 16px;
}

.sas-products-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 600;
    position: relative;
}

.sas-products-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: #cc0000;
    margin-top: 8px;
}

.sas-products-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.sas-products-count {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #7A7A7A;
    font-size: 18px;
}

.sas-products-count svg {
    width: 16px;
    height: 16px;
    color: #7A7A7A;
}

.sas-archive-products .sas-share-button {
    display: flex;
    align-items: center;
    background: #0A0A0A;
    color: #ffffff;
    border: 1px solid #555;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
    font-size: 16px;
    gap: 5px;
    padding: 8px 14px;
    transition:
        transform 0.3s ease,
        background-color 0.3s ease,
        color 0.3s ease;
}

.sas-archive-products .sas-share-button:hover {
    background: #0A0A0A;
    border-color: #ffffff;
}

/* =====================
   IMAGEN
===================== */
.sas-card-image{
    position:relative;
    display:block;
    overflow:hidden;
    border-radius:16px;
    text-decoration:none;
}

.sas-main-image,
.sas-second-image{
    width:100%;
    height:auto;
    display:block;
    border-radius:16px;
    transition: opacity .5s ease, transform .5s ease !important;
	pointer-events:none;
}

/* estado base */
.sas-main-image{
    position:relative;
    opacity:1;
    transform:scale(1.15);
}

.sas-second-image{
    position:absolute;
    inset:0;
    z-index:1;
    opacity:0 !important; 
    transform:scale(1.15);
}

/* hover sin segunda imagen */
.sas-card:not(.sas-has-second-image):hover .sas-main-image{
    transform:scale(1);
}

/* hover con segunda imagen */
.sas-has-second-image:hover .sas-main-image{
    opacity:0;
    transform:scale(1);
}

.sas-has-second-image:hover .sas-second-image{
    opacity:1 !important;
    transform:scale(1);
}

/* =====================
   CATEGORÍA
===================== */

.sas-card-category{
    margin-top: 8px;
    margin-bottom: 2px;
    font-size:16px;
    font-weight:600;
}

.sas-card-category a{
    display:block;
    color:#000;
    text-decoration:none;
    transition:.2s;
}

.sas-card-category a:hover{
    color:#cc0000;
}

/* =====================
   TÍTULO
===================== */
.sas-card-label{
    display: block;
    text-decoration: none;
    margin-top: 2px;
    font-size:18px;
    font-weight:700;
    color: #CC0000;
}

.sas-card-label:hover{
    color: #CC0000;
}

.sas-card-title{
    font-size:30px;
    font-weight:700;
    margin: 0;
}

.sas-card-title a{
    display:block;
    color:#000;
    text-decoration:none;
    transition:.2s;
}

.sas-card-title a:hover{
    color:#cc0000;
}

/* =====================
   DESCRIPCIÓN
===================== */

.sas-card-description{
    display:block;
    color:#333;
    font-size:16px;
    white-space:normal;
    text-decoration:none;
    transition:.2s;
    white-space:normal;
}

/* =====================
   Paginación
===================== */

.sas-pagination{
    display:flex;
    justify-content:center;
    align-items:center;
    margin:8px 0;
    padding:0;
    line-height:1;
}

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

    min-width:40px;
    height:40px;
    margin:0 4px;
    padding:0 12px;

    border-radius:8px;

    background:#f5f5f5;
	border:1px solid #f5f5f5;
    color:#000;
    text-decoration:none;
    font-weight:600;

    transition:.2s;
}

.sas-pagination .page-numbers:hover{
    background:#000000;
	border:1px solid white;
    color:#ffffff;
}

.sas-pagination .current{
    background:#cc0000;
	border:1px solid #cc0000;
    color:#fff;
}

.sas-pagination .dots{
    color:#424242;
	border:1px solid #f5f5f5;
    opacity:.5;
	background:#f5f5f5;
    cursor:default;

}

.sas-pagination .disabled{
    opacity:.45;
    pointer-events:none;
    cursor:default;
}

.sas-pagination .dots{
    color:#777;
}

.sas-pagination .sas-arrow{
    font-size:16px;
    font-weight:500;
}

/* Cartel de no se encontraron productos */
.sas-no-products-found {
    font-size: 20px;
    font-weight: 400;
    color: white;
    text-align: center;
    padding: 20px;
    background-color: transparent;
}

/* Filtros */
.sas-archive-filters {
    background: #0A0A0A;
    border-radius: 12px;
    border: 1px solid #555;
    overflow: visible;
}

.sas-archive-filters-title {
    padding: 14px 16px;
    color: #ffffff;
    font-size: 28px;
    font-weight: 600;
    position: relative;
}

.sas-archive-filters-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: #cc0000;
    margin-top: 8px;
}

.sas-archive-filters .yith-wcan-filter {
    padding: 0 10px;
}

.yith-wcan-filters,
.yith-wcan-filters .yith-wcan-filter .filter-title {
    background-color: transparent !important;
    color: white !important;
    border: none !important;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.yith-wcan-filters .yith-wcan-filter .yith-wcan-dropdown.open {
    box-shadow: 0 0 10px 0 #cc0000;
}

.yith-wcan-filters .yith-wcan-filter .yith-wcan-dropdown:not(.open):after {
    background-image: url(https://sasfrenos.com.ar/wp-content/plugins/yith-woocommerce-ajax-navigation/assets/images/arrow-down.svg);
    filter: invert(1) brightness(2);
    width: 10px;
    height: 10px;
}

.yith-wcan-filters .yith-wcan-filter .yith-wcan-dropdown.open:after {
    background-image: url(https://sasfrenos.com.ar/wp-content/plugins/yith-woocommerce-ajax-navigation/assets/images/arrow-down.svg);
    filter: invert(1) brightness(2);
    transform: rotate(180deg);
}

.yith-wcan-filters .yith-wcan-filter .yith-wcan-dropdown .dropdown-wrapper .search-field-container:after {
    background-image: url(https://sasfrenos.com.ar/wp-content/plugins/yith-woocommerce-ajax-navigation/assets/images/search.svg);
    background-size: 100% auto;
    content: "";
    display: block;
    height: 25px;
    position: absolute;
    right: 10px;
    top: 10px;
    width: 25px;
    filter: invert(1) brightness(2);
}

.yith-wcan-filters .yith-wcan-filter .yith-wcan-dropdown .dropdown-wrapper .show-more {
    color: #cc0000;
}

.btn.btn-primary.yith-wcan-reset-filters.reset-filters.enhanced {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px auto 12px auto;
    width: auto;
    background: #0A0A0A;
    color: #ffffff;
    border: 1px solid #555;
    border-radius: 12px;
    padding: 10px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease;
}

.btn.btn-primary.yith-wcan-reset-filters.reset-filters.enhanced:hover {
    background: #0A0A0A;
    border-color: #CC0000;
}

input[type="search"]::-webkit-search-cancel-button {
  /* Remove the default browser appearance */
  -webkit-appearance: none;
  appearance: none;

  /* Use a red cross SVG as the background image */
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="%23CC0000" d="M8 6.5l3.5-3.5 1.5 1.5-3.5 3.5 3.5 3.5-1.5 1.5-3.5-3.5-3.5 3.5-1.5-1.5 3.5-3.5-3.5-3.5 1.5-1.5z"/></svg>');
  background-repeat: no-repeat;
  background-size: 12px 12px; /* Adjust size as needed */
  background-position: center; /* Center the icon */

  /* Define the clickable area size (adjust if needed) */
  width: 16px;
  height: 16px;

  /* Optional: Change cursor to indicate interactivity */
  cursor: pointer;
}


/* Responsive */
/* Desktop: ocultar elementos mobile */
.sas-mobile-bar,
.sas-drawer,
.sas-drawer-overlay {
    display: none;
}

/* Mobile */
@media (max-width: 768px) {
    .sas-archive-breadcrumb {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    /* Ocultar columnas del layout */
    .sas-archive-categories,
    .sas-archive-filters {
        display: none;
    }

    .sas-archive-main {
        flex-direction: column;
    }

    /* Barra mobile */
    .sas-mobile-bar {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 16px;
        padding: 0 10px;
    }

    .sas-mobile-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1;
        justify-content: center;
        background: #0A0A0A;
        color: #ffffff;
        border: 1px solid #555;
        border-radius: 12px;
        padding: 10px 14px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
    }

    .sas-mobile-btn svg {
        width: 18px;
        height: 18px;
    }

    /* Overlay */
    .sas-drawer-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.6);
        z-index: 998;
        display: none;
    }

    .sas-drawer-overlay.active {
        display: block;
    }

    /* Drawer base */
    .sas-drawer {
        position: fixed;
        top: 0;
        bottom: 0;
        width: 85%;
        max-width: 360px;
        background: #0A0A0A;
        border: 1px solid #555;
        z-index: 999;
        display: flex;
        flex-direction: column;
        transition: transform .3s ease;
        overflow-y: auto;
    }

    .sas-drawer-categorias {
        left: 0;
        transform: translateX(-100%);
    }

    .sas-drawer-filtros {
        right: 0;
        transform: translateX(100%);
    }

    .sas-drawer.active {
        transform: translateX(0);
    }

    /* Header del drawer */
    .sas-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px;
        border-bottom: 1px solid #555;
        color: #ffffff;
        font-size: 18px;
        font-weight: 600;
        flex-shrink: 0;
    }

    .sas-drawer-close {
        background: transparent;
        border: none;
        color: #ffffff;
        font-size: 20px;
        cursor: pointer;
        padding: 0;
        line-height: 1;
    }

    .sas-drawer-close:hover {
        color: #cc0000;
    }
    
    .sas-mobile-bar{
        padding: 0 15px ;
    }
    .sas-mobile-bar .sas-mobile-btn{
        background: transparent;
        border: 1px solid #555;
        border-radius: 12px;
        color: #ffffff;
        padding: 10px 14px;
    }
    
    .sas-mobile-bar .sas-mobile-btn span {
        font-size: 15px;
        font-weight: 600;
        color: #ffffff;
    }
    
    .sas-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sas-archive-products {
        width: 100%;
        min-width: 0;
    }
    
    .sas-products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .sas-products-header-right {
        width: 100%;
        justify-content: space-between;
    }
    
        .sas-products-count svg {
        width: 45px;
        height: 45px;
    }
    
    .sas-drawer .sas-archive-categories,
    .sas-drawer .sas-archive-filters {
        display: block;
        width: 100%;
        border: none;
        border-radius: 0;
    }

    .sas-drawer-header {
        position: absolute;
        top: 0;
        right: 0;
        padding: 14px 16px;
        border: none;
        z-index: 1;
    }

    .sas-drawer-header .sas-drawer-close {
        background: transparent;
        color: #ffffff;
    }
    
    .sas-drawer {
        position: fixed;
    }
    
    .sas-card-category{
        font-size: 14px;
    }