/* ============================================
   ESTILOS PARA CATALOGO.HTML
   Página del catálogo de productos - Diseño Mejorado
============================================ */

/* Catalog Hero */
.catalog-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    color: var(--white);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.catalog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
}

.catalog-hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.8s ease-out;
}

.catalog-hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--white) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.catalog-hero-content p {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Catalog Section */
.catalog-section {
    padding: 4rem 0;
    background: var(--light-bg);
}

    
.filters-container {
    background: linear-gradient(135deg, var(--white) 0%, rgba(248, 249, 250, 0.8) 100%);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(212, 175, 55, 0.1);
    margin-bottom: 3rem;
    border: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
    overflow: hidden;
}

.filters-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
/* Botón promociones en rojo usando data-attribute */
.btn-filter[data-category="Promociones"] {
    background-color: #e53935 !important;
    color: white !important;
    border-color: #e53935 !important;
}

.btn-filter[data-category="Promociones"].active {
    background-color: #fc0000 !important;
    border-color: #b71c1c !important;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid transparent;
    background: linear-gradient(to right, var(--light-bg), transparent) bottom;
    background-size: 100% 2px;
    background-repeat: no-repeat;
}

.btn-toggle-filters {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--secondary-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-toggle-filters:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.btn-toggle-filters i {
    transition: transform 0.3s ease;
}

.btn-toggle-filters.collapsed i {
    transform: rotate(180deg);
}

.filters-header h3 {
    font-size: 1.75rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    position: relative;
}

.filters-header h3::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* Filters */
.filters {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2.5rem;
    padding: 0.5rem 0;
    justify-content: space-between;
}

.filter-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.filter-group::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), transparent);
    border-radius: 2px;
    opacity: 0.3;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-left: 0.5rem;
}

.filter-group label svg {
    color: var(--primary-color);
    filter: drop-shadow(0 2px 4px rgba(212, 175, 55, 0.3));
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-filter {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-dark);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-filter::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(255, 215, 0, 0.2));
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-filter:hover::before {
    width: 300px;
    height: 300px;
}

.btn-filter:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.2);
}

.btn-filter.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--secondary-color);
    border-color: var(--accent-color);
    box-shadow: 
        0 6px 20px rgba(212, 175, 55, 0.4),
        0 0 0 3px rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

.btn-filter.active:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(212, 175, 55, 0.5),
        0 0 0 4px rgba(212, 175, 55, 0.15);
}

.search-group {
    /* Elimina grid-column o déjalo vacío */
    flex: 2;
    min-width: 300px;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.search-wrapper {
    position: relative;
    display: flex;
    gap: 0.5rem;
}

.search-wrapper input {
    flex: 1;
    padding: 1.25rem 1.75rem;
    padding-right: 4rem;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    font-size: 1.05rem;
    transition: all 0.3s;
    background: var(--white);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
}

.search-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 
        inset 0 2px 6px rgba(0, 0, 0, 0.05),
        0 0 0 4px rgba(212, 175, 55, 0.1),
        0 4px 20px rgba(212, 175, 55, 0.15);
    transform: translateY(-2px);
}

.btn-search {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.35rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-search:hover {
    transform: translateY(-50%) scale(1.15) rotate(15deg);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.5);
}

.btn-search:active {
    transform: translateY(-50%) scale(1.05) rotate(0deg);
}

/* Results Info */
.results-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid transparent;
    background: linear-gradient(to right, rgba(212, 175, 55, 0.3), transparent) top;
    background-size: 100% 2px;
    background-repeat: no-repeat;
    text-align: center;
}

.results-info span {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(255, 215, 0, 0.1));
    border-radius: 20px;
    display: inline-block;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.15);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 3px 15px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(212, 175, 55, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 1px solid rgba(212, 175, 55, 0.15);
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(255, 215, 0, 0.08));
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 1;
    pointer-events: none;
}

.product-card::after {
    content: '✨';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    opacity: 0;
    transform: scale(0) rotate(-180deg);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 3;
}

.product-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 
        0 25px 50px rgba(212, 175, 55, 0.25),
        0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

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

.product-card:hover::after {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.product-image {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform 0.7s ease-out;
    position: relative;
}

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

.product-info {
    padding: 1.4rem;
    position: relative;
    z-index: 2;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.95));
}

.product-brand {
    color: var(--primary-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-weight: 800;
    display: inline-block;
    position: relative;
    padding-bottom: 0.25rem;
}

.product-brand::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.4s ease-out;
}

.product-card:hover .product-brand::after {
    width: 100%;
}

.product-name {
    font-size: 1.3rem;
    margin: 0.75rem 0;
    color: #000000;
    font-weight: 800;
    line-height: 1.3;
    min-height: 2.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--secondary-color);
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.75rem;
    margin: 0.5rem 0;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transition: all 0.3s;
}

.product-card:hover .product-category {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* La descripción se gestiona ahora en la vista de detalle, no en la card */
.product-description {
    display: none;
}

.product-footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 2px solid transparent;
    background: linear-gradient(to right, rgba(212, 175, 55, 0.2), transparent) top;
    background-size: 100% 2px;
    background-repeat: no-repeat;
    gap: 0.75rem;
}

.product-price {
    font-size: 2rem;
    font-weight: 900;
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}



/* Estilos para descuentos */
.discount-badge {
    position: absolute;
    top: 20px;
    right: -35px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 0.5rem 2.5rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 
        0 4px 15px rgba(239, 68, 68, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    transform: rotate(45deg);
    transform-origin: center;
}

.discount-badge::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 8px 8px;
    border-color: transparent transparent transparent #991b1b;
}

.discount-badge::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 8px 8px 0;
    border-color: transparent #991b1b transparent transparent;
}

.discount-text {
    font-size: 0.95rem;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.discount-label {
    font-size: 0.6rem;
    font-weight: 700;
    opacity: 0.95;
    margin-top: -2px;
    white-space: nowrap;
}

@keyframes pulse {
    0%, 100% {
        transform: rotate(45deg) scale(1);
    }
    50% {
        transform: rotate(45deg) scale(1.05);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.price-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.product-price-original {
    font-size: 1.2rem;
    font-weight: 600;
    color: #9ca3af;
    text-decoration: line-through;
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

/* Hover effects para cards con descuento */
.product-card:hover .discount-badge {
    box-shadow: 
        0 6px 25px rgba(239, 68, 68, 0.7),
        0 3px 12px rgba(0, 0, 0, 0.4);
    transform: rotate(45deg) scale(1.05);
}

.product-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
}

.btn-more-info {
    padding: 0.6rem 1.3rem;
    border-radius: 999px;
    border: 2px solid var(--border-color);
    background: var(--white);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-more-info::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(255, 215, 0, 0.08));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-more-info span {
    position: relative;
    z-index: 1;
}

.btn-more-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--light-bg);
    font-size: 0.8rem;
    transition: transform 0.3s ease, background 0.3s ease;
}

.btn-more-info:hover::before {
    opacity: 1;
}

.btn-more-info:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.25);
}

.btn-more-info:hover .btn-more-icon {
    transform: translateX(3px);
    background: var(--primary-color);
    color: var(--secondary-color);
}

.btn-add-cart {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--secondary-color);
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.8rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-add-cart::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.7s, height 0.7s;
}

.btn-add-cart:hover::before {
    width: 400px;
    height: 400px;
}

.btn-add-cart:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 35px rgba(212, 175, 55, 0.5);
}

.btn-add-cart:active {
    transform: scale(1.05);
}

.btn-add-cart:disabled {
    background: linear-gradient(135deg, var(--text-light), #9ca3af);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--light-bg);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    color: var(--text-light);
    font-size: 1.125rem;
    font-weight: 600;
}

/* No Products State */
.no-products {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.no-products-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-products h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.no-products p {
    color: var(--text-light);
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .filters {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .catalog-hero-content h1 {
        font-size: 2rem;
    }

    .catalog-hero-content p {
        font-size: 1rem;
    }

    .filters-header {
        flex-direction: row;
        justify-content: space-between;
    }

    .btn-toggle-filters {
        display: flex;
    }

    .filters {
        max-height: 1000px;
        overflow: hidden;
        transition: max-height 0.4s ease-out, opacity 0.3s ease;
        opacity: 1;
    }

    .filters.collapsed {
        max-height: 0;
        opacity: 0;
        margin: 0;
        padding: 0;
    }

    .filters-container {
        padding: 1.5rem;
    }

    .btn-group {
        width: 100%;
    }

    .btn-filter {
        flex: 1;
        min-width: 100px;
        text-align: center;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .product-card {
        border-radius: 12px;
    }

    .product-image {
        height: 180px;
    }

    .product-info {
        padding: 1rem;
    }

    .product-brand {
        font-size: 0.7rem;
        letter-spacing: 1.5px;
    }

    .product-name {
        font-size: 1rem;
        min-height: 2rem;
        margin: 0.5rem 0;
    }

    .product-category {
        font-size: 0.65rem;
        padding: 0.3rem 0.7rem;
    }

    .product-price {
        font-size: 1.3rem;
    }

    .product-price-original {
        font-size: 1rem;
    }

    .btn-add-cart {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    .btn-more-info {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    .discount-badge {
        top: 15px;
        right: -30px;
        padding: 0.4rem 2rem;
    }

    .discount-text {
        font-size: 0.8rem;
    }

    .discount-label {
        font-size: 0.55rem;
    }
}

@media (max-width: 480px) {
    .catalog-hero {
        padding: 2rem 0;
    }

    .catalog-hero-content h1 {
        font-size: 1.5rem;
    }

    .filters-container {
        padding: 1rem;
        margin-bottom: 2rem;
    }

    .filters-header h3 {
        font-size: 1.25rem;
    }

    .filter-group label {
        font-size: 0.85rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

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

    .product-card:hover {
        transform: translateY(-8px) scale(1.02);
    }

    .product-image {
        height: 150px;
    }

    .product-info {
        padding: 0.75rem;
    }

    .product-brand {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }

    .product-name {
        font-size: 0.9rem;
        min-height: 1.8rem;
    }

    .product-category {
        font-size: 0.6rem;
        padding: 0.25rem 0.6rem;
        margin: 0.3rem 0;
    }

    .product-footer {
        margin-top: 1rem;
        padding-top: 0.75rem;
    }

    .product-price {
        font-size: 1.1rem;
    }

    .product-price-original {
        font-size: 0.85rem;
    }

    .product-actions {
        gap: 0.4rem;
        margin-top: 0.75rem;
    }

    .btn-add-cart {
        padding: 0.45rem 0.9rem;
        font-size: 0.7rem;
    }

    .btn-more-info {
        padding: 0.45rem 0.9rem;
        font-size: 0.7rem;
    }

    .discount-badge {
        top: 12px;
        right: -28px;
        padding: 0.35rem 1.8rem;
    }

    .discount-text {
        font-size: 0.7rem;
    }

    .discount-label {
        font-size: 0.5rem;
    }
}

/* Footer Justificado */
.footer-grid {
    text-align: left;
}

.footer-about,
.footer-contact,
.footer-social {
    text-align: left;
}