/* Estilos específicos de la tienda */

.shop-header {
    background: var(--text);
    color: var(--white);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.shop-header .back-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.shop-header .back-link:hover {
    color: var(--accent);
}

.shop-header h1 {
    font-size: 1.5rem;
    margin: 0;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s;
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-icon img {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent);
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.shop-hero {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--principal), var(--secundari));
    color: var(--white);
    border-radius: 16px;
    margin-bottom: 3rem;
}

.shop-hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.shop-hero p {
    font-size: 1.2rem;
    opacity: 0.95;
}

.shop-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--principal);
    background: transparent;
    color: var(--principal);
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: var(--principal);
    color: var(--white);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--principal);
    color: var(--white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

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

.product-card.hidden {
    display: none;
}

.product-image {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--white);
    font-size: 3rem;
}

.product-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent);
    color: var(--text);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    color: var(--principal);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.product-description {
    color: var(--text);
    opacity: 0.8;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--principal);
}

.btn-add-cart {
    background: var(--principal);
    color: var(--white);
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-add-cart:hover {
    background: var(--secundari);
    transform: scale(1.05);
}

/* Panel del carrito */
.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--white);
    box-shadow: -4px 0 20px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.cart-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cart-header {
    padding: 1.5rem;
    background: var(--principal);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-cart {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.close-cart:hover {
    transform: rotate(90deg);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.empty-cart {
    text-align: center;
    color: var(--text);
    opacity: 0.6;
    padding: 2rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--fons);
    align-items: center;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    color: var(--principal);
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-weight: 700;
    color: var(--text);
}

.cart-item-quantity {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--principal);
    background: var(--white);
    color: var(--principal);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
}

.qty-btn:hover {
    background: var(--principal);
    color: var(--white);
}

.qty-value {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.remove-item {
    background: transparent;
    border: none;
    color: var(--red);
    cursor: pointer;
    font-size: 1.2rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--fons);
    background: var(--fons);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--principal);
    margin-bottom: 1rem;
}

.btn-checkout {
    width: 100%;
    padding: 1rem;
    background: var(--principal);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-checkout:hover {
    background: var(--secundari);
    transform: translateY(-2px);
}

.shop-footer {
    background: var(--text);
    color: var(--white);
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 1rem;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 950px) {
    .shop-header {
        padding: 1rem;
    }

    .shop-hero {
        padding: 2rem 1rem;
    }

    .shop-hero h2 {
        font-size: 1.8rem;
    }

    .shop-main {
        padding: 1rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .cart-panel {
        width: 100%;
    }
}
