/*

 Theme Name: Storefront Child

 Template: storefront

 Version: 1.0

*/
/*
Theme Name: Storefront Child
Template: storefront
Version: 1.0
*/



/*
Theme Name: Storefront Child
Template: storefront
Version: 1.0
*/

/* ==========================================
   HEADER CUSTOM DESDE CERO
   ========================================== */
/* Force sticky header - override Storefront */
.site-header,
header.site-header {
    position: static !important;
}

.custom-header-wrapper {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
}

/* Reset del header original */
.site-header {
    padding: 0;
    margin: 0;
}

/* Wrapper principal */
.custom-header-wrapper {
    background: #fff;
    /* border-bottom: 1px solid #e8e8e8; */
    position: sticky;
    top: 0;
    z-index: 999;
    /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); */
}

.custom-header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

/* ===== LOGO ===== */
.custom-header-logo {
    flex: 0 0 auto;
}

.custom-header-logo .custom-logo-link {
    display: block;
    line-height: 0;
}

.custom-header-logo img {
    max-height: 70px;
    width: auto;
    display: block;
}

.custom-header-logo .site-title-link {
    text-decoration: none;
}

.custom-header-logo .site-title {
    margin: 0;
    font-size: 24px;
    color: #000;
    font-weight: 700;
}

/* ===== MENÚ ===== */
.custom-header-menu {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.custom-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.custom-menu li {
    position: relative;
}

.custom-menu li a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.custom-menu li a:hover,
.custom-menu li.current-menu-item>a {
    background: #f5f5f5;
    color: #000;
}

/* Submenú */
.custom-menu ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.custom-menu li:hover>ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-menu ul li {
    display: block;
}

.custom-menu ul li a {
    padding: 10px 20px;
    border-radius: 0;
}

.custom-menu ul li a:hover {
    background: #f9f9f9;
}

/* ===== ACCIONES (Buscador + Carrito) ===== */
.custom-header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Buscador */
.custom-header-search {
    position: relative;
}

.custom-header-search .search-form {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 0px;
}

.custom-header-search .search-field {
    width: 280px;
    padding: 10px 45px 10px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.custom-header-search .search-field:focus {
    outline: none;
    background: #fff;
    border-color: #333;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.custom-header-search .search-submit {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-header-search .search-submit:hover {
    color: #000;
}

/* Carrito */
.custom-header-cart .cart-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.custom-header-cart .cart-link:hover {
    background: #333;
    transform: translateY(-1px);
}

.custom-header-cart .cart-link svg {
    flex-shrink: 0;
}

.custom-header-cart .cart-count {
    background: #fff;
    color: #000;
    padding: 2px 8px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    line-height: 1.4;
}

.custom-header-cart .cart-total {
    font-weight: 600;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .custom-header-container {
        padding: 15px 20px;
        gap: 20px;
    }

    .custom-header-search .search-field {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .custom-header-container {
        flex-wrap: wrap;
    }

    .mobile-menu-toggle {
        display: flex;
        order: 4;
    }

    .custom-header-logo {
        order: 1;
    }

    .custom-header-actions {
        order: 2;
        margin-left: auto;
        gap: 10px;
    }

    .custom-header-menu {
        order: 5;
        flex: 1 1 100%;
        justify-content: flex-start;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .custom-header-menu.active {
        max-height: 500px;
        margin-top: 15px;
    }

    .custom-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .custom-menu li a {
        padding: 12px 15px;
        border-radius: 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .custom-header-search .search-field {
        width: 180px;
        padding: 8px 40px 8px 15px;
        font-size: 13px;
    }

    .custom-header-cart .cart-link {
        padding: 8px 15px;
        font-size: 13px;
        gap: 6px;
    }

    .custom-header-cart .cart-link svg {
        width: 18px;
        height: 18px;
    }

    /* Submenú en mobile */
    .custom-menu ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        background: #f9f9f9;
    }
}

/* Wrapper principal - STICKY MEJORADO */
.custom-header-wrapper {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    position: -webkit-sticky;
    /* Para Safari */
    position: sticky;
    top: 0;
    z-index: 9999;
    /* Z-index más alto */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

/* Efecto al hacer scroll */
.custom-header-wrapper.scrolled {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 5px 0;
}


.home.blog .site-header,
.home.page:not(.page-template-template-homepage) .site-header,
.home.post-type-archive-product .site-header,
.storefront-breadcrumb {
    margin-bottom: 20px;
}




/* CSS HOME */
.container {
    width: 90%;
    margin: auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.col-3 {
    width: calc(25% - 20px);
}

.col-4 {
    width: calc(33.333% - 20px);
}

img {
    width: 100%;
    display: block;
}

/* Flexslider */
.flexslider {
    margin: 20px 0;
}

.flexslider .slides li img {
    width: 100%;
    height: auto;
}

/* Responsive */
@media(max-width: 768px) {

    .col-3,
    .col-4 {
        width: 100%;
    }
}

/* ==========================================
   HOME TEMPLATE - MODERN STYLING
   ========================================== */

/* Container y secciones base */
.home-section {
    padding: 80px 0;
    background: #fff;
}

.home-section:nth-child(even) {
    background: #fafafa;
}

.home-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ===== HEADERS DE SECCIÓN ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #000 0%, #666 100%);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 18px;
    color: #666;
    font-weight: 400;
    margin: 0;
}

/* ===== GRID 4 COLUMNAS ===== */
.grid-4-img {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.grid-img-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1;
}

.img-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

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

.img-wrapper:hover img {
    transform: scale(1.08);
}

.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.img-wrapper:hover .img-overlay {
    opacity: 1;
}

/* ===== SLIDER SECUNDARIO ===== */
.slider-secundario-section {
    background: #f5f5f5;
}

.second-slider {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.slide-img-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.slide-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Controles del FlexSlider */
/* .flexslider .flex-direction-nav a {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.flexslider .flex-direction-nav a:hover {
    background: #fff;
    transform: scale(1.1);
}

.flexslider .flex-control-nav {
    bottom: 20px;
}

.flexslider .flex-control-paging li a {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid #fff;
}

.flexslider .flex-control-paging li a.flex-active {
    background: #fff;
} */

/* ===== PRODUCTOS ===== */
.productos-section {
    background: #fff;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f9f9f9;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.ver-producto {
    background: #fff;
    color: #000;
    padding: 12px 28px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.product-card:hover .ver-producto {
    transform: translateY(0);
}

.product-info {
    padding: 20px;
    text-align: center;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    display: block;
}

.product-price .woocommerce-Price-amount {
    font-weight: 700;
}

/* ===== GRID 3 COLUMNAS ===== */
.grid-3-img {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-3-img .grid-img-item {
    aspect-ratio: 4/5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .section-title {
        font-size: 36px;
    }

    .grid-4-img {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .home-section {
        padding: 50px 0;
    }

    .home-container {
        padding: 0 20px;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-title {
        font-size: 28px;
    }

    .section-subtitle {
        font-size: 16px;
    }

    .grid-4-img,
    .grid-3-img,
    .productos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .slide-img-wrapper {
        height: 300px;
    }

    .product-title {
        font-size: 16px;
    }

    .product-price {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 24px;
    }

    .section-divider {
        width: 60px;
        height: 3px;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    animation: fadeInUp 0.6s ease;
}

.grid-img-item,
.product-card {
    animation: fadeInUp 0.6s ease;
    animation-fill-mode: both;
}

.grid-img-item:nth-child(1) {
    animation-delay: 0.1s;
}

.grid-img-item:nth-child(2) {
    animation-delay: 0.2s;
}

.grid-img-item:nth-child(3) {
    animation-delay: 0.3s;
}

.grid-img-item:nth-child(4) {
    animation-delay: 0.4s;
}

.product-card:nth-child(1) {
    animation-delay: 0.1s;
}

.product-card:nth-child(2) {
    animation-delay: 0.2s;
}

.product-card:nth-child(3) {
    animation-delay: 0.3s;
}

.product-card:nth-child(4) {
    animation-delay: 0.4s;
}