/* ============================================
   PRODUCTOS.CSS - PÁGINA DE PRODUCTOS
   Crochet by Mocla
   ============================================ */

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========== BREADCRUMBS SIMPLE ========== */
.breadcrumbs-section {
    background-color: #FFFFFF;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    animation: fadeInDown 0.6s ease-out 0.1s both;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ========== SECCIÓN DE PRODUCTOS ========== */
.products-section {
    background-color: #FAF8F5;
    padding: 6rem 0;
    min-height: 60vh;
}

/* ========== HEADER CON ANIMACIONES ========== */
.products-section .section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.products-section .section-subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 5px;
    color: #C9A87C;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: block;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.products-section .section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.2rem;
    font-weight: 300;
    color: #1A1A1A;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.products-count {
    font-size: 0.9rem;
    color: #9E9E9E;
    letter-spacing: 0.5px;
    font-weight: 300;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* ========== HEADER CON BOTÓN VOLVER EN LA MISMA LÍNEA ========== */
.section-header-with-back {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 2rem;
    margin-bottom: 4rem;
}

/* Botón Volver - Negro y elegante */
.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 400;
    color: #1A1A1A;
    text-decoration: none;
    transition: all 0.3s ease;
    padding-top: 0.5rem;
    white-space: nowrap;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.back-text{
    text-decoration: underline;
}

.back-arrow {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.back-link:hover {
    color: #C9A87C;
}

.back-link:hover .back-arrow {
    transform: translateX(-4px);
}

/* Header central */
.section-header-with-back .section-header {
    text-align: center;
    margin-bottom: 0;
}

/* Espaciador para balance */
.header-spacer {
    width: 1px;
}

/* ========== GRID DE PRODUCTOS ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

/* ========== TARJETAS CON ANIMACIONES ========== */
.product-item {
    background-color: #FFFFFF;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Animación escalonada */
.product-item:nth-child(1) { animation-delay: 0.7s; }
.product-item:nth-child(2) { animation-delay: 0.74s; }
.product-item:nth-child(3) { animation-delay: 0.78s; }
.product-item:nth-child(4) { animation-delay: 0.82s; }
.product-item:nth-child(5) { animation-delay: 0.86s; }
.product-item:nth-child(6) { animation-delay: 0.9s; }
.product-item:nth-child(7) { animation-delay: 0.94s; }
.product-item:nth-child(8) { animation-delay: 0.98s; }
.product-item:nth-child(9) { animation-delay: 1.02s; }
.product-item:nth-child(10) { animation-delay: 1.06s; }
.product-item:nth-child(11) { animation-delay: 1.1s; }
.product-item:nth-child(12) { animation-delay: 1.14s; }

.product-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #F5F5F5;
    flex-shrink: 0;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.product-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F5F5F5;
    color: #999;
    font-size: 0.9rem;
}

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

/* ========== DETALLES DEL PRODUCTO ========== */
.product-details {
    padding: 1rem 1.15rem 1.15rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
}

.product-cat {
    display: block;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #C9A87C;
    margin-bottom: 0.4rem;
    flex-shrink: 0;
}

.product-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    font-weight: 400;
    color: #1A1A1A;
    margin-bottom: 0.35rem;
    line-height: 1.3;
    flex-shrink: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6rem;
}

.product-desc {
    font-size: 0.75rem;
    font-weight: 300;
    color: #666;
    margin-bottom: auto;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.25rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.product-price {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #1A1A1A;
    letter-spacing: 0.3px;
}

.product-arrow {
    font-size: 1rem;
    color: #C9A87C;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== HOVER EFFECTS ========== */
.product-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.product-item:hover .product-arrow {
    transform: translateX(4px);
}

/* ========== BADGES ========== */
.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.3rem 0.75rem;
    background-color: #C9A87C;
    color: #FFFFFF;
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ========== MENSAJE SIN PRODUCTOS ========== */
.no-products {
    text-align: center;
    padding: 6rem 2rem;
    animation: fadeInUp 0.8s ease-out 0.7s both;
}

.no-products-content {
    max-width: 500px;
    margin: 0 auto;
}

.no-products-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: #1A1A1A;
    margin-bottom: 1rem;
}

.no-products-text {
    font-size: 1rem;
    color: #999;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.35rem;
    }
    
    .products-section .section-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .section-header-with-back {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }
    
    .back-link {
        font-size: 0.8rem;
        padding-top: 0;
    }
    
    .header-spacer {
        display: none;
    }
}

@media (max-width: 576px) {
    .breadcrumbs-section {
        padding: 1rem 0;
    }
    
    .back-link .back-text {
        display: none;
    }
    
    .back-arrow {
        font-size: 1.3rem;
    }
}

@media (max-width: 400px) {
    .products-grid {
        gap: 0.85rem;
    }
}

/* ========== OPTIMIZACIONES ========== */
@media (prefers-reduced-motion: reduce) {
    .product-item,
    .breadcrumbs-section,
    .products-section .section-subtitle,
    .products-section .section-title,
    .products-count,
    .no-products {
        animation: none !important;
        opacity: 1 !important;
    }
}


/* ========== EXPLORAR OTRAS CATEGORÍAS ========== */
.explore-categories {
    background-color: #FFFFFF;
    padding: 5rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.explore-categories .section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.explore-categories .section-subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 5px;
    color: #C9A87C;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: block;
}

.explore-categories .section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.2rem;
    font-weight: 300;
    color: #1A1A1A;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.explore-item {
    position: relative;
    display: block;
    overflow: hidden;
    background-color: #F5F5F5;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    text-decoration: none;
    color: inherit;
}

.explore-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.explore-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.explore-no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #F5F5F5 0%, #E8E8E8 100%);
}

.explore-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.4) 70%,
        rgba(0, 0, 0, 0.7) 100%
    );
    opacity: 0.7;
    transition: opacity 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.explore-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.75rem 1.5rem;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.explore-content h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: #FFFFFF;
    letter-spacing: 0.5px;
    margin: 0;
}

.explore-arrow {
    font-size: 1.5rem;
    color: #C9A87C;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin-left: 1rem;
}

/* ========== HOVER EFFECTS ========== */
.explore-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.explore-item:hover .explore-image {
    transform: scale(1.08);
}

.explore-item:hover .explore-overlay {
    opacity: 0.85;
}

.explore-item:hover .explore-content {
    transform: translateY(-8px);
}

.explore-item:hover .explore-arrow {
    transform: translateX(6px);
}

/* ========== CTA FINAL ========== */
.explore-cta {
    text-align: center;
    margin-top: 3rem;
}

.explore-cta .btn-text {
    font-size: 0.85rem;
    padding-bottom: 6px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .explore-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .explore-categories .section-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .explore-categories {
        padding: 3.5rem 0;
    }
    
    .explore-categories .section-header {
        margin-bottom: 2.5rem;
    }
    
    .explore-categories .section-title {
        font-size: 2.2rem;
    }
    
    .explore-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .explore-content {
        padding: 1.25rem 1.15rem;
    }
    
    .explore-content h3 {
        font-size: 1.3rem;
    }
    
    .explore-arrow {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .explore-categories {
        padding: 3rem 0;
    }
    
    .explore-categories .section-subtitle {
        font-size: 0.7rem;
        letter-spacing: 4px;
    }
    
    .explore-categories .section-title {
        font-size: 2rem;
    }
    
    .explore-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .explore-item {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .explore-content h3 {
        font-size: 1.4rem;
    }
}

@media (max-width: 400px) {
    .explore-grid {
        gap: 1rem;
    }
}

/* ========== ANIMACIONES ELEGANTES ========== */
@media (prefers-reduced-motion: reduce) {
    .explore-item,
    .explore-image,
    .explore-content,
    .explore-arrow {
        transition: none !important;
    }
}





/* ========== EXPLORAR OTRAS CATEGORÍAS - ESTILO COLECCIÓN ========== */
.explore-categories {
    background-color: #FFFFFF;
    padding: 5rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.explore-categories .section-header {
    text-align: center;
    margin-bottom: 3.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.explore-categories .section-subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 5px;
    color: #C9A87C;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: block;
}

.explore-categories .section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.2rem;
    font-weight: 300;
    color: #1A1A1A;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* ========== GRID DINÁMICO Y ROBUSTO ========== */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Si hay 4 categorías, máximo 4 columnas */
@media (min-width: 1200px) {
    .explore-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, calc(25% - 1.5rem)));
    }
}

/* ========== CARDS IDÉNTICOS A COLECCIÓN ========== */
.explore-item {
    position: relative;
    display: block;
    overflow: hidden;
    background-color: #F5F5F5;
    aspect-ratio: 3 / 4;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    text-decoration: none;
    color: inherit;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Animación escalonada */
.explore-item:nth-child(1) { animation-delay: 0.5s; }
.explore-item:nth-child(2) { animation-delay: 0.6s; }
.explore-item:nth-child(3) { animation-delay: 0.7s; }
.explore-item:nth-child(4) { animation-delay: 0.8s; }

.explore-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.explore-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Logo especial (fallback) */
.explore-image img.explore-logo {
    object-fit: contain;
    padding: 20%;
    background-color: #FAF8F5;
}

.explore-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.4) 70%,
        rgba(0, 0, 0, 0.7) 100%
    );
    opacity: 0.6;
    transition: opacity 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.explore-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    z-index: 2;
    text-align: center;
    color: #FFFFFF;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.explore-content h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: #FFFFFF;
    letter-spacing: 1px;
    margin: 0 0 1rem 0;
}

.explore-line {
    display: block;
    width: 50px;
    height: 1px;
    background-color: #C9A87C;
    margin: 1rem auto;
}

.explore-content p {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.9;
    margin: 0;
}

/* ========== HOVER EFFECTS IDÉNTICOS ========== */
.explore-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.explore-item:hover .explore-image img {
    transform: scale(1.08);
}

.explore-item:hover .explore-overlay {
    opacity: 0.8;
}

.explore-item:hover .explore-content {
    transform: translateY(-10px);
}

.explore-item:hover .explore-logo {
    transform: scale(1.05);
}

/* ========== CTA FINAL ========== */
.explore-cta {
    text-align: center;
    margin-top: 3rem;
}

.explore-cta .btn-text {
    font-size: 0.85rem;
    padding-bottom: 6px;
}

/* ========== ESTADO VACÍO ========== */
.explore-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.explore-empty p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: #999;
    margin-bottom: 2rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1400px) {
    .explore-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

@media (max-width: 1200px) {
    .explore-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.75rem;
    }
    
    .explore-categories .section-title {
        font-size: 2.8rem;
    }
    
    .explore-content h3 {
        font-size: 1.6rem;
    }
}

@media (max-width: 1024px) {
    .explore-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .explore-categories {
        padding: 3.5rem 0;
    }
    
    .explore-categories .section-header {
        margin-bottom: 2.5rem;
    }
    
    .explore-categories .section-title {
        font-size: 2.2rem;
    }
    
    .explore-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .explore-content {
        padding: 1.5rem;
    }
    
    .explore-content h3 {
        font-size: 1.4rem;
        margin-bottom: 0.75rem;
    }
    
    .explore-line {
        width: 40px;
        margin: 0.75rem auto;
    }
    
    .explore-content p {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .explore-categories {
        padding: 3rem 0;
    }
    
    .explore-categories .section-subtitle {
        font-size: 0.7rem;
        letter-spacing: 4px;
    }
    
    .explore-categories .section-title {
        font-size: 2rem;
    }
    
    .explore-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .explore-item {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .explore-content h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 400px) {
    .explore-grid {
        gap: 1rem;
    }
    
    .explore-content {
        padding: 1.25rem;
    }
    
    .explore-content h3 {
        font-size: 1.3rem;
    }
}

/* ========== OPTIMIZACIONES ========== */
@media (prefers-reduced-motion: reduce) {
    .explore-item,
    .explore-categories .section-header {
        animation: none !important;
        opacity: 1 !important;
    }
    
    .explore-image img,
    .explore-content,
    .explore-overlay {
        transition: none !important;
    }
}

/* Performance */
.explore-image img {
    will-change: transform;
}

.explore-item {
    will-change: transform, box-shadow;
}