/* Variables de color Electro */
:root {
    --electro-yellow: #fed700;
    --electro-yellow-hover: #f5c500;
    --electro-dark: #333e48;
    --electro-text: #0062bd;
    --electro-border: #ddd;
    --electro-success: #5cb85c;
    --electro-danger: #d9534f;
}

/* Botón de comparar */
.spc-compare-btn {
	width: 70% !imoprtant;
    height: 30px;
    font-size: 12px;
    align-items: center;
	
    background: #fff;
    border: 2px solid var(--electro-yellow);
    color: var(--electro-dark);
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
  
    font-weight: 600;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.spc-compare-btn:hover {
    background: var(--electro-yellow);
    color: var(--electro-dark);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.spc-compare-btn.added {
    background: var(--electro-yellow);
    color: var(--electro-dark);
}

.spc-compare-btn i {
    font-size: 16px;
}

/* Widget flotante */
.spc-floating-button {
    position: fixed;
    bottom: 100px;
    right: 9px;
    background: var(--electro-yellow);
    color: var(--electro-dark);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: transform 0.3s ease;
}

.spc-floating-button:hover {
    transform: scale(1.1);
}

.spc-floating-button i {
    font-size: 24px;
}

.spc-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--electro-danger);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Popup de comparación */
.spc-compare-popup {
    position: fixed;
    bottom: 180px;
    right: 20px;
    background: #fff;
    border: 1px solid var(--electro-border);
    border-radius: 5px;
    padding: 0;
    width: 320px;
    max-height: 400px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    z-index: 9998;
    display: none;
}

.spc-compare-popup.active {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spc-popup-header {
    background: #f8f8f8;
    padding: 15px 20px;
    border-bottom: 2px solid var(--electro-yellow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spc-popup-header h3 {
    margin: 0;
    color: var(--electro-dark);
    font-size: 18px;
}

.spc-close-popup {
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.spc-close-popup:hover {
    color: var(--electro-danger);
}

.spc-popup-content {
    padding: 15px;
    max-height: 250px;
    overflow-y: auto;
}

.spc-products-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.spc-product-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid var(--electro-border);
    position: relative;
}

.spc-product-item:last-child {
    border-bottom: none;
}

.spc-product-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 3px;
}

.spc-product-info {
    flex: 1;
}

.spc-product-info h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: var(--electro-dark);
    line-height: 1.2;
}

.spc-product-info p {
    margin: 0;
    color: var(--electro-danger);
    font-weight: bold;
    font-size: 14px;
}

.spc-remove {
    background: var(--electro-danger);
    color: #fff;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spc-remove:hover {
    transform: scale(1.2);
}

.spc-popup-footer {
    padding: 15px;
    border-top: 1px solid var(--electro-border);
    display: flex;
    gap: 10px;
}

.spc-clear-all {
    flex: 1;
    background: #fff;
    border: 1px solid var(--electro-border);
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    border-radius: 3px;
}

.spc-clear-all:hover {
    background: #f8f8f8;
    border-color: var(--electro-danger);
    color: var(--electro-danger);
}

.spc-compare-now {
    flex: 1;
    background: var(--electro-yellow);
    color: var(--electro-dark);
    text-align: center;
    padding: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border-radius: 3px;
    font-size: 14px;
}

.spc-compare-now:hover {
    background: var(--electro-yellow-hover);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.spc-empty {
    text-align: center;
    color: #999;
    padding: 30px;
    font-size: 14px;
}

/* Tabla de comparación */
.spc-compare-table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
}

.spc-compare-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.spc-compare-table td {
    padding: 15px;
    border: 1px solid var(--electro-border);
    text-align: center;
    vertical-align: middle;
}

.spc-compare-table .spc-label {
    background: #f8f8f8;
    font-weight: bold;
    color: var(--electro-dark);
    text-align: left;
    width: 200px;
}

/* Imagen del producto en tabla */
.spc-product-image {
    position: relative;
}

.spc-compare-table img {
    max-width: 150px;
    height: auto;
}

/* Título del producto */
.spc-compare-table h3 {
    margin: 0;
    font-size: 16px;
}

.spc-compare-table h3 a {
    color: var(--electro-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.spc-compare-table h3 a:hover {
    color: var(--electro-yellow-hover);
}

/* Precio */
.spc-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--electro-dark);
}

.spc-price del {
    color: #999;
    font-weight: normal;
    margin-right: 10px;
}

.spc-price ins {
    text-decoration: none;
    color: var(--electro-danger);
}

/* Rating */
.spc-compare-table .star-rating {
    display: inline-block;
}

/* Stock */
.spc-stock {
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 3px;
    display: inline-block;
}

.spc-stock.in-stock {
    background: #e8f5e9;
    color: var(--electro-success);
}

.spc-stock.out-stock {
    background: #ffebee;
    color: var(--electro-danger);
}

/* Botón eliminar de la tabla */
.spc-remove-from-table {
    background: var(--electro-danger);
    color: #fff;
    border: none;
    padding: 8px 16px;
    margin-top: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
}

.spc-remove-from-table:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* Notificaciones */
.spc-notification {
    position: fixed;
    top: 20px;
    right: -350px;
    background: var(--electro-yellow);
    color: var(--electro-dark);
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10001;
    transition: right 0.3s ease;
    font-weight: 500;
    max-width: 300px;
}

.spc-notification.show {
    right: 20px;
    animation: slideInRight 0.3s ease;
}

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

.spc-notification.error {
    background: var(--electro-danger);
    color: #fff;
}

.spc-notification.success {
    background: var(--electro-yellow);
    color: var(--electro-dark);
}

/* Loading */
.spc-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--electro-border);
    border-top-color: var(--electro-yellow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Botón deshabilitado */
.spc-compare-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .spc-compare-popup {
        width: 90%;
        right: 5%;
        left: 5%;
        bottom: 80px;
    }
    
    .spc-floating-button {
        bottom: 100px;
        right: 12px;
        width: 50px;
        height: 50px;
    }
    
    .spc-floating-button i {
        font-size: 20px;
    }
    
    .spc-compare-table {
        font-size: 14px;
    }
    
    .spc-label {
        width: 100px !important;
    }
    
    .spc-compare-table img {
        max-width: 80px;
    }
}

/* Animación del botón al agregar */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.spc-compare-btn.adding {
    animation: pulse 0.6s ease;
}

/* Scrollbar personalizada para el popup */
.spc-popup-content::-webkit-scrollbar {
    width: 6px;
}

.spc-popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.spc-popup-content::-webkit-scrollbar-thumb {
    background: var(--electro-yellow);
    border-radius: 3px;
}

.spc-popup-content::-webkit-scrollbar-thumb:hover {
    background: var(--electro-yellow-hover);
}

/* Modal de categoría - Estilo Electro */
.spc-category-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
}

.spc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(2px);
}

.spc-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 0;
    border-radius: 8px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.spc-modal-header {
    background: #333e48;
    padding: 15px 20px;
    text-align: right;
    margin: 0;
}

.spc-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s;
    line-height: 1;
    display: inline-block;
    width: 30px;
    height: 30px;
    text-align: center;
    border-radius: 50%;
}

.spc-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.spc-modal-body {
    padding: 30px 25px 20px;
    text-align: center;
}

.spc-modal-icon {
    display: inline-block;
    width: 60px;
    height: 60px;
    background: #fed700;
    border-radius: 50%;
    margin-bottom: 20px;
    position: relative;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(254, 215, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(254, 215, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(254, 215, 0, 0);
    }
}

.spc-modal-icon i {
    font-size: 32px;
    color: #333e48;
    line-height: 60px;
}

.spc-modal-title {
    font-size: 22px;
    margin-bottom: 12px;
    color: #333e48;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
}

.spc-modal-message {
    font-size: 15px;
    color: #5a6268;
    margin-bottom: 20px;
    line-height: 1.6;
    padding: 0 10px;
}

.spc-modal-info {
    background: #f8f9fa;
    border-left: 3px solid #fed700;
    padding: 12px 15px;
    border-radius: 4px;
    margin: 20px 0 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
}

.spc-modal-info i {
    color: #fed700;
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.spc-modal-info p {
    margin: 0;
    font-size: 13px;
    color: #5a6268;
    line-height: 1.5;
}

.spc-modal-footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.spc-modal-ok {
    background: #fed700;
    color: #333e48;
    border: none;
    padding: 12px 35px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Open Sans', sans-serif;
    box-shadow: 0 2px 5px rgba(254, 215, 0, 0.3);
}

.spc-modal-ok:hover {
    background: #333e48;
    color: #fed700;
    box-shadow: 0 4px 12px rgba(51, 62, 72, 0.3);
    transform: translateY(-1px);
}

.spc-modal-ok:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 480px) {
    .spc-modal-content {
        max-width: 340px;
        margin: 20px;
    }
    
    .spc-modal-body {
        padding: 25px 20px 15px;
    }
    
    .spc-modal-title {
        font-size: 20px;
    }
    
    .spc-modal-message {
        font-size: 14px;
    }
    
    .spc-modal-icon {
        width: 50px;
        height: 50px;
    }
    
    .spc-modal-icon i {
        font-size: 28px;
        line-height: 50px;
    }
}

/* Animación de salida */
.spc-category-modal.closing .spc-modal-content {
    animation: modalSlideOut 0.3s ease-in;
}

@keyframes modalSlideOut {
    from {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    to {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }
}

/* Estilos adicionales para integración con Electro */
.spc-category-modal * {
    box-sizing: border-box;
}

/* Si quieres que el icono use Font Awesome en lugar de ec-icons */
.spc-modal-icon .fa-exclamation-triangle {
    font-size: 30px;
    color: #333e48;
    line-height: 60px;
}

/* Efecto hover para el modal completo */
.spc-modal-content:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.35);
}

/* Transición suave al cerrar */
.spc-category-modal.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}
