/* WooMatch - Tinder per WooCommerce CSS */

/* Reset e base */
* {
    box-sizing: border-box;
}

.woo-match-app {
    font-family: 'the-seasons', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

/* Header */
.woo-match-header {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    padding: 30px;
}

.woo-match-header h1 {
    font-size: 65px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #414141;
    font-family: 'the-seasons', serif;
}

.woo-match-header p {
    font-size: 1.1rem;
    margin: 0 0 20px 0;
    color: #7f8c8d;
    font-family: 'the-seasons', serif;
}

/* Progress bar */
.woo-match-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
}

.progress-bar {
    width: 250px;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #444444, #666666);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

#progress-text {
    font-weight: 600;
    font-size: 1rem;
    color: #414141;
    font-family: 'the-seasons', serif;
}

/* Container principale */
.woo-match-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 500px;
    margin: -60px auto 30px auto;
    perspective: 1000px;
}

/* Card */
.woo-match-card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
    cursor: grab;
    transition: all 0.3s ease;
    transform: scale(0.95) translateY(20px);
    opacity: 0;
    display: none;
}

.woo-match-card.active {
    display: block;
    transform: scale(1) translateY(0);
    opacity: 1;
    cursor: grab;
}

.woo-match-card.dragging {
    cursor: grabbing;
    transition: none;
}

.woo-match-card.swipe-left {
    transform: translateX(-120%) rotate(-20deg);
    opacity: 0;
}

.woo-match-card.swipe-right {
    transform: translateX(120%) rotate(20deg);
    opacity: 0;
}

/* Immagine card */
.card-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}



/* Nome prodotto sotto l'immagine */
.card-title-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 30px 20px 20px;
    z-index: 2;
    text-align: center;
    padding-bottom: 30px;
}

.card-title-bottom .card-title {
    font-size: 1.9rem;
    font-weight: 600;
    margin: 30px;
    color: white;
    font-family: 'the-seasons', serif;
}

/* Indicatori like/dislike */
.card-indicators {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.woo-match-card.swipe-left .dislike-indicator,
.woo-match-card.swipe-right .like-indicator {
    opacity: 1;
}

.indicator {
    padding: 10px 15px;
    border-radius: 50px;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
    border: 2px solid white;
}

.like-indicator {
    background: rgba(255, 107, 107, 0.9);
}

.dislike-indicator {
    background: rgba(108, 117, 125, 0.9);
}

/* Controlli */
.woo-match-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: -60px;
    margin-bottom: 30px;
    position: relative;
    z-index: 100000;
}

.control-btn {
    width: 77px;
    height: 77px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: white;
    position: relative;
    z-index: 100001;
}



.like-btn {
    background: white;
}

.like-btn i {
    background: linear-gradient(135deg, #2DD59C, #6DEEE3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
}

.dislike-btn {
    background: white;
}

.dislike-btn i {
    background: linear-gradient(135deg, #FF5A3E, #FD267A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
}


/* Modal */
.woo-match-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #000;
}

/* Risultati */
.woo-match-results {
    padding: 30px;
    text-align: center;
}

.results-header h2 {
    color: #414141;
    margin-bottom: 10px;
    font-size: 65px;
    font-weight: 600;
    font-family: 'the-seasons', serif;
}

.results-header p {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.1rem;
    font-family: 'the-seasons', serif;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .results-header h2 {
        font-size: 3rem;
    }
}

.result-item {
    background: transparent;
    text-align: left;
    transition: transform 0.2s ease;
}

.result-item:hover {
    transform: translateY(-5px);
}

.result-item img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 0;
    margin-bottom: 20px;
    background: #f8f9fa;
}

.result-item h3 {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    color: #414141;
    font-family: 'the-seasons', serif;
    font-weight: 600;
    line-height: 1.3;
}

.result-item .price {
    color: #7f8c8d;
    font-weight: 600;
    margin-bottom: 20px;
    font-family: 'the-seasons', serif;
}

.result-item a {
    text-decoration: none;
    color: inherit;
}

.result-item a:hover {
    opacity: 0.8;
}

.reset-btn {
    background: #414141;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    line-height: 12px;
    text-transform: uppercase;
}

.reset-btn:hover {
    background: #555;
}

/* Nessun match trovato */
.no-matches {
    text-align: center;
    padding: 60px 20px;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.no-matches-icon {
    font-size: 4.5rem;
    margin-bottom: 25px;
    color: #ff6b6b;
}

.no-matches h3 {
    color: #414141;
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: 20px;
    font-family: 'the-seasons', serif;
}

.no-matches p {
    color: #7f8c8d;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    font-family: 'the-seasons', serif;
    max-width: 450px;
}

/* Loading a tutto schermo */
.woo-match-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    text-align: center;
    color: #2c3e50;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(44, 62, 80, 0.1);
    border-top: 4px solid #2c3e50;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    margin: 0 auto 30px;
}

.woo-match-loading h2 {
    font-family: 'the-seasons', serif;
    font-weight: 600;
    font-size: 2rem;
    margin: 0 0 15px 0;
    color: #414141;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.8s ease;
    text-align: center;
    line-height: 1.2;
}

.woo-match-loading p {
    font-family: 'the-seasons', serif;
    font-size: 1.1rem;
    color: #7f8c8d;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.loading-spinner {
    animation: spin 1.2s linear infinite;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(10px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

@keyframes textChange {
    0% { opacity: 0; transform: translateY(20px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

.woo-match-loading h2 {
    /* Animazione per il cambio delle scritte */
    transition: all 0.8s ease;
}

.woo-match-loading h2.text-changing {
    opacity: 0;
    transform: translateY(20px);
}

.woo-match-loading h2.text-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stato vuoto */
.woo-match-empty {
    text-align: center;
    color: #414141;
    padding: 60px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.woo-match-empty p {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .woo-match-app {
        padding: 15px;
    }
    
    .woo-match-header h1 {
        font-size: 3rem;
    }
    
    .woo-match-container {
        height: 450px;
        max-width: 100%;
    }
    
    .control-btn {
        width: 60px;
        height: 60px;
        font-size: 1.3rem;
    }
    
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .result-item img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .woo-match-container {
        height: 400px;
    }
    
    .woo-match-controls {
        gap: 15px;
    }
    
    .control-btn {
        width: 55px;
        height: 55px;
        font-size: 1.2rem;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .card-price {
        font-size: 1.1rem;
    }
}

/* Animazioni aggiuntive */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.woo-match-card.active {
    animation: slideIn 0.4s ease-out;
}

/* Hover effects per desktop */
@media (hover: hover) {
    .control-btn:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    }
}
