/* Estilos para el modal de la colección secreta */
#collection-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
}

#collection-modal.show {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
}

.collection-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 2rem;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.collection-entry {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    cursor: pointer;
}

.collection-entry:hover {
    transform: translateY(-5px);
}

.collection-preview {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #eee;
}

.collection-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.9rem;
    background: #ddd;
}

.collection-info {
    padding: 1rem;
}

.collection-info h4 {
    margin: 0 0 0.5rem;
    color: #333;
}

.collection-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--primary-green);
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.empty-collection {
    text-align: center;
    padding: 3rem;
}

.empty-collection i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-collection p {
    color: #666;
    margin-bottom: 2rem;
}

.collection-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Estilos para el modal de detalle */
.detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1100;
    display: none;
    overflow-y: auto;
}

.detail-modal.show {
    display: flex;
}

.detail-modal .modal-content {
    background: white;
    width: 90%;
    max-width: 1000px;
    margin: auto;
    border-radius: 8px;
    padding: 2rem;
}

.detail-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.detail-info {
    margin-bottom: 2rem;
}

.detail-info p {
    margin: 0.5rem 0;
}

.detail-media {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.media-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.media-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.media-item:hover .media-actions {
    opacity: 1;
}

.btn-icon {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s;
}

.btn-icon:hover {
    transform: scale(1.2);
}

.unsupported-media {
    width: 100%;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #666;
}

.unsupported-media i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-primary {
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}/* 
Estilos Mejorados para Mi Colección - Lista de Deseos y Favoritos */

/* Modal Principal */
.collection-modal .modal-content {
    width: 95%;
    max-width: 1000px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    overflow: hidden;
}

/* Header de Colección */
.collection-header {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: var(--text-light);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collection-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
}

.close-collection {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--text-light);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-collection:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Tabs de Navegación */
.collection-tabs {
    display: flex;
    background: var(--text-light);
    border-bottom: 1px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn.active {
    color: #e74c3c;
    border-bottom: 3px solid #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

.tab-btn:hover:not(.active) {
    background: #f8f9fa;
    color: var(--text-dark);
}

/* Contenedor Principal */
.collection-container {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: #f8f9fa;
}

/* Acciones de Colección */
.collection-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn-add-all,
.btn-share,
.btn-clear {
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-add-all {
    background: var(--secondary-green);
    color: var(--text-light);
}

.btn-add-all:hover {
    background: var(--primary-green);
    transform: translateY(-1px);
}

.btn-share {
    background: var(--warm-orange);
    color: var(--text-light);
}

.btn-share:hover {
    background: var(--sunset-orange);
    transform: translateY(-1px);
}

.btn-clear {
    background: #dc3545;
    color: var(--text-light);
}

.btn-clear:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Grid de Productos en Colección */
.products-grid-collection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card-collection {
    background: var(--text-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    border: 1px solid #e0e0e0;
}

.product-card-collection:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Imagen del Producto */
.product-image-collection {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.product-image-collection img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card-collection:hover .product-image-collection img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card-collection:hover .product-overlay {
    opacity: 1;
}

.btn-view {
    background: var(--text-light);
    color: var(--text-dark);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.1rem;
}

.btn-view:hover {
    background: var(--secondary-green);
    color: var(--text-light);
    transform: scale(1.1);
}

/* Información del Producto */
.product-info-collection {
    padding: 1rem;
}

.product-info-collection h4 {
    margin: 0 0 0.3rem 0;
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.3;
}

.product-category {
    color: #666;
    font-size: 0.85rem;
    margin: 0 0 0.5rem 0;
    text-transform: capitalize;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--secondary-green);
}

.old-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
}

.added-date {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
}

/* Acciones del Producto */
.product-actions-collection {
    padding: 1rem;
    border-top: 1px solid #f0f0f0;
}

.btn-add-cart {
    width: 100%;
    padding: 0.8rem;
    background: var(--secondary-green);
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add-cart:hover {
    background: var(--primary-green);
    transform: translateY(-1px);
}

.product-controls {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.btn-move,
.btn-remove {
    flex: 1;
    padding: 0.6rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-move {
    background: var(--warm-orange);
    color: var(--text-light);
}

.btn-move:hover {
    background: var(--sunset-orange);
}

.btn-remove {
    background: #dc3545;
    color: var(--text-light);
}

.btn-remove:hover {
    background: #c82333;
}

/* Colección Vacía */
.empty-collection {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.empty-collection i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ddd;
}

.empty-collection h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-dark);
    font-size: 1.3rem;
}

.empty-collection p {
    margin: 0 0 1.5rem 0;
    font-size: 1rem;
    line-height: 1.5;
}

.btn-primary {
    background: var(--secondary-green);
    color: var(--text-light);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--primary-green);
    transform: translateY(-1px);
}

/* Mensajes de Estado */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: var(--text-light);
    font-weight: 500;
    z-index: 3000;
    animation: slideInRight 0.3s ease-out;
    max-width: 300px;
}

.message.success {
    background: #28a745;
}

.message.info {
    background: #17a2b8;
}

.message.error {
    background: #dc3545;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .collection-modal .modal-content {
        width: 95%;
        height: 90vh;
        margin: 5vh auto;
    }

    .collection-header {
        padding: 1rem;
    }

    .collection-header h3 {
        font-size: 1.1rem;
    }

    .collection-tabs {
        flex-direction: column;
    }

    .tab-btn {
        padding: 0.8rem 1rem;
        border-bottom: 1px solid #e0e0e0;
    }

    .tab-btn.active {
        border-bottom: 1px solid #e74c3c;
        border-left: 3px solid #e74c3c;
    }

    .collection-container {
        padding: 1rem;
    }

    .collection-actions {
        flex-direction: column;
    }

    .products-grid-collection {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .product-controls {
        flex-direction: column;
    }

    .message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .collection-modal .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .collection-container {
        padding: 0.5rem;
    }

    .products-grid-collection {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .product-card-collection {
        margin-bottom: 0.5rem;
    }

    .empty-collection {
        padding: 2rem 1rem;
    }

    .empty-collection i {
        font-size: 3rem;
    }

    .collection-actions {
        gap: 0.5rem;
    }

    .btn-add-all,
    .btn-share,
    .btn-clear {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}