/* ==========================================================
   MOTOROLA TLK — Product Page Styles
   Bloques: Base, Producto, Acordeón, Vídeos, Accesorios
   ========================================================== */


/* ----------------------------------------------------------
   BASE
   ---------------------------------------------------------- */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* ----------------------------------------------------------
   BLOQUE 1: CABECERA DEL PRODUCTO
   ---------------------------------------------------------- */

.product-hero {
    display: flex;
    flex-wrap: wrap;
    padding: 60px 0;
}

.product-gallery {
    flex: 1;
    min-width: 300px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-main-image {
    width: 47%;
    margin-bottom: 20px;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.gallery-main-image.fade-out {
    opacity: 0;
}

.gallery-nav-arrows {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
}

.nav-arrow {
    width: 30px;
    height: 30px;
    color: #ccc;
    opacity: 0.5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    pointer-events: auto;
    cursor: pointer;
}

.nav-arrow:hover {
    color: #888;
    opacity: 1;
}

.gallery-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
}

.dot.active {
    background-color: #333;
}

.product-info {
    flex: 1;
    min-width: 300px;
}

.product-subtitle {
    font-size: 14px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    font-weight: 500;
}

.product-title {
    font-size: 42px;
    color: var(--primary-blue);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
}

.product-description {
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-weight: 400;
}


/* ----------------------------------------------------------
   ACORDEÓN DE PRODUCTO
   ---------------------------------------------------------- */

.product-accordion {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
}

details {
    border-bottom: 1px solid var(--border-color);
}

summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

.summary-left {
    display: flex;
    align-items: flex-end;
    gap: 15px;
}

.icon-plus {
    font-size: 18px;
    font-weight: normal;
    transition: transform 0.3s ease;
}

.icon-chevron {
    font-size: 12px;
    color: var(--text-gray);
}

details[open] .icon-plus {
    transform: rotate(45deg);
}

.details-content {
    padding: 10px 0 20px 30px;
    font-size: 14px;
    color: var(--text-gray);
}


/* ----------------------------------------------------------
   BLOQUE 2: CARRUSEL DE VÍDEOS
   ---------------------------------------------------------- */

.video-section {
    padding: 10px 0;
    background-color: #ffffff;
}

.section-title-dark {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.video-carousel-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.video-carousel {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 10px 0 20px 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    scroll-behavior: smooth;
}

.video-carousel::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.video-card {
    flex: 0 0 calc(33.333% - 16px);
    min-width: 300px;
    scroll-snap-align: start;
    transition: transform 0.3s ease;
}

.video-thumbnail {
    position: relative;
    background-color: #000;
    aspect-ratio: 16 / 9;
    margin-bottom: 15px;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.video-thumbnail:hover img {
    opacity: 0.8;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background-color: rgba(33, 33, 33, 0.8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 18px solid white;
    margin-left: 5px;
}

.video-thumbnail:hover .play-button {
    background-color: #ff0000;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
    margin-bottom: 6px;
}

.video-meta {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* Botones de navegación del carrusel */
.carousel-btn {
    position: absolute;
    top: calc(50% - 22px);
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background-color: #0e315b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    border: none;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 18px;
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn.prev {
    left: -22px;
}

.carousel-btn.next {
    right: -22px;
}

.carousel-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Dots del carrusel de vídeo */
.video-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
}

.video-dots .dot {
    width: 8px;
    height: 8px;
    background-color: #DBDBDB;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.video-dots .dot.active {
    background-color: #555555;
}


/* ----------------------------------------------------------
   BLOQUE 3: GRID DE ACCESORIOS
   ---------------------------------------------------------- */

.accessories-section {
    padding: 60px 0;
}

.section-header-centered {
    text-align: center;
    margin-bottom: 40px;
}

.accessories-title {
    color: var(--primary-blue);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.title-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.title-separator .s-dot {
    width: 4px;
    height: 4px;
    background-color: var(--primary-blue);
    border-radius: 50%;
}

.title-separator .s-line {
    width: 30px;
    height: 2px;
    background-color: var(--primary-blue);
}

/* Filtros */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.filter-tab {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-gray);
    background: transparent;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-tab.active {
    background-color: var(--tab-active-bg);
    color: #ffffff;
}

.filter-tab:hover:not(.active) {
    color: #000;
}

/* Grid de accesorios */
.accessories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px 15px;
}

.accessory-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.accessory-img {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.accessory-img img {
    max-height: 100%;
    object-fit: contain;
}

.accessory-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.accessory-code {
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 400;
}


/* ==========================================================
   MEDIA QUERIES — de mayor a menor breakpoint
   ========================================================== */

/* Tablets grandes / Laptops (hasta 1024px) */
@media (max-width: 1024px) {
    .video-card {
        flex: 0 0 calc(50% - 15px); /* 2 vídeos por fila */
    }

    .accessories-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .carousel-btn.prev { left: 10px; }
    .carousel-btn.next { right: 10px; }
}

/* Tablets (hasta 992px) */
@media (max-width: 992px) {
    .accessories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablets pequeñas / Móviles grandes (hasta 768px) */
@media (max-width: 768px) {
    .gallery-nav-arrows {
        display: none;
    }
    .product-hero {
        flex-direction: column;
        padding: 40px 0;
    }

    .product-gallery {
        width: 35%;
        min-width: 35%;
        margin: 0 auto;
    }

    .product-info {
        width: 100%;
        min-width: 70%;
        margin: 0 auto;
    }


    .gallery-main-image {
        width: 80%;
    }

    .video-card {
        flex: 0 0 85%;
    }

    .carousel-btn {
        display: none;
    }

    .accessories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 15px;
    }

    .section-title-dark {
        font-size: 26px;
    }
}

/* Móviles pequeños (hasta 480px) */
@media (max-width: 480px) {
    .product-title {
        font-size: 28px;
    }

    .gallery-main-image {
        width: 100%;
    }

    .accessories-grid {
        grid-template-columns: 1fr;
    }

    .details-content {
        padding-left: 15px;
    }

    .container {
        padding: 0 15px;
    }
}
