/* Ecolap Grading System Styles */

/* --- Badge & Trigger (Visible on Product Page) --- */
.grading-trigger-container {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(2, 18, 11, 0.6);
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    backdrop-filter: blur(5px);
}

.grading-badge-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.grading-badge-icon {
    color: #00ff9d;
    font-size: 24px;
}

.grading-badge-text {
    display: flex;
    flex-direction: column;
}

.grading-label {
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Rajdhani', sans-serif;
}

.grading-value {
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.grading-stars-small {
    color: #00ff9d;
    font-size: 1rem;
    display: inline-flex;
}

.btn-open-guide {
    background: transparent;
    border: 1px solid #00ff9d;
    color: #00ff9d;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-open-guide:hover {
    background: rgba(0, 255, 157, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

/* --- Modal Overlay --- */
.grading-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 100000;
    /* High z-index */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
}

.grading-modal-content {
    position: relative;
    width: 100%;
    max-width: 850px;
    background: #02120b;
    /* Solid dark background */
    border: 1px solid #00ff9d;
    border-radius: 1rem;
    box-shadow: 0 0 50px rgba(0, 255, 157, 0.15);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    max-height: 90vh;
    overflow-y: auto;
    /* Scrolable if screen too small */
}

.grading-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.grading-modal-overlay.active .grading-modal-content {
    transform: scale(1);
}

.btn-close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    z-index: 50;
    transition: color 0.2s;
    /* Enforce Square Shape */
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    /* Slightly rounded corners */
}

.btn-close-modal:hover {
    color: #fff;
    transform: scale(1.1);
}

/* --- Grading System Inner Styles (Refined for Modal) --- */
.grading-system-container {
    padding: 2rem;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    /* Removed redundant borders/backgrounds as modal handles it */
}

.grading-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.grading-title {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 1.8rem;
    text-transform: uppercase;
    margin: 0;
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.5);
}

.grading-subtitle {
    display: block;
    color: #00ff9d;
    font-size: 1.1rem;
    margin-top: 0.5rem;
    font-weight: 600;
}

/* Slider Area */
.grading-slider-wrapper {
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grading-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    /* GSAP handles transition, removed CSS transition to avoid conflict */
    text-align: center;
    padding: 1rem;
}

.grading-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

/* Slide Content */
.grade-icon {
    font-size: 4rem;
    color: #00ff9d;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(0, 255, 157, 0.6);
}

.grade-stars {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.grade-stars .star {
    font-size: 1.5rem;
    color: #333;
    /* Inactive */
}

.grade-stars .star.filled {
    color: #00ff9d;
    text-shadow: 0 0 5px rgba(0, 255, 157, 0.8);
}

.grade-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.grade-description {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 600px;
    color: #cbd5e1;
    margin-bottom: 2rem;
}

/* "Misma Potencia" Global Message */
.power-guarantee {
    margin-top: auto;
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid rgba(0, 255, 157, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.power-guarantee span.icon {
    font-size: 1.2rem;
    color: #00ff9d;
}

.power-guarantee strong {
    color: #00ff9d;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

/* Controls */
.grading-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    position: relative;
    z-index: 20;
    padding: 0 1rem;
}

.nav-btn {
    background: transparent;
    border: 2px solid #00ff9d;
    color: #00ff9d;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: #00ff9d;
    color: #000;
    box-shadow: 0 0 15px #00ff9d;
}

.dots-container {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #00ff9d;
    box-shadow: 0 0 5px #00ff9d;
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
    .grading-modal-content {
        height: auto;
        /* Fit content instead of full height */
        max-height: 85vh;
        /* Leave some space at top */
        border-radius: 1rem;
        /* Bring back rounded corners */
        border: 1px solid #00ff9d;
        /* Bring back border */
        display: block;
        /* Default block behavior */
        margin: 0 1rem;
        /* Side margins */
    }

    .grading-system-container {
        padding: 2.5rem 1.5rem 1.5rem 1.5rem;
        /* More top padding for close button */
        height: auto;
        display: block;
        overflow-y: auto;
    }

    .grading-header {
        padding-right: 30px;
        /* Space for close button */
        margin-bottom: 1rem;
    }

    .grade-name {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }

    .grade-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .grading-slider-wrapper {
        min-height: 300px;
        /* Reduce minimum height */
    }

    .grading-trigger-container {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .grading-badge-content {
        flex-direction: column;
    }

    .btn-open-guide {
        justify-content: center;
    }

    .btn-close-modal {
        top: 0.75rem;
        right: 0.75rem;
        z-index: 100;
        background: rgba(0, 0, 0, 0.5);
        /* Background to readability */
        border-radius: 50%;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}