@import url('style.css');

strong {
    color: #F8F5EC;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-shadow:
        1px 1px 5px rgba(0,0,0,1),
        2px 2px 3px rgba(0,0,0,0.5);
}

.arrow {
    border-radius: 0.5rem;
    color: var(--color-tertiary);
    cursor: pointer;
    font-size: 3rem;
    padding: 0.5rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    user-select: none;
    z-index: 10;
    -webkit-user-select: none;
}

.arrow:not(.hidden) {
    opacity: 1;
}

.arrow-next {
    right: 0.1rem;
    top: 50%;
    transform: translateY(-50%);
}

.arrow-prev {
    left: 0.1rem;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-indicator-top-left {
    color: var(--color-tertiary);
    display: none;
    font-size: 0.7rem;
    left: 0;
    position: absolute;
    top: 0;
    z-index: 10;
}

.carousel-indicators {
    align-items: center;
    display: none;
    gap: 0.5rem;
    justify-content: center;
    left: 0;
    margin-top: 1rem;
    position: relative;
    top: 0;
    width: 100%;
}

.carousel-indicators span {
    background-color: var(--color-secondary);
    border-radius: 50%;
    display: inline-block;
    height: 0.6rem;
    width: 0.6rem;
}

.carousel-indicators .active {
    background-color: var(--color-tertiary);
}

.color-value {
    display: inline-block;
    padding-left: 2rem;
}

.details {
    margin: 5.5rem auto 2rem auto;
}

.details_code {
    flex: 0 0 30%;
    min-width: 180px;
    padding-left: 2rem;
}

.details_code,
.details_soportados span {
    font-size: clamp(1rem, 3vw, 1.3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 1px 1px var(--color-fourth);
}

.details_details {
    margin-top: 0.5rem;
}

.details_image {
    align-items: center;
    background-color: var(--color-primary);
    border-radius: 2.5rem;
    box-shadow: 0px 1px 5px 0px rgb(28 29 4 / 50%);
    display: flex;
    flex: 0 0 35%;
    flex-direction: row;
    justify-content: center;
    margin: 1rem 0;
    padding: 1rem;
    width: 50%;
}

.details_marca,
.details_text {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.5;
    padding: 0.5rem;
    text-align: justify;
}

.details_soportados {
    display: grid;
    flex: 1;
    grid-template-columns: repeat(3, 1fr);
    min-width: 260px;
    padding-left: 2rem;
}

.details_soportados #soportados-label {
    font-weight: 700;
    grid-column: 1 / -1;
    margin-bottom: 0.3rem;
}

.details_soportados .details_marca {
    padding-left: 1.2rem;
    position: relative;
}

/* Ícono tipo bullet */
.details_soportados .details_marca:not(:empty)::before {
    content: "•";
    font-size: 1.5rem;
    left: 0;
    position: absolute;
    top: 0;
}

.details_soportados .details_marca:empty::before {
    content: none;
}

.details_title {
    color: var(--color-fourth);
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    font-weight: bold;
    margin: 2rem auto;
    text-align: center;
    text-shadow: 1px 1px 2px var(--color-fourth);
}

.main-image {
    align-items: center;
    display: flex;
    flex-grow: 1;
    justify-content: center;
}

.main-image img {
    border-radius: 1rem;
    object-fit: contain;
    width: 100%;
}

.product_details {
    background-color: var(--color-secondary);
    border-radius: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 0 auto;
    padding: 2%;
    text-align: justify;
    width: 90%;
}

.product_details_img {
    background-position: center;
    transition: 1s all;
    width: 70%;
}

.product_details_img:hover {
    transform: scale(1.15);
}

.product_details_text {
    color: var(--color-fifth);
    display: flex;
    flex: 1 1 60%;
    flex-direction: column;
    justify-content: center;
    line-height: 1.5;
    width: 80%
}

.product_details_text_img {
    border-radius: 1rem;
    box-shadow: 0px 1px 5px 0px rgb(28 29 4 / 50%);
    width: 100%;
}

.text-info-wrapper {
    display: flex;
    flex-wrap: wrap;
    padding-bottom: 1rem;
}

/* ========== ZOOM ========== */
#product-image {
    cursor: zoom-in;
}

.image-zoom-container {
    display: inline-block;
    position: relative;
    width: 90%;
}

.zoom-lens {
    background-color: rgba(60, 60, 60, 0.4);
    border: 1px solid var(--color-tertiary);
    cursor: zoom-in;
    display: none;
    height: 8rem;
    pointer-events: none;
    position: absolute;
    width: 8rem;
    z-index: 5;
}

.zoom-result {
    background-repeat: no-repeat;
    background-size: 200% 200%;
    border: 1px solid var(--color-tertiary);
    border-radius: 0.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    display: none;
    height: 35rem;
    left: 120%;
    position: absolute;
    top: -4rem;
    width: 35rem;
    z-index: 10;
}

/* ========== LIGHTBOX ========== */
body.lightbox-open {
    overflow: hidden;
}

#lightbox-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.image-counter {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 0.5rem;
    color: var(--color-primary);
    font-size: 1rem;
    left: 1.5rem;
    padding: 0.5rem;
    position: absolute;
    top: 1.5rem;
    z-index: 1001;
}

.lightbox,
#lightbox-overlay {
    align-items: center;
    background-color: rgba(30, 30, 30, 0.8);
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    left: 0;
    opacity: 0;
    position: fixed;
    top: 0;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    visibility: hidden;
    width: 100%;
    z-index: 10000;
}

.lightbox:not(.hidden) {
    opacity: 1;
}

.lightbox-btn.next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-btn.prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close {
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 0.5rem;
    color: var(--color-primary);
    cursor: pointer;
    font-size: 2.5rem;
    padding: 0 0.5rem;
    position: absolute;
    right: 2rem;
    top: 1rem;
    z-index: 1001;
}

.lightbox-controls {
    border: none;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    position: absolute;
    top: 50%;
    width: 95%;
    z-index: 1001;
}

.lightbox-image {
    border-radius: 0.5rem;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
    max-height: 80%;
    max-width: 90%;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.lightbox-image.fade-out {
    opacity: 0;
}

.lightbox-indicators span {
    background-color: var(--color-secondary);
    border-radius: 50%;
    height: 0.5rem;
    opacity: 0.5;
    width: 0.5rem;
}

.lightbox-indicators span.active {
    background-color: var(--color-primary);
    opacity: 1;
}

.lightbox-indicators-wrapper {
    align-items: center;
    bottom: 1.5%;
    display: flex;
    justify-content: center;
    left: 50%;
    margin: 0 auto;
    padding: 4px 8px;
    position: absolute;
    transform: translateX(-50%);
    width: fit-content;
    z-index: 9999;
}

.lightbox-prev,
.lightbox-next {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 0.5rem;
    color: var(--color-primary);
    cursor: pointer;
    font-size: 3rem;
    padding: 0.5rem;
    -webkit-user-select: none;
    user-select: none;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--color-tertiary);
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.thumbnails {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 62.5rem;
    overflow-y: auto;
    padding: 0.5rem;
}

.thumbnails img {
    border: 0.125rem solid transparent;
    border-radius: 0.5rem;
    box-shadow: 0px 1px 5px 0px rgb(28 29 4 / 50%);
    cursor: pointer;
    height: 5rem;
    object-fit: cover;
    transition: border-color 0.2s ease-in-out;
    width: 5rem;
}

.thumbnails img:hover,
.thumbnails img.selected {
    border-color: var(--color-tertiary);
}



@media (max-width: 479px) {
    strong {
        font-size: 1.3rem;
    }
    #product-image {
        cursor: default;
        pointer-events: auto;
    }
    .arrow {
        display: block;
    }
    .carousel-indicator-top-left {
        display: block;
        font-size: 1.1rem;
    }
    .carousel-indicators {
        display: flex;
        gap: 0.5rem;
    }
    .details {
        margin: 4rem auto 2rem auto;
    }
    .details_code, #soportados-label {
        flex: 100%;
        font-size: 1.3rem;
    }
    .details_code p {
        padding-left: 0;
    }
    .details_image {
        align-items: center;
        border-radius: 2rem;
        display: flex;
        flex-direction: column;
        margin-bottom: 1rem;
        margin-top: 0;
    }
    .details_image,
    .product_details_text {
        flex: 1 1 100%;
    }
    .details_marca {
        padding: 0 0.1rem;
    }
    .details_title {
        margin: 0.5rem;
        text-align: center;
    }
    .image-counter {
        font-size: 1.3rem;
        left: 1rem;
        top: 1rem;
    }
    .image-zoom-container {
        align-items: center;
        display: flex;
        justify-content: center;
        width: 100%;
    }
    .lightbox-controls {
        width: 93%;
    }
    .lightbox-close {
        font-size: 1.5rem;
        right: 1rem;
        top: 1rem;
    }
    .lightbox-image {
        max-height: 95%;
        max-width: 95%;
    }
    .lightbox-indicators {
        background-color: var(--color-fifth);
        border-radius: 0.5rem;
        display: flex;
        gap: 0.5rem;
        padding: 0.3rem 0.5rem;
        position: absolute;
    }
    .lightbox-prev,
    .lightbox-next {
        display: none;
    }
    .main-image {
        flex-direction: column;
        width: auto;
    }
    .main-image img {
        max-width: 100%;
        max-height: 21.875rem;
    }
    .product_details {
        align-items: center;
        flex-direction: column;
        gap: 0;
    }
    .product_details_text {
        width: auto;
    }
    .thumbnails {
        display: none !important;
    }
    .thumbnails img {
        height: 3.75rem;
        width: 3.75rem;
    }
    .zoom-lens,
    .zoom-result {
        display: none !important;
    }
}


@media (min-width:480px) and (max-width:767px) {
    #product-image {
        cursor: default;
        pointer-events: auto;
    }
    .arrow {
        display: block;
    }
    .carousel-indicator-top-left {
        display: block;
    }
    .carousel-indicators {
        display: flex;
        gap: 0.5rem;
    }
    .details {
        margin: 4rem auto 2rem auto;
    }
    .details_code, #soportados-label {
        flex: 100%;
        font-size: 1.3rem;
    }
    .details_image {
        align-items: center;
        border-radius: 2rem;
        display: flex;
        flex-direction: column;
        margin-bottom: 1rem;
        margin-top: 0;
    }
    .details_marca {
        padding: 0 0.1rem;
    }
    .details_title {
        font-size: 1.7rem;
        margin: 0.5rem;
        text-align: center;
    }
    .image-counter {
        font-size: 1.2rem;
        left: 1rem;
        top: 1rem;
    }
    .image-zoom-container {
        align-items: center;
        display: flex;
        justify-content: center;
        width: 100%;
    }
    .lightbox-controls {
        width: 93%;
    }
    .lightbox-close {
        font-size: 2rem;
        right: 1rem;
        top: 1rem;
    }
    .lightbox-image {
        max-height: 95%;
        max-width: 95%;
    }
    .lightbox-indicators {
        background-color: var(--color-fifth);
        border-radius: 0.5rem;
        display: flex;
        gap: 0.7rem;
        padding: 0.5rem 0.8rem;
        position: absolute;
    }
    .lightbox-prev,
    .lightbox-next {
        display: none;
    }
    .main-image {
        flex-direction: column;
        width: auto;
    }
    .main-image img {
        max-width: 100%;
        max-height: 21.875rem;
    }
    .product_details {
        align-items: center;
        flex-direction: column;
        gap: 0;
    }
    .product_details_text {
        width: auto;
    }
    .thumbnails {
        display: none !important;
    }
    .thumbnails img {
        height: 3.75rem;
        width: 3.75rem;
    }
    .zoom-lens,
    .zoom-result {
        display: none !important;
    }
}


@media (min-width:768px) and (max-width:1023px) {
    #product-image {
        cursor: default;
        pointer-events: auto;
    }
    .arrow {
        display: block;
    }
    .carousel-indicator-top-left {
        display: block;
        font-size: 1.2rem;
    }
    .carousel-indicators {
        display: flex;
        gap: 1rem;
        margin-top: auto;
    }
    .details {
        margin: 4rem auto 2rem auto;
    }
    .details_code, #soportados-label {
        flex: 100%;
        font-size: 1.3rem;
    }
    .details_image {
        align-items: center;
        border-radius: 2rem;
        display: flex;
        flex: 0 0 75%;
        flex-direction: column;
        height: 100%;
        margin-bottom: 1rem;
        margin-top: 0;
        width: 300%;
    }
    .details_marca {
        margin-left: 3rem;;
    }
    .details_title {
        font-size: 1.8rem;
        margin: 1.5rem;
        text-align: center;
    }
    .image-counter {
        font-size: 1.1rem;
        left: 1.5rem;
        top: 1.5rem;
    }
    .image-zoom-container {
        align-items: center;
        display: flex;
        justify-content: center;
        width: 65%;
    }
    .lightbox-controls {
        width: 93%;
    }
    .lightbox-close {
        font-size: 2.2rem;
        right: 1.5rem;
        top: 1.5rem;
    }
    .lightbox-image {
        max-height: 95%;
        max-width: 95%;
    }
    .lightbox-indicators {
        background-color: var(--color-fifth);
        border-radius: 0.5rem;
        display: flex;
        gap: 0.7rem;
        padding: 0.5rem 0.8rem;
        position: absolute;
    }
    .lightbox-prev,
    .lightbox-next {
        display: none;
    }
    .main-image {
        flex-direction: column;
        width: 150%;
    }
    .main-image img {
        width: 75%;
    }
    .product_details {
        align-items: center;
        gap: 1rem;
        justify-content: center;
    }
    .product_details_text {
        padding: 0 1rem;
        width: 90%;
    }
    .thumbnails {
        display: none !important;
    }
    .thumbnails img {
        height: 3.75rem;
        width: 3.75rem;
    }
    .zoom-lens,
    .zoom-result {
        display: none !important;
    }
}


@media (min-width: 1024px) and (max-width: 1279px) {
    .arrow {
        display: block;
    }
    .carousel-indicator-top-left {
        display: block;
        font-size: 1.3rem;
    }
    .carousel-indicators {
        display: flex;
        gap: 1.5rem;
        margin-top: auto;
    }
    .carousel-indicators span {
        height: 0.8rem;
        width: 0.8rem;
    }
    .details_code {
        margin-bottom: 0.5rem;
    }
    .details_details {
        margin-top: 0;
    }
    .details_image {
        align-items: center;
        border-radius: 2rem;
        display: flex;
        flex: 0 0 75%;
        flex-direction: column;
        margin-bottom: 1rem;
        margin-top: 0;
        width: auto;
    }
    .details_marca,
    .details_text {
        padding: 0.2rem;
    }
    .details_title {
        margin: 1rem 0;
    }
    .image-zoom-container {
        align-items: center;
        display: flex;
        justify-content: center;
        width: auto;
    }
    .main-image {
        flex-direction: column;
        width: auto;
    }
    .product_details {
        align-items: center;
        gap: 1rem;
        justify-content: center;
    }
    .product_details_text {
        width: 80%;
    }
    .thumbnails {
        display: none !important;
    }
}


@media (min-width: 1280px) {
    .carousel-indicators {
        display: flex;
        gap: 1.5rem;
        margin-top: auto;
    }
    .carousel-indicator-top-left {
        display: block;
        font-size: 1.3rem;
    }
    .details {
        margin: 4rem auto 2rem auto;
    }
    .details_code,
    .details_soportados span {
        margin-bottom: 0;
    }
    .details_image {
        flex-direction: column;
        margin-bottom: 1rem;
        margin-top: 0;
    }
    .details_marca {
        padding: 0.1rem;
    }
    .image-zoom-container {
        align-items: center;
        display: flex;
        justify-content: center;
        width: auto;
    }
    .main-image {
        flex-direction: column;
    }
    .product_details {
        align-items: center;
        gap: 1rem;
        justify-content: center;
    }
    .product_details_text {
        width: 70%;
    }
    .thumbnails {
        display: none !important;
    }
}