/********** Template CSS **********/

/* Overflow-x controlado por cada componente individualmente */

:root {
    --primary: #dc2626;      /* Rojo principal */
    --primary-dark: #991b1b; /* Rojo oscuro */
    --secondary: #111111;    /* Negro */
    --silver: #e5e5e5;       /* Plata / gris claro */
    --light: #f7f7f7;
    --dark: #111111;
}

/* ── Bootstrap primary override → paleta rojo/negro ── */
.btn-primary {
    background: linear-gradient(135deg, #dc2626, #991b1b) !important;
    border-color: #dc2626 !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #b91c1c, #7f1d1d) !important;
    border-color: #b91c1c !important;
    box-shadow: 0 4px 14px rgba(220,38,38,.4) !important;
}
.btn-outline-primary {
    color: #dc2626 !important;
    border-color: #dc2626 !important;
}
.btn-outline-primary:hover {
    background: #dc2626 !important;
    color: #fff !important;
}
a { color: #dc2626; }
a:hover { color: #991b1b; }

.store-proclinic-hero__subtitle--strong{
    font-weight: 900;
    color: #111;
}

.store-proclinic-hero__badges{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    align-items: center;
}

.store-proclinic-badge{
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 140px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #111;
    color: #fff;
    text-decoration: none;
    line-height: 1.1;
}

.store-proclinic-badge__top{
    font-size: 11px;
    opacity: .85;
    font-weight: 700;
}

.store-proclinic-badge__brand{
    font-size: 14px;
    font-weight: 900;
}

.store-proclinic-rating{
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,.85);
    border: 1px solid rgba(0,0,0,.08);
    min-width: 120px;
}

.store-proclinic-rating__score{
    font-weight: 900;
    font-size: 12px;
    color: #111;
}

.store-proclinic-rating__stars{
    color: #f5b301;
    letter-spacing: 1px;
    font-size: 14px;
    line-height: 1;
}

.store-offers{
    margin-top: 4px;
}

.store-offers__title{
    font-weight: 900;
    font-size: 22px;
    color: #111;
    margin-bottom: 14px;
}

.store-offers__tabs{
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 10px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.store-offers__tabs::-webkit-scrollbar{ display:none; }

.store-offers__tab{
    border: 0;
    background: #000;
    color: #fff;
    font-weight: 900;
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    min-width: 160px;
    text-align: center;
}

.store-offers__tab.is-active{
    background: #000;
    color: #fff;
}

.store-offers__panel{ display:none; }
.store-offers__panel.is-active{ display:block; }

.store-offers__grid{
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.store-offer-card{
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.store-offer-card__top{
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 8px;
    min-height: 20px;
}

.store-offer-card__discount{
    background: #dc3545;
    color: #fff;
    font-weight: 900;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 8px;
    line-height: 1;
}

.store-offer-card__brand{
    color: rgba(0,0,0,.55);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    text-align: right;
    margin-left: auto;
}

.store-offer-card__img-link{ display:block; margin-top: 10px; }

.store-offer-card__img{
    width: 100%;
    height: 150px;
    object-fit: contain;
    display:block;
    flex-shrink: 0;
}

.store-offer-card__name{
    margin-top: 10px;
    font-weight: 900;
    font-size: 12px;
    line-height: 1.3;
    min-height: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.store-offer-card__name a{ color:#111; text-decoration:none; }

.store-offer-card__price{
    margin-top: 8px;
    display:flex;
    align-items: baseline;
    gap: 8px;
}

.store-offer-card__price-now{
    font-weight: 900;
    font-size: 18px;
    color: #111;
}

.store-offer-card__price-old{
    color: rgba(0,0,0,.45);
    text-decoration: line-through;
    font-size: 12px;
    font-weight: 800;
}

.store-offer-card__actions{
    margin-top: auto;
    display:flex;
    gap: 10px;
    align-items:center;
}

.store-offer-qty{
    display: inline-flex;
    align-items:center;
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 10px;
    overflow:hidden;
    height: 36px;
}

.store-offer-qty__btn{
    width: 34px;
    height: 36px;
    border: 0;
    background: #f4f6f8;
    font-weight: 900;
    cursor:pointer;
}

.store-offer-qty__input{
    width: 42px;
    height: 36px;
    border: 0;
    text-align: center;
    font-weight: 900;
    outline: none;
}

.store-offer-add{
    flex: 1;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #000;
    color: #fff;
    font-weight: 900;
    font-size: 12px;
    white-space: nowrap;
}

.store-offer-add:hover,
.store-offer-add:focus{
    background: #111;
    color: #fff;
}

.store-offer-add--disabled{
    background: #7b8aa8;
}

@media (max-width: 1199.98px){
    .store-offers__grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 991.98px){
    .store-offers__grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .store-offers__tab{ min-width: 140px; }
}

@media (max-width: 575.98px){
    .store-offers__title{ font-size: 18px; }
}

/* ── Mega-menú ── */
.megamenu-bar{
    border-bottom: 1px solid rgba(0,0,0,.08);
    position: relative;
    z-index: 99999;
}

#carouselExampleCaptions{
    position: relative;
    z-index: 1;
}

/* Sin max-height aquí: choca con .carousel-inner { aspect-ratio } en carrusel-custom.css y deja franja blanca bajo el banner */

.megamenu-bar__list{
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    overflow-x: auto;
    padding: 0 10px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.megamenu-bar__list::-webkit-scrollbar{ display:none; }

.megamenu-bar__item{
    position: relative;
}

.megamenu-bar__link{
    display: block;
    padding: 12px 18px;
    font-weight: 800;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: .3px;
    border-bottom: 3px solid transparent;
    transition: border-color .15s, color .15s;
}

.megamenu-bar__link:hover,
.megamenu-bar__item.is-open .megamenu-bar__link{
    color: #111;
    border-bottom-color: #111;
    text-decoration: none;
}

.megamenu-panel{
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    min-width: 700px;
    max-width: 1140px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid rgba(0,0,0,.10);
    border-top: 3px solid #111;
    box-shadow: 0 12px 32px rgba(0,0,0,.15);
    border-radius: 0 0 10px 10px;
    z-index: 999999;
}

.megamenu-bar__item.is-open .megamenu-panel{
    display: block;
}

.megamenu-panel__inner{
    display: flex;
    padding: 0;
    gap: 0;
    min-height: 260px;
}

/* ── Columna izquierda: categorías ── */
.megamenu-panel__subs{
    min-width: 210px;
    max-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #f7f7f7;
    border-right: 1px solid rgba(0,0,0,.07);
    padding: 10px 0;
    border-radius: 0 0 0 10px;
    overflow-y: auto;
    max-height: 320px;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f7f7f7;
}

.megamenu-panel__subs::-webkit-scrollbar{
    width: 4px;
}
.megamenu-panel__subs::-webkit-scrollbar-track{
    background: #f7f7f7;
}
.megamenu-panel__subs::-webkit-scrollbar-thumb{
    background: #ccc;
    border-radius: 4px;
}

.megamenu-panel__sub-link{
    display: block;
    padding: 9px 16px 9px 18px;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background .12s, color .12s, border-left-color .12s;
    white-space: normal;
    line-height: 1.3;
}

.megamenu-panel__sub-link:hover{
    background: #ebebeb;
    color: #111;
    border-left-color: #111;
    text-decoration: none;
}

.megamenu-panel__sub-link.is-active{
    background: #fff;
    color: #111;
    font-weight: 700;
    border-left-color: #111;
}

.megamenu-panel__ver-todo{
    display: block;
    margin: 6px 16px 4px 18px;
    color: #555;
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.megamenu-panel__ver-todo:hover{
    text-decoration: underline;
}

/* ── Columna central: subcategorías ── */
.megamenu-panel__subsubs{
    min-width: 220px;
    max-width: 270px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-right: 1px solid rgba(0,0,0,.07);
    padding: 10px 0;
}

.megamenu-panel__subsubs .megamenu-panel__sub-link{
    background: #fff;
    font-weight: 500;
}

.megamenu-panel__subsubs .megamenu-panel__sub-link:hover{
    background: #ebebeb;
    color: #111;
    border-left-color: #111;
}

.megamenu-panel__subsubs .megamenu-panel__sub-link.is-active{
    background: #e8e8e8;
    color: #111;
    font-weight: 700;
    border-left-color: #111;
}

.megamenu-subsub-group{
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

/* ── Columna derecha: producto destacado ── */
.megamenu-panel__featured{
    width: 250px;
    min-width: 210px;
    padding: 18px 16px 14px;
    display: flex;
    flex-direction: column;
}

.megamenu-panel__featured-title{
    font-weight: 900;
    font-size: 14px;
    color: #111;
    margin-bottom: 12px;
}

.megamenu-featured-card{
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #111;
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow .15s;
    flex: 1;
}

.megamenu-featured-card:hover{
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    text-decoration: none;
    color: #111;
}

.megamenu-featured-card__img-wrap{
    background: #fff;
    text-align: center;
    padding: 18px 14px 12px;
}

.megamenu-featured-card__img{
    width: 120px;
    height: 110px;
    object-fit: contain;
}

.megamenu-featured-card__body{
    padding: 10px 12px 10px;
    flex: 1;
}

.megamenu-featured-card__brand{
    font-size: 10px;
    font-weight: 800;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
}

.megamenu-featured-card__name{
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.megamenu-featured-card__price{
    font-size: 17px;
    font-weight: 900;
    color: #111;
}

.megamenu-featured-card__btn{
    display: block;
    background: #111;
    color: #fff;
    text-align: center;
    padding: 9px 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .15s;
}

.megamenu-featured-card__btn:hover{
    background: #333;
    color: #fff;
    text-decoration: none;
}

@media (max-width: 991.98px){
    .megamenu-bar__list{
        justify-content: flex-start;
        padding: 0;
    }
    .megamenu-panel{
        min-width: 100%;
        left: 0;
        right: 0;
        position: fixed;
        border-radius: 0;
    }
    .megamenu-panel__inner{
        flex-direction: column;
        gap: 0;
        overflow-y: auto;
        max-height: 80vh;
    }
    .megamenu-panel__subs{
        border-right: none;
        border-radius: 0;
        border-bottom: 1px solid rgba(0,0,0,.07);
        max-width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 6px 0;
    }
    .megamenu-panel__subs .megamenu-panel__sub-link{
        white-space: normal;
    }
    .megamenu-panel__subsubs{
        border-right: none;
        border-bottom: 1px solid rgba(0,0,0,.07);
        max-width: 100%;
        max-height: min(42vh, 320px);
    }
    .megamenu-panel__featured{
        width: 100%;
        min-width: 0;
        padding: 12px;
    }
    .megamenu-featured-card{
        flex-direction: row;
    }
    .megamenu-featured-card__img-wrap{
        width: 90px;
        flex-shrink: 0;
        padding: 10px;
    }
    .megamenu-featured-card__img{
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 575.98px){
    .megamenu-bar__link{
        padding: 10px 12px;
        font-size: 12px;
    }
}
/* ── Mega-menú Fin ── */

/* ── Category Page (Proclinic style) ── */
.cat-breadcrumb ol{
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    gap: 6px;
    font-size: 13px;
}
.cat-breadcrumb li + li::before{
    content: "›";
    margin-right: 6px;
    color: #999;
}
.cat-breadcrumb a{
    color: #555;
    text-decoration: none;
}
.cat-breadcrumb a:hover{
    color: #000;
    text-decoration: underline;
}
.cat-breadcrumb .is-active{
    color: #000;
    font-weight: 700;
}

.cat-header{
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 20px;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
}
.cat-header__title{
    font-size: 26px;
    font-weight: 900;
    margin: 0;
    color: #000;
}
.cat-header__count{
    font-size: 13px;
    color: #777;
    font-weight: 600;
}

.cat-layout{
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
    align-items: start;
}

/* Sidebar */
.cat-sidebar{
    position: sticky;
    top: 100px;
}

/* Ocultar menú de navegación principal en páginas de productos */
body.product-page .site-header-nav {
    display: none !important;
}

/* Mostrar siempre el megamenú en páginas de productos */
body.product-page .megamenu-bar {
    display: block !important;
}
.cat-sidebar__section{
    margin-bottom: 22px;
}
.cat-sidebar__heading{
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    color: #000;
    margin: 0 0 10px;
    letter-spacing: .3px;
}
.cat-sidebar__list{
    list-style: none;
    padding: 0;
    margin: 0;
}
.cat-sidebar__list li{
    margin-bottom: 2px;
}
.cat-sidebar__link{
    display: block;
    padding: 6px 0;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    text-decoration: none;
    transition: color .15s;
}
.cat-sidebar__link:hover{
    color: #000;
    text-decoration: none;
}
.cat-sidebar__link.is-active{
    color: #000;
    font-weight: 800;
    border-left: 3px solid #000;
    padding-left: 10px;
}
.cat-sidebar__link--all{
    color: #000;
    font-weight: 800;
    font-size: 12px;
    margin-top: 4px;
}
.cat-sidebar__check{
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
    padding: 3px 0;
}
.cat-sidebar__check input{
    accent-color: #000;
}
.cat-sidebar__price-row{
    display: flex;
    align-items: center;
    gap: 8px;
}
.cat-sidebar__price-input{
    width: 80px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 13px;
}
.cat-sidebar__btn{
    display: block;
    width: 100%;
    padding: 10px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    margin-top: 6px;
    transition: opacity .15s;
}
.cat-sidebar__btn:hover{
    opacity: .85;
}

/* Product grid */
.cat-products__grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.cat-products__empty{
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 16px;
}

/* Product card */
.cat-card{
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow .18s;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.cat-card:hover{
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
}
.cat-card__media-wrap{
    position: relative;
    background: #fff;
}
/* Enlace solo envuelve la imagen; pointer-events evita que el área grande robe clics al corazón */
.cat-card__img-wrap{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #fff;
    min-height: 220px;
    pointer-events: none;
}
.cat-card__img-wrap .cat-card__img{
    pointer-events: auto;
    cursor: pointer;
}
.cat-card__media{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #fff;
    height: 200px;
    flex-shrink: 0;
    overflow: hidden;
}
.cat-card__fav-btn{
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.96);
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: auto;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
    padding: 0;
    line-height: 1;
    transition: color .15s ease, border-color .15s ease, transform .15s ease;
}
.cat-card__fav-btn:hover{
    color: #e11d48;
    border-color: rgba(225, 29, 72, 0.35);
    transform: scale(1.05);
}
.cat-card__fav-btn.is-active{
    color: #e11d48;
    border-color: rgba(225, 29, 72, 0.45);
    background: #fff;
}
.cat-card__fav-btn:focus{
    outline: 2px solid rgba(13, 110, 253, 0.45);
    outline-offset: 2px;
}
.cat-card__fav-btn i{
    font-size: 16px;
    pointer-events: none;
}
.cat-card__img{
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.cat-card__body{
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.cat-card__brand{
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: rgba(0,0,0,.4);
    margin-bottom: 4px;
}
.cat-card__name{
    font-size: 13px;
    font-weight: 700;
    color: #111;
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 6px;
    min-height: 34px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cat-card__name:hover{
    color: #000;
    text-decoration: underline;
}
.cat-card__old-price{
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}
.cat-card__price-row{
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.cat-card__price{
    font-size: 18px;
    font-weight: 900;
    color: #000;
}
.cat-card__discount{
    background: #e63946;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
}
.cat-card__actions{
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cat-card__add{
    flex: 1;
    padding: 8px 12px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: opacity .15s;
}
.cat-card__add:hover{
    opacity: .85;
}
.cat-card__add--disabled{
    background: #ccc;
    color: #888;
    cursor: not-allowed;
}

/* Wishlist heart button on cards */
.cat-card__wish{
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.10);
    background: rgba(255,255,255,.92);
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: background .15s, color .15s, transform .15s;
    backdrop-filter: blur(4px);
    z-index: 2;
}
.cat-card__wish:hover,
.cat-card__wish.is-wishlisted{
    background: #fff;
    color: #dc3545;
    transform: scale(1.1);
}
.cat-card__wish.is-wishlisted i{
    font-weight: 900;
}

/* Pagination */
.cat-pagination{
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
    padding-bottom: 20px;
}
.cat-pagination__link{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    transition: all .15s;
}
.cat-pagination__link:hover{
    background: #f5f5f5;
    text-decoration: none;
    color: #000;
}
.cat-pagination__link.is-active{
    background: #000;
    color: #fff;
    border-color: #000;
}

/* =====================================================
   ESTILOS DEL FORMULARIO DE REGISTRO - DDVC
   ===================================================== */
.ddvc-register-wrap{max-width:980px; margin:0 auto;}
.ddvc-register-title{font-size:34px; font-weight:700; text-align:center; color:#000; margin:28px 0 22px;}
.ddvc-section-title{font-size:18px; font-weight:700; margin:18px 0 10px;}
.ddvc-hr{border:0; border-top:2px solid rgba(15,23,42,.10); margin:10px 0 18px;}
.ddvc-field label{font-size:13px; font-weight:600; color:#0f172a; margin-bottom:8px;}
.ddvc-field .form-control,
.ddvc-field .form-select{border-radius:999px; height:48px; padding:10px 16px; border:1px solid rgba(15,23,42,.14); box-shadow:none;}
.ddvc-field .form-control:focus,
.ddvc-field .form-select:focus{border-color:#0b5ed7; box-shadow:none;}
.ddvc-checks .form-check{margin:10px 0;}
.ddvc-primary-btn{border-radius:999px; padding:14px 26px; font-weight:800; font-size:16px; background:#000; border-color:#000; min-width:240px;}
.ddvc-primary-btn:hover{background:#111; border-color:#111;}

/* Category Layout - FORZAR ESTILOS */
.cat-layout{
    display: grid !important;
    grid-template-columns: 260px minmax(0, 1fr) !important;
    gap: 32px !important;
    align-items: start !important;
}
.cat-products__grid{
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 20px !important;
}
.cat-card{
    background: #fff !important;
    border: 1px solid rgba(0,0,0,.06) !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    transition: box-shadow .18s !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* ── Botón "Filtros" solo visible en móvil ── */
.sf-toggle-btn{
    display: none;
    width: 100%;
    padding: 10px 16px;
    margin-bottom: 12px;
    background: #fff;
    border: 1.5px solid #d0d0d0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #111;
    cursor: pointer;
    text-align: left;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}
.sf-toggle-btn__badge{
    background: #000;
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    display: none;
}
.sf-toggle-btn__badge.has-filters{
    display: inline-block;
}
.sf-toggle-btn i{ font-size: 15px; }

/* Sidebar colapsado: solo afecta en móvil */
@media (max-width: 767.98px){
    .cat-sidebar--collapsed{
        display: none !important;
    }
}

/* Desktop grande (1400px+) */
@media (min-width: 1400px){
    .cat-products__grid{
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
        gap: 24px !important;
    }
}

/* Laptop (1200-1399px) */
@media (max-width: 1399.98px){
    .cat-layout{
        grid-template-columns: 250px minmax(0, 1fr) !important;
        gap: 28px !important;
    }
}

/* Tablet landscape (992-1199px) */
@media (max-width: 1199.98px){
    .cat-layout{
        grid-template-columns: 230px minmax(0, 1fr) !important;
        gap: 24px !important;
    }
    .cat-products__grid{
        grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)) !important;
        gap: 16px !important;
    }
}

/* Tablet portrait (768-991px) */
@media (max-width: 991.98px){
    .cat-layout{
        grid-template-columns: 200px minmax(0, 1fr) !important;
        gap: 20px !important;
    }
    .cat-products__grid{
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }
    .cat-card__media{
        height: 170px;
    }
    .cat-card__body{
        padding: 12px;
    }
    .cat-card__price{
        font-size: 16px;
    }
    .cat-card__name{
        font-size: 12px;
        min-height: 30px;
    }
}

/* Mobile (max 767px): sidebar se oculta, botón toggle visible */
@media (max-width: 767.98px){
    .cat-layout{
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .sf-toggle-btn{
        display: flex;
    }
    .cat-sidebar{
        position: static;
        top: auto;
        max-width: 100%;
        width: 100%;
        border: 1px solid #e8e8e8;
        border-radius: 10px;
        padding: 12px 14px;
        margin-bottom: 12px;
        background: #fafafa;
    }
    .cat-products{
        min-width: 0;
        width: 100%;
    }
    /* 2 columnas en móvil grande (480-767px) */
    .cat-products__grid{
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
    .cat-header{
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 12px;
    }
    .cat-header__title{
        font-size: 18px;
    }
    .cat-card__media{
        height: 140px;
    }
    .cat-card__body{
        padding: 8px 10px;
    }
    .cat-card__name{
        font-size: 11px;
        min-height: 26px;
        margin-bottom: 4px;
    }
    .cat-card__price{
        font-size: 14px;
    }
    .cat-card__old-price{
        font-size: 10px;
    }
    .cat-card__price-row{
        gap: 4px;
        margin-bottom: 4px;
    }
    .cat-card__discount{
        font-size: 9px;
        padding: 1px 4px;
    }
    .cat-card__brand{
        font-size: 9px;
        margin-bottom: 2px;
    }
    /* Ocultar texto "Precio con IVA incluido" en tarjetas estrechas */
    .cat-card__body > small{
        display: none;
    }
    /* Qty + añadir apilados verticalmente en tarjetas estrechas */
    .cat-card__actions{
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 5px !important;
    }
    .cat-card .store-qty{
        align-self: center;
        height: 32px;
    }
    .cat-card .store-qty__btn{
        width: 28px;
        height: 32px;
        font-size: 15px;
    }
    .cat-card .store-qty__input{
        width: 36px;
        height: 32px;
        font-size: 16px; /* evita el zoom automático de iOS Safari al enfocar el campo */
    }
    .cat-card__add{
        flex: none !important;
        width: 100% !important;
        height: 32px !important;
        padding: 0 6px !important;
        font-size: 11px !important;
        border-radius: 6px !important;
    }
    .cat-card__add--disabled{
        height: 32px !important;
        font-size: 11px !important;
    }
}

/* Teléfono pequeño (<480px): 1 columna, tarjeta completa */
@media (max-width: 479.98px){
    .cat-products__grid{
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .cat-card__media{
        height: 200px;
    }
    .cat-card__body{
        padding: 14px;
    }
    .cat-card__name{
        font-size: 13px;
        min-height: 34px;
    }
    .cat-card__price{
        font-size: 18px;
    }
    .cat-card__old-price{
        font-size: 12px;
    }
    .cat-card__price-row{
        gap: 8px;
        margin-bottom: 8px;
    }
    .cat-card__discount{
        font-size: 11px;
        padding: 2px 6px;
    }
    .cat-card__brand{
        font-size: 10px;
        margin-bottom: 4px;
    }
    /* Regresar a diseño horizontal en tarjeta de ancho completo */
    .cat-card__actions{
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
    }
    .cat-card .store-qty{
        height: 38px;
    }
    .cat-card .store-qty__btn{
        width: 34px;
        height: 38px;
        font-size: 18px;
    }
    .cat-card .store-qty__input{
        width: 44px;
        height: 38px;
        font-size: 16px;
    }
    .cat-card__add{
        flex: 1 !important;
        width: auto !important;
        height: 38px !important;
        padding: 0 12px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
    }
    .cat-card__add--disabled{
        height: 38px !important;
        font-size: 13px !important;
        width: auto !important;
    }
}
/* ── Category Page Fin ── */

.btn {
    font-weight: 700;
    transition: .5s;
}

.btn:hover {
    -webkit-box-shadow: 0 8px 6px -6px #555555;
    -moz-box-shadow: 0 8px 6px -6px #555555;
    box-shadow: 0 8px 6px -6px #555555;
}

.btn-primary {
    color: #FFFFFF;
}

/* Botones negros con texto blanco */
.btn-primary{
    background: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus{
    background: #111 !important;
    border-color: #111 !important;
    color: #fff !important;
}

.btn-outline-primary{
    background: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus{
    background: #111 !important;
    border-color: #111 !important;
    color: #fff !important;
}

.btn-square {
    width: 36px;
    height: 36px;
}

.btn-sm-square {
    width: 28px;
    height: 28px;
}

.btn-lg-square {
    width: 46px;
    height: 46px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 0;
    border-radius: 50% 50% 0 0;
    z-index: 99;
}

.navbar-light .navbar-nav .nav-link {
    font-family: 'Poppins', sans-serif;
    position: relative;
    margin-left: 30px;
    padding: 30px 15px;
    font-size: 16px;
    color: var(--dark);
    font-weight: 500;
    outline: none;
    transition: .5s;
}

header .sticky-top,
.sticky-top{
    z-index: 2500 !important;
    overflow: visible !important;
}

.site-header{
    position: relative;
    z-index: 2500;
    background: #fff;
}

.site-header-top{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    position: relative;
    z-index: 100100;
}

.site-header-search{
    flex: 1;
    max-width: 760px;
}

.site-header-search--placeholder{
    flex: 1;
    max-width: 760px;
}

.site-header-actions{
    gap: 18px;
    position: relative;
    z-index: 100110;
}

.site-header-actions .dropdown{
    position: relative;
    z-index: 100120;
}

.site-header-actions .dropdown-menu{
    z-index: 100130 !important;
}

.site-header-cart-badge{
    display: inline-block;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 12px;
    padding: 0 6px;
    margin-left: 6px;
}

.site-header-fav-badge{
    display: none;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: 12px;
    padding: 0 6px;
    margin-left: 6px;
}

.site-header-fav-dropdown{
    width: min(540px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 16px) !important;
    padding: 18px 22px !important;
    /* Bootstrap .dropdown-menu suele forzar nowrap en enlaces; los nombres deben poder partir en varias líneas */
    white-space: normal !important;
}
.site-header-fav-dropdown a.mini-fav-row__title,
.site-header-fav-dropdown .mini-fav-row__body{
    white-space: normal !important;
}
.site-header-fav-dropdown__inner{
    min-height: 52px;
    overflow: visible;
    max-width: 100%;
}
.mini-fav-heading{
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 15px;
    color: #334155;
}
.mini-fav-list{
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: min(360px, 55vh);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.mini-fav-row{
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) minmax(118px, max-content);
    gap: 14px 16px;
    align-items: start;
    padding: 12px 0 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.mini-fav-row:first-child{
    padding-top: 0;
}
.mini-fav-row:last-child{
    border-bottom: none;
    padding-bottom: 0;
}
.mini-fav-row__media{
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    display: block;
    flex-shrink: 0;
}
.mini-fav-row__media img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mini-fav-row__body{
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    padding-right: 6px;
}
.mini-fav-row__title{
    font-weight: 600;
    font-size: 13px;
    color: #111;
    text-decoration: none;
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal !important;
}
.mini-fav-row__title:hover{
    color: #0d6efd;
    text-decoration: none;
}
.mini-fav-row__price-old{
    font-size: 11px;
    color: #999;
    text-decoration: line-through;
    margin-top: 4px;
}
.mini-fav-row__price{
    font-weight: 800;
    font-size: 15px;
    margin-top: 6px;
    color: #111;
}
.mini-fav-row__actions{
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-self: end;
    align-self: start;
    flex-shrink: 0;
    padding-left: 4px;
    position: relative;
    z-index: 1;
}
.mini-fav-row__actions .mini-fav-add{
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    padding: 6px 14px;
    white-space: nowrap;
}
.mini-fav-row__actions .mini-fav-remove{
    font-size: 12px;
    padding: 0;
}
@media (max-width: 480px){
    .site-header-fav-dropdown{
        padding: 16px 14px !important;
    }
    .mini-fav-row{
        grid-template-columns: 48px 1fr;
        grid-template-rows: auto auto;
        gap: 10px 12px;
    }
    .mini-fav-row__media{
        width: 48px;
        height: 48px;
    }
    .mini-fav-row__actions{
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        padding-left: 0;
        width: 100%;
    }
}

.site-header-nav .nav-link{
    padding: 16px 0 !important;
    font-weight: 600;
}

@media (max-width: 991.98px){
    .site-header-top{
        flex-wrap: wrap;
    }
    .site-header-search,
    .site-header-search--placeholder{
        order: 3;
        width: 100%;
        max-width: none;
    }
    .site-header-actions{
        order: 2;
        margin-left: auto;
    }
    .site-header-nav .nav-link{
        padding: 10px 0 !important;
    }
}

.navbar,
.navbar-collapse,
.navbar-nav{
    overflow: visible !important;
}

.dropdown-menu{
    z-index: 3000 !important;
}

.container-fluid.sticky-top,
header,
header > .container-fluid,
header > .container-fluid > .container,
header .container,
.site-header,
.site-header > .container{
    overflow: visible !important;
}

.main,
#home{
    position: relative;
    z-index: 1;
    overflow-x: hidden;   /* evita scroll horizontal por el carrusel */
    max-width: 100%;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary);
}
#owl-demo .item{
  margin: 3px;
}
#owl-demo .item img{
  display: block;
  width: 100%;
  height: auto;
}

.bg-dark{
    background-color: #000 !important;
}

.bg-dark .text-primary{
    color: #fff !important;
}
.bg-dark .btn{
    border-color: #fff !important;
}
@media (min-width: 992px) {
    .navbar-light .navbar-nav .nav-link::before {
        position: absolute;
        content: "";
        width: 0;
        height: 5px;
        bottom: 0;
        left: 50%;
        background: var(--primary);
        transition: .5s;
    }

    .navbar-light .navbar-nav .nav-link:hover::before,
    .navbar-light .navbar-nav .nav-link.active::before {
        width: 100%;
        left: 0;
    }
}

@media (max-width: 991.98px) {
    .navbar-light .navbar-nav .nav-link  {
        margin-left: 0;
        padding: 10px 0;
    }
}

.hero-header {
    background: url(../img/hero.jpg) top right no-repeat;
    background-size: cover;
}

.service-item {
    position: relative;
    height: 350px;
    padding: 0 30px;
    transition: .5s;
}

.service-item .service-icon {
    width: 150px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: 50%;
    transform: rotate(-14deg);
}

.service-item .service-icon i {
    transform: rotate(15deg);
}

.service-item a.btn {
    position: absolute;
    width: 60px;
    bottom: -48px;
    left: 50%;
    margin-left: -30px;
    opacity: 0;
}

.service-item:hover a.btn {
    bottom: -24px;
    opacity: 1;
}

/* Móvil / táctil: no hay hover; el botón debe verse siempre y quedar dentro de la tarjeta */
@media (max-width: 991.98px) {
    .service-item {
        height: auto;
        min-height: 0;
        padding: 24px 20px 28px;
    }
    .service-item a.btn {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        margin: 18px auto 0 !important;
        opacity: 1 !important;
        width: auto !important;
        min-width: 48px;
        min-height: 48px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        padding: 12px 22px !important;
        z-index: 2;
    }
}

.price-carousel::after {
    position: absolute;
    content: "";
    width: 100%;
    height: 50%;
    bottom: 0;
    left: 0;
    background: var(--primary);
    border-radius: 8px 8px 50% 50%;
    z-index: -1;
}

.price-carousel .owl-nav {
    margin-top: 35px;
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
}

.price-carousel .owl-nav .owl-prev,
.price-carousel .owl-nav .owl-next{
    position: relative;
    margin: 0 5px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: #FFFFFF;
    font-size: 22px;
    border-radius: 45px;
    transition: .5s;
}

.price-carousel .owl-nav .owl-prev:hover,
.price-carousel .owl-nav .owl-next:hover {
    color: var(--dark);
}

@media (min-width: 576px) {
    .team-item .row {
        height: 350px;
    }
}

.team-carousel .owl-nav,
.related-products-carousel .owl-nav {
    position: absolute;
    padding: 0 45px;
    width: 100%;
    height: 45px;
    top: calc(50% - 22.5px);
    left: 0;
    display: flex;
    justify-content: space-between;
}

.team-carousel .owl-nav .owl-prev,
.team-carousel .owl-nav .owl-next,
.related-products-carousel .owl-nav .owl-prev,
.related-products-carousel .owl-nav .owl-next {
    position: relative;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: var(--primary);
    border-radius: 45px;
    font-size: 22px;
    transition: .5s;
}

.team-carousel .owl-nav .owl-prev:hover,
.team-carousel .owl-nav .owl-next:hover,
.related-products-carousel .owl-nav .owl-prev:hover,
.related-products-carousel .owl-nav .owl-next:hover {
    background: var(--dark);
}

.testimonial-carousel .owl-dots {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 20px;
    height: 20px;
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 20px;
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    width: 40px;
    height: 40px;
    background: var(--primary);
}

.testimonial-carousel .owl-item img {
    width: 150px;
    height: 150px;
}



/********** Modified CSS **********/

body,
h1,
h3,
h4,
h5,
h6,
p,
li,
td,
span,
strong {
    font-family: 'Poppins', sans-serif !important;
}


.whatsapp-btn {
    position: fixed;
    bottom: 70px;
    right: 20px;
    background-color: #25d366;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 24px;
    line-height: 60px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    z-index: 99;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

.whatsapp-icon {
    vertical-align: middle;
}


/* Esto establecerá la fuente Poppins para todo el contenido de la página */

.form-inline{
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-content: center !important;
    justify-content: space-evenly !important;
    align-items: center !important;
}
.selector_dientes > div:first-child{
    border-bottom: 1px solid !important;
}
.selector_dientes .form-check{
    width: 50px !important;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.selector_dientes .form-check-input{
    margin-left: 5%;
}

/***** Estilos Personalizados *****/
.list_menu{
    border-right: 2px solid #ececec;
    padding-right: 1.25rem;
}
.list_menu > h5.text-primary,
.list_menu h5.account-sidebar__greet{
    color: #111 !important;
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: left;
}
.list-menu_user{
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.list-menu_user li{
    list-style-type: none;
    margin: 0;
}
.list-menu_user a{
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    text-align: center;
    background: #f3f4f6;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    box-sizing: border-box;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.list-menu_user a:hover{
    background: #111;
    border-color: #111;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.list-menu_user a[href*="logout"],
.list-menu_user a[href*="salir.php"]{
    background: #fff;
    border-color: rgba(220, 53, 69, 0.4);
    color: #b02a37;
}
.list-menu_user a[href*="logout"]:hover,
.list-menu_user a[href*="salir.php"]:hover{
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.35);
}
@media only screen and (max-width: 991px){
    .list_menu{
        border-right: none;
        padding-right: 0;
        border-bottom: 2px solid #ececec;
        padding-bottom: 1.25rem;
        margin-bottom: 1.5rem;
    }
}
.tab-pane{
    margin-top: 25px;
}
.nav-link{
    font-size: 14px;
}
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Fondo negro con transparencia */
    z-index: 9000; /* Asegúrate de que esté encima de otros elementos */
    display: none; /* Inicialmente oculto */
    align-content: center;
}
/* HTML: <div class="loader"></div> */
.loader {
  width: 50px;
  padding: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #25b09b;
  margin: 0 50%;
  --_m: 
    conic-gradient(#0000 10%,#000),
    linear-gradient(#000 0 0) content-box;
  -webkit-mask: var(--_m);
          mask: var(--_m);
  -webkit-mask-composite: source-out;
          mask-composite: subtract;
  animation: l3 1s infinite linear;
}
@keyframes l3 {to{transform: rotate(1turn)}}
.alert-success {
    background-color: #d4edda;
    color: #155724;
    font-size: 16px;
    font-weight: 500;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 15px;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    font-size: 16px;
    font-weight: 500;
    border: 1px solid #ffeeba;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 15px;
}

.bi-check-circle-fill {
    font-size: 1.5rem;
    color: #28a745;
}

.bi-exclamation-circle-fill {
    font-size: 1.5rem;
    color: #ffc107;
}

#modalConfirmacion .selector_dientes .form-check{
    width: 15px !important;
}

@media only screen and (max-width: 991px){
    .selector_dientes{
        overflow-x: scroll;
    }
    .selector_dientes .form-inline{
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-content: center !important;
        justify-content: space-evenly !important;
        align-items: center !important;
    }
    .selector_dientes .form-check-input{
        margin-top: 3.25em;
    }
    .header_wrapper{
        max-width: 100% !important;
    }
    
}
@media only screen and (max-width: 768px){
    .logo.text-primary{
        font-size: 20px;
    }
    .form-inline .form-check{
        width: 50% !important;
    }
}

footer{
    width:100%;
}

.store-page{
    background: linear-gradient(180deg, #f7f8fb 0%, #ffffff 220px);
}

.store-navbar{
    background-color: rgba(255,255,255,.95) !important;
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 5000 !important;
}

.store-navbar .dropdown-menu{
    z-index: 6000 !important;
}

.store-navbar .container,
.store-navbar .navbar,
.store-navbar .navbar-nav{
    overflow: visible;
}

.store-navbar .nav-link{
    padding: 16px 0 !important;
    font-weight: 600;
}

.store-hero,
.store-hero .carousel,
.store-hero .carousel-inner,
.store-hero .carousel-item,
.store-hero .store-banner,
.store-hero img{
    position: relative;
    z-index: 1;
}

.store-hero .carousel,
.store-hero .store-banner{
    border-radius: 14px;
    overflow: hidden;
}

.store-banner{
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.10);
}

.store-content{
    margin-top: 30px;
}

.store-hero,
.store-content{
    position: relative;
    z-index: 0 !important;
}

.store-filters{
    position: sticky;
    top: 100px;
}

.store-filters h5{
    font-weight: 700;
    color: #111;
}

.store-filter-group{
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

.store-filter-group .list-group-item{
    border: 0;
    border-bottom: 1px solid rgba(0,0,0,.06);
}

.store-filter-group .list-group-item:last-child{
    border-bottom: 0;
}

.store-product-card{
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    transition: transform .18s ease, box-shadow .18s ease;
}

.store-product-card__media{
    position: relative;
    background: #fff;
    padding: 12px;
}

.store-product-card__media{
    border-bottom: 1px solid rgba(0,0,0,.06);
}

.store-product-card{
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: none;
}

.store-product-card:hover{
    box-shadow: 0 14px 32px rgba(0,0,0,.10);
}

.store-product-card__media-link{ display:block; }

.store-product-card__img{
    width: 100%;
    height: 240px;
    object-fit: contain;
    border-radius: 12px;
    background: transparent;
    border: 0;
    padding: 0;
}

.store-wishlist{
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    color: #0b5aa6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0,0,0,.12);
}

.store-wishlist:hover{
    filter: brightness(0.98);
}

.store-product-card__body{
    padding: 10px 16px 14px 16px;
}

.store-product-card__brand{
    font-weight: 800;
    color: #0b5aa6;
    text-transform: uppercase;
    font-size: 12px;
    margin-top: 4px;
}

.store-product-card__name{
    font-weight: 700;
    color: #111;
    line-height: 1.2;
    margin-top: 6px;
    min-height: 44px;
}

.store-product-card__body{
    display: flex;
    flex-direction: column;
}

.store-product-card__name a{
    color: inherit;
    text-decoration: none;
}

.store-product-card__sku{
    color: rgba(0,0,0,.65);
    font-size: 13px;
    margin-top: 6px;
}

.store-product-card__old-price{
    color: rgba(0,0,0,.45);
    text-decoration: line-through;
    margin-top: 8px;
}

.store-product-card__price{
    font-weight: 900;
    color: #0b5aa6;
    font-size: 22px;
    margin-top: 2px;
}

.store-product-card__price-row{
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 2px;
}

.store-discount-pill{
    background: #dc3545;
    color: #fff;
    font-weight: 900;
    font-size: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    line-height: 1;
}

.store-product-card__actions{
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
    flex-wrap: wrap;
}

.store-product-card__actions{
    margin-top: auto;
}

.store-qty{
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 999px;
    overflow: hidden;
    height: 38px;
    background: #fff;
    width: fit-content;
    flex: 0 0 auto;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.store-qty__btn{
    width: 34px;
    height: 38px;
    border: 0;
    background: #fff;
    font-weight: 900;
    color: #111;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.store-qty__btn:hover{
    background: rgba(0,0,0,.04);
}

.store-qty__input{
    width: 44px;
    height: 38px;
    border: 0;
    text-align: center;
    outline: none;
    font-weight: 800;
    font-size: 16px;
    line-height: 38px;
    color: #111;
    background: transparent;
    caret-color: #111;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.store-qty__input::-webkit-outer-spin-button,
.store-qty__input::-webkit-inner-spin-button{
    -webkit-appearance: none;
    margin: 0;
}

.store-qty__input[type=number]{
    appearance: textfield;
    -moz-appearance: textfield;
}

.store-add{
    flex: 1 1 180px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: #000;
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    padding: 0 12px;
    white-space: nowrap;
    cursor: pointer;
    min-width: 140px;
}

.store-add{
    width: 100%;
}

@media (min-width: 576px){
    .store-add{
        width: auto;
    }
}

.store-add:hover{
    filter: brightness(0.95);
}

.store-add--disabled{
    background: #7b8aa8;
    filter: none;
    opacity: 1;
}

.store-add--disabled:hover{
    filter: none;
}

/* Ficha de producto: volver a la tienda (aspecto botón) */
.store-back-to-shop{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.5rem;
    padding: 10px 22px;
    border-radius: 999px;
    border: 2px solid #000;
    background: #fff;
    color: #000 !important;
    font-weight: 800;
    font-size: 13px;
    text-decoration: none !important;
    letter-spacing: 0.04em;
    line-height: 1.2;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.store-back-to-shop:hover{
    background: #000;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}
.store-back-to-shop:focus{
    outline: none;
    box-shadow: 0 0 0 3px rgba(10, 163, 168, 0.35);
}

.store-add:focus,
.store-qty__btn:focus{
    outline: none;
}

.store-stock{
    margin-top: 8px;
    color: rgba(0,0,0,.55);
    font-size: 12px;
}

.store-product-card:hover{
    transform: translateY(-4px);
    box-shadow: 0 16px 35px rgba(0,0,0,.12);
}

/* .store-product-card legacy styles removed: the store now uses store-product-card__* elements */

.store-product-card .btn{
    border-radius: 10px;
}

.store-proclinic-hero{
    background: linear-gradient(90deg, #ffffff 0%, #ffffff 62%, #0aa3a8 62%, #0aa3a8 100%);
    border-bottom: 1px solid rgba(0,0,0,.06);
    padding: 34px 0;
}

.store-proclinic-hero__inner{
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 22px;
    align-items: center;
}

.store-proclinic-hero__title{
    font-weight: 900;
    font-size: 40px;
    line-height: 1.05;
    margin: 0 0 12px 0;
    color: #111;
}

.store-proclinic-hero__subtitle{
    margin: 0 0 10px 0;
    color: rgba(0,0,0,.72);
    font-size: 16px;
    line-height: 1.35;
}

.store-proclinic-hero__cta{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.store-proclinic-hero__img-wrap{
    background: rgba(255,255,255,.92);
    border-radius: 22px;
    border: 1px solid rgba(0,0,0,.08);
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0,0,0,.10);
}

.store-proclinic-hero__media{
    position: relative;
}

.store-proclinic-hero__media::before{
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    right: -90px;
    top: -90px;
    background: rgba(255,255,255,.16);
    pointer-events: none;
}

.store-proclinic-hero__img{
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

@media (max-width: 991.98px){
    .store-proclinic-hero{
        background: #f6fbfd;
        padding: 22px 0;
    }
    .store-proclinic-hero__inner{
        grid-template-columns: 1fr;
    }
    .store-proclinic-hero__title{
        font-size: 32px;
    }
    .store-proclinic-hero__img{
        height: 260px;
    }

    .store-proclinic-hero__media::before{
        width: 320px;
        height: 320px;
        right: -70px;
        top: -70px;
    }
}

@media (max-width: 575.98px){
    .store-proclinic-hero__title{
        font-size: 28px;
    }
    .store-proclinic-hero__img{
        height: 220px;
    }

    .store-proclinic-hero__media::before{
        width: 260px;
        height: 260px;
        right: -60px;
        top: -60px;
    }
}

.store-proclinic-about{
    padding: 18px 0 4px 0;
}

.store-proclinic-about__title{
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 900;
    color: #111;
}

.store-proclinic-about__text{
    margin: 0;
    color: rgba(0,0,0,.72);
    font-size: 14px;
    line-height: 1.55;
    max-width: 980px;
}

.catalog-card{
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    transition: transform .18s ease, box-shadow .18s ease;
    background: #fff;
}

.catalog-card:hover{
    transform: translateY(-4px);
    box-shadow: 0 16px 35px rgba(0,0,0,.12);
}

.catalog-card__media{
    position: relative;
}

.catalog-card__img{
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.catalog-card__overlay{
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    background: rgba(29, 42, 77, .8);
}

.catalog-card__title{
    color: #fff;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.catalog-card__price{
    color: #fff;
    margin: 0;
}

.catalog-card__body{
    text-align: center;
    padding: 24px;
}

.catalog-card__body .btn{
    border-radius: 999px;
}

.cat-carousel{
    position: relative;
    margin-bottom: 18px;
}

.cat-carousel__viewport{
    overflow: hidden;
}

.cat-carousel__track{
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 0 52px;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.cat-carousel__track::-webkit-scrollbar{ display: none; }

.cat-carousel__item{
    flex: 0 0 auto;
}

.cat-carousel__link{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 46px;
    padding: 0 22px;
    border-radius: 0;
    background: #0b5aa6;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: filter .15s ease, transform .15s ease;
    white-space: nowrap;
}

.cat-carousel__link:hover{
    color: #fff;
    filter: brightness(0.95);
}

.cat-carousel__link.is-active{
    filter: brightness(0.85);
}

.cat-carousel__arrow{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 0;
    background: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.cat-carousel__arrow--prev{ left: 0; }
.cat-carousel__arrow--next{ right: 0; }

.cat-carousel__arrow:disabled{
    opacity: .5;
    cursor: not-allowed;
}

@media (max-width: 991.98px){
    .store-filters{
        position: static;
    }
    .store-navbar .nav-link{
        padding: 10px 0 !important;
    }

    .cat-carousel__track{
        padding: 0 46px;
        gap: 10px;
    }

    .cat-carousel__link{
        min-width: 150px;
        height: 44px;
        padding: 0 16px;
        font-size: 14px;
    }
}

/* ── Sidebar de filtros (sf-*) ── */
.sf-section {
    border-bottom: 1px solid #e8e8e8;
    padding: 16px 0;
}
.sf-section:last-of-type {
    border-bottom: none;
}
.sf-heading {
    font-size: 14px;
    font-weight: 800;
    color: #111;
    margin: 0 0 10px 0;
    text-transform: none;
    letter-spacing: 0;
}

/* Acordeón móvil: Familia / Subfamilia / Marca */
.sf-collapsible {
    border: 0;
}
.sf-collapsible > summary.sf-heading {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    user-select: none;
    margin-bottom: 0;
}
.sf-collapsible > summary.sf-heading::-webkit-details-marker {
    display: none;
}
.sf-collapsible > summary.sf-heading::marker {
    display: none;
    content: '';
}
.sf-collapsible > summary.sf-heading::after {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 2px solid #111;
    border-bottom: 2px solid #111;
    transform: rotate(45deg);
    flex-shrink: 0;
    transition: transform 0.2s ease;
    margin-right: 2px;
}
.sf-collapsible[open] > summary.sf-heading::after {
    transform: rotate(-135deg);
    margin-top: 4px;
}
.sf-collapsible .sf-panel {
    padding-top: 10px;
}
@media (min-width: 768px) {
    .sf-collapsible > summary.sf-heading {
        cursor: default;
        pointer-events: none;
    }
    .sf-collapsible > summary.sf-heading::after {
        display: none;
    }
    .sf-collapsible .sf-panel {
        padding-top: 0;
    }
}

.sf-search {
    display: block;
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    background: #fafafa;
    margin-bottom: 8px;
    box-sizing: border-box;
}
.sf-search:focus {
    outline: none;
    border-color: #111;
    background: #fff;
}
@media (max-width: 767.98px) {
    /* evita el zoom automático de iOS Safari al enfocar el buscador de filtros */
    .sf-search { font-size: 16px; }
}
.sf-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sf-item {
    margin-bottom: 2px;
}
.sf-hidden {
    display: none;
}
.sf-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 3px 0;
    line-height: 1.3;
}
.sf-check input[type="checkbox"] {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    accent-color: #111;
    cursor: pointer;
}
.sf-check__label {
    font-size: 12px;
    color: #111;
    font-weight: 600;
    flex: 1;
}
.sf-check__label:hover {
    text-decoration: underline;
    color: #000;
}
.sf-check input:checked ~ .sf-check__label {
    color: #000;
    font-weight: 800;
}
.sf-check__count {
    font-size: 12px;
    color: #777;
    flex-shrink: 0;
}
.sf-more {
    background: none;
    border: none;
    padding: 4px 0;
    font-size: 13px;
    font-weight: 700;
    color: #111;
    cursor: pointer;
    margin-top: 4px;
}
.sf-more:hover {
    text-decoration: underline;
    color: #000;
}
.sf-apply-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 16px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .15s, opacity .15s;
}
.sf-apply-btn:hover {
    background: #000;
    opacity: 1;
}


/* ================================================================
   ANIMACIONES DE IMÁGENES - Smile Dental Lab
   ================================================================ */

/* Keyframes base */
@keyframes sdl-ring-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes sdl-ring-spin-rev {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}
@keyframes sdl-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}
/* Reemplaza sdl-pulse-ring (box-shadow = repaint) por scale puro (GPU) */
@keyframes sdl-pulse-scale {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.06); }
}
/* Respiración: solo scale, sin rotate */
@keyframes sdl-img-breathe {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.035); }
}
/* Float sin rotate (rotate crea capas extra en iOS) */
@keyframes sdl-float-img {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-7px); }
}
@keyframes sdl-tilt-in {
    0%   { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.07) rotate(3deg); }
}
@keyframes sdl-shine-sweep {
    0%   { transform: skewX(-18deg) translateX(-200%); }
    100% { transform: skewX(-18deg) translateX(400%); }
}

/* ── 1. Iconos de servicios: anillo giratorio de gradiente ── */
.service-item .service-icon {
    position: relative;
    z-index: 1;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
/* Anillo exterior que gira */
.service-item .service-icon::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        #354F8E 80deg,
        #1D2A4D 160deg,
        transparent 240deg
    );
    animation: sdl-ring-spin 3.5s linear infinite;
    z-index: -2;
}
/* Disco interno que tapa el relleno del anillo */
.service-item .service-icon::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: var(--primary, #000);
    z-index: -1;
}
/* La tarjeta de servicio flota al hacer hover */
.service-item:hover .service-icon {
    transform: rotate(-14deg) scale(1.12);
    box-shadow: 0 12px 32px rgba(53, 79, 142, 0.35);
}
/* La imagen levita siempre (GPU: solo translateY) */
.service-item .service-icon img {
    animation: sdl-float 3s ease-in-out infinite;
    will-change: transform;
}
.service-item .service-icon::before {
    will-change: transform;
}

/* ── 2. Cards de productos (promociones): tilt + brillo en hover ── */
.hp-card__img {
    transition: transform 0.45s cubic-bezier(.34,1.56,.64,1) !important;
}
.hp-card:hover .hp-card__img {
    transform: scale(1.1) rotate(3deg) !important;
}
/* Efecto de barrido de brillo sobre la imagen */
.hp-card__media {
    overflow: hidden;
    position: relative;
}
.hp-card__media::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255,255,255,0.35) 50%,
        transparent 100%
    );
    transform: skewX(-18deg) translateX(-200%);
    opacity: 0;
    transition: opacity 0.1s;
    pointer-events: none;
    z-index: 3;
}
.hp-card:hover .hp-card__media::after {
    opacity: 1;
    animation: sdl-shine-sweep 0.6s ease forwards;
}

/* ── 3. Círculos "about" (Zirconia, E-Max, PMMA…): pulse scale (GPU) + tilt hover ── */
.bg-light.text-center.rounded-circle {
    animation: sdl-pulse-scale 3.5s ease-in-out infinite;
    transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
    will-change: transform;
}
.bg-light.text-center.rounded-circle:hover {
    transform: scale(1.15) rotate(12deg);
    box-shadow: 0 8px 28px rgba(53, 79, 142, 0.25) !important;
}
.bg-light.text-center.rounded-circle i {
    transition: transform 0.35s ease;
}
.bg-light.text-center.rounded-circle:hover i {
    transform: rotate(-12deg) scale(1.15);
}

/* ── 4. Carousel de servicios/precios: respiración muy suave (10s = menos frames) ── */
.price-carousel .img-fluid {
    animation: sdl-img-breathe 10s ease-in-out infinite;
    transform-origin: center center;
    will-change: transform;
}

/* ── 5. Logos de marcas: hover con rotación y brillo ── */
.sdl-marca-item {
    transition: transform 0.35s cubic-bezier(.34,1.56,.64,1),
                box-shadow 0.35s ease !important;
}
.sdl-marca-item:hover {
    transform: scale(1.12) rotate(-4deg) !important;
    box-shadow: 0 8px 28px rgba(53, 79, 142, 0.22) !important;
}
.sdl-marca-item img {
    transition: filter 0.35s ease;
}
.sdl-marca-item:hover img {
    filter: drop-shadow(0 0 8px rgba(53, 79, 142, 0.5));
}

/* ── 6. Carrusel principal ── */
#carouselExampleCaptions .carousel-item img {
    transition: transform 0.8s ease !important;
}
#carouselExampleCaptions .carousel-item.active img {
    animation: sdl-img-breathe 12s ease-in-out infinite;
    will-change: transform;
}

/* ── 7. Cards de servicios completos del laboratorio ── */
.price-carousel .bg-light.rounded {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
}
.price-carousel .bg-light.rounded:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14) !important;
}

/* Reduce motion: respeta preferencias de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .service-item .service-icon::before,
    .service-item .service-icon img,
    .price-carousel .img-fluid,
    .bg-light.text-center.rounded-circle,
    #carouselExampleCaptions .carousel-item.active img {
        animation: none !important;
    }
}


/* ================================================================
   ANIMACIONES DE IMÁGENES — TIENDA Y DETALLE DE PRODUCTO
   ================================================================ */

/* Keyframes nuevos */
@keyframes sdl-card-enter {
    0%   { opacity: 0; transform: translateY(28px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0)    scale(1); }
}
@keyframes sdl-product-enter {
    0%   { opacity: 0; transform: scale(0.94) translateY(16px); }
    100% { opacity: 1; transform: scale(1)    translateY(0); }
}
@keyframes sdl-badge-beat {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.14); }
}

/* ── 1. Entrada escalonada de tarjetas en la grilla ── */
.cat-products__grid .cat-card {
    animation: sdl-card-enter 0.45s ease both;
}
.cat-products__grid .cat-card:nth-child(1)  { animation-delay: 0.00s; }
.cat-products__grid .cat-card:nth-child(2)  { animation-delay: 0.07s; }
.cat-products__grid .cat-card:nth-child(3)  { animation-delay: 0.14s; }
.cat-products__grid .cat-card:nth-child(4)  { animation-delay: 0.21s; }
.cat-products__grid .cat-card:nth-child(5)  { animation-delay: 0.28s; }
.cat-products__grid .cat-card:nth-child(6)  { animation-delay: 0.35s; }
.cat-products__grid .cat-card:nth-child(7)  { animation-delay: 0.42s; }
.cat-products__grid .cat-card:nth-child(8)  { animation-delay: 0.49s; }
.cat-products__grid .cat-card:nth-child(9)  { animation-delay: 0.56s; }
.cat-products__grid .cat-card:nth-child(10) { animation-delay: 0.63s; }
.cat-products__grid .cat-card:nth-child(11) { animation-delay: 0.70s; }
.cat-products__grid .cat-card:nth-child(12) { animation-delay: 0.77s; }

/* ── 2. Hover en la tarjeta: sube + sombra más dramática ── */
.cat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.13) !important;
}

/* ── 3. Imagen: tilt + zoom al hover ── */
.cat-card__img {
    transition: transform 0.45s cubic-bezier(.34, 1.56, .64, 1);
    will-change: transform;
}
.cat-card:hover .cat-card__img {
    transform: scale(1.1) rotate(2.5deg);
}

/* ── 4. Barrido de brillo sobre la imagen al hover ── */
.cat-card__media {
    position: relative;
}
.cat-card__media::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.42) 50%,
        transparent 100%
    );
    transform: skewX(-18deg) translateX(-200%);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}
.cat-card:hover .cat-card__media::after {
    opacity: 1;
    animation: sdl-shine-sweep 0.6s ease forwards;
}

/* ── 5. Badge de descuento: pulso GPU (solo scale + opacity) ── */
.cat-card__discount {
    display: inline-block;
    animation: sdl-badge-beat 2.2s ease-in-out infinite;
    will-change: transform;
}

/* ── 6. Imagen principal del producto: entrada + hover scale ── */
#mainProductImage {
    animation: sdl-product-enter 0.55s cubic-bezier(.22,1,.36,1) both;
    transition: transform 0.35s ease, box-shadow 0.35s ease !important;
}
#mainProductImage:hover {
    transform: scale(1.04) !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
}

/* ── 7. Miniaturas del producto: hover con glow ── */
.product-thumb {
    transition: transform 0.28s cubic-bezier(.34,1.56,.64,1),
                border-color 0.25s ease,
                box-shadow    0.25s ease !important;
}
.product-thumb:hover {
    transform: scale(1.12) !important;
    border-color: #0b5aa6 !important;
    box-shadow: 0 4px 16px rgba(11, 90, 166, 0.32) !important;
}
.product-thumb.active-thumb {
    border-color: #0b5aa6 !important;
    box-shadow: 0 0 0 3px rgba(11, 90, 166, 0.22) !important;
}

/* ── 8. Tarjetas de productos relacionados (mismo efecto) ── */
.related-products__card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.related-products__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12) !important;
}
.related-products__card:hover .cat-card__img {
    transform: scale(1.1) rotate(2deg);
}

/* Reduce motion adicional para sección de productos */
@media (prefers-reduced-motion: reduce) {
    .cat-products__grid .cat-card,
    #mainProductImage {
        animation: none !important;
        opacity: 1 !important;
    }
    .cat-card__img,
    .product-thumb,
    #mainProductImage,
    .cat-card__discount {
        animation: none !important;
        transition: none !important;
    }
}


/* ================================================================
   ANIMACIONES EXTRA — todas usan solo transform/opacity (GPU puro)
   ================================================================ */

/* ── Keyframes nuevos ── */

@keyframes sdl-bounce-cta {
    0%, 100% { transform: translateY(0) scale(1); }
    40%       { transform: translateY(-7px) scale(1.04); }
    70%       { transform: translateY(-3px) scale(1.02); }
}
@keyframes sdl-ripple-out {
    0%   { transform: scale(0.85); opacity: 0.6; }
    100% { transform: scale(2.2);  opacity: 0; }
}
@keyframes sdl-float-img {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33%       { transform: translateY(-6px) rotate(0.5deg); }
    66%       { transform: translateY(-3px) rotate(-0.4deg); }
}
@keyframes sdl-spin-once {
    0%   { transform: rotate(0deg) scale(1); }
    50%  { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}
@keyframes sdl-twinkle {
    0%, 100% { transform: scale(1) rotate(0deg);   opacity: 0.85; }
    25%       { transform: scale(1.25) rotate(12deg); opacity: 1; }
    75%       { transform: scale(0.85) rotate(-8deg); opacity: 0.6; }
}
@keyframes sdl-swing {
    0%, 100% { transform: rotate(0deg); }
    20%       { transform: rotate(8deg); }
    40%       { transform: rotate(-6deg); }
    60%       { transform: rotate(4deg); }
    80%       { transform: rotate(-2deg); }
}
@keyframes sdl-slide-left {
    0%   { opacity: 0; transform: translateX(-24px); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes sdl-slide-right {
    0%   { opacity: 0; transform: translateX(24px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* ── 1. Botones "Solicitar Ahora" del carrusel de precios ── */
.price-carousel .btn-primary {
    animation: sdl-bounce-cta 2.8s ease-in-out infinite;
    will-change: transform;
}

/* ── 2. Botón WhatsApp — doble onda verde pulsante ── */
.btn-dark[href*="whatsapp"],
a[href*="whatsapp"].btn {
    position: relative;
    overflow: visible !important;
}
.btn-dark[href*="whatsapp"]::before,
a[href*="whatsapp"].btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid rgba(37, 211, 102, 0.65);
    animation: sdl-ripple-out 1.8s ease-out infinite;
    will-change: transform, opacity;
    pointer-events: none;
}
.btn-dark[href*="whatsapp"]::after,
a[href*="whatsapp"].btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid rgba(37, 211, 102, 0.4);
    animation: sdl-ripple-out 1.8s ease-out 0.65s infinite;
    will-change: transform, opacity;
    pointer-events: none;
}

/* ── 3. HP cards de promociones — flotación escalonada ── */
.hp-card {
    animation: sdl-float-img 4s ease-in-out infinite;
    will-change: transform;
}
.owl-carousel .owl-item:nth-child(2) .hp-card { animation-delay: 0.5s; }
.owl-carousel .owl-item:nth-child(3) .hp-card { animation-delay: 1.0s; }
.owl-carousel .owl-item:nth-child(4) .hp-card { animation-delay: 1.5s; }
.owl-carousel .owl-item:nth-child(5) .hp-card { animation-delay: 2.0s; }

/* ── 4. Tarjetas de servicio — flotación escalonada ── */
.col-lg-4:nth-child(1) .service-item { animation: sdl-float-img 4.5s ease-in-out 0.0s  infinite; }
.col-lg-4:nth-child(2) .service-item { animation: sdl-float-img 4.5s ease-in-out 0.7s  infinite; }
.col-lg-4:nth-child(3) .service-item { animation: sdl-float-img 4.5s ease-in-out 1.4s  infinite; }
.col-lg-4:nth-child(4) .service-item { animation: sdl-float-img 4.5s ease-in-out 0.35s infinite; }
.col-lg-4:nth-child(5) .service-item { animation: sdl-float-img 4.5s ease-in-out 1.05s infinite; }
.col-lg-4:nth-child(6) .service-item { animation: sdl-float-img 4.5s ease-in-out 1.75s infinite; }
.service-item { will-change: transform; }

/* ── 5. Logos de marcas — twinkle escalonado ── */
.sdl-marca-item img {
    animation: sdl-twinkle 4.5s ease-in-out infinite;
    will-change: transform, opacity;
}
.sdl-ticker-track .sdl-marca-item:nth-child(2) img { animation-delay: 0.7s; }
.sdl-ticker-track .sdl-marca-item:nth-child(3) img { animation-delay: 1.4s; }
.sdl-ticker-track .sdl-marca-item:nth-child(4) img { animation-delay: 2.1s; }
.sdl-ticker-track .sdl-marca-item:nth-child(5) img { animation-delay: 2.8s; }

/* ── 6. Iconos del about — swing en hover ── */
.bg-light.text-center.rounded-circle:hover i {
    animation: sdl-swing 0.55s ease both;
}

/* ── 7. Miniatura activa del producto ── */
.product-thumb.active-thumb {
    animation: sdl-twinkle 2.5s ease-in-out infinite;
    will-change: transform, opacity;
}

/* ── 8. Precios en tarjetas — entrada desde los lados ── */
.cat-card__price {
    animation: sdl-slide-left 0.4s ease both;
}
.cat-card__old-price {
    animation: sdl-slide-right 0.4s ease 0.08s both;
}

/* ── 9. Iconos de redes sociales — spin en hover ── */
.fa-facebook-f, .fa-instagram, .fa-twitter, .fa-youtube,
.fa-whatsapp, .fa-linkedin {
    display: inline-block;
    transition: transform 0.35s ease;
    will-change: transform;
}
a:hover .fa-facebook-f, a:hover .fa-instagram,
a:hover .fa-twitter,    a:hover .fa-youtube,
a:hover .fa-whatsapp,   a:hover .fa-linkedin {
    animation: sdl-spin-once 0.55s ease forwards;
}

/* Reduce motion: respeta preferencias del SO */
@media (prefers-reduced-motion: reduce) {
    .hp-card,
    .service-item,
    .sdl-marca-item img,
    .cat-card__discount,
    .product-thumb.active-thumb,
    .price-carousel .btn-primary,
    .btn-dark[href*="whatsapp"]::before,
    .btn-dark[href*="whatsapp"]::after,
    #carouselExampleCaptions .carousel-item.active img,
    .service-item .service-icon img,
    .cat-card__price,
    .cat-card__old-price {
        animation: none !important;
        will-change: auto !important;
    }
}

/* ── Header fijo ── */
body > header,
body header:first-of-type {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.10);
}
/* Compensar altura del header fijo para que el contenido no quede debajo.
   --site-header-h se calcula en JS (includes/header.php) con la altura real
   del header (topbar de envíos + buscador + menú ≈ 180-190px en escritorio).
   La causa real de que esto nunca se aplicara era otra regla "body{padding:0}"
   en includes/home_sections.php que lo reseteaba (ya corregida) — 320px era
   un valor exagerado usado solo para confirmar el diagnóstico. */
body {
    padding-top: max(190px, var(--site-header-h, 190px));
}
/* En móvil (<991.98px) el header real es más chico: se esconden la barra de
   categorías y de búsqueda (quedan en la barra inferior / drawer), solo
   queda el logo centrado. El mínimo de 190px (calibrado para el header de
   escritorio de 3 filas) dejaba un hueco blanco de más arriba del banner. */
@media (max-width: 991.98px) {
    body {
        padding-top: max(90px, var(--site-header-h, 90px));
    }
}

/* ── Sugerencias en vivo del buscador principal ── */
.sdl-search-suggest {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15,23,42,.16);
    overflow: hidden;
    z-index: 1050;
    max-height: 420px;
    overflow-y: auto;
}
.sdl-search-suggest.is-open {
    display: block;
}
.sdl-search-suggest__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: #111;
    border-bottom: 1px solid rgba(0,0,0,.05);
}
.sdl-search-suggest__item:last-of-type {
    border-bottom: none;
}
.sdl-search-suggest__item:hover,
.sdl-search-suggest__item.is-active {
    background: #f5f5f5;
    color: #111;
    text-decoration: none;
}
.sdl-search-suggest__img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,.06);
    flex-shrink: 0;
    background: #fafafa;
}
.sdl-search-suggest__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.sdl-search-suggest__name {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sdl-search-suggest__meta {
    font-size: 11px;
    color: #777;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sdl-search-suggest__price {
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    white-space: nowrap;
}
.sdl-search-suggest__empty {
    padding: 14px 12px;
    font-size: 13px;
    color: #777;
    text-align: center;
}
.sdl-search-suggest__viewall {
    display: block;
    padding: 10px 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #111;
    background: #fafafa;
    text-decoration: none;
}
.sdl-search-suggest__viewall:hover {
    background: #f0f0f0;
    color: #111;
    text-decoration: none;
}

/* ── Filtros de tienda: evitar que las etiquetas largas se corten ── */
.sf-check__label {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
.sf-search-empty {
    font-size: 12px;
    color: #888;
    padding: 6px 2px;
}
