﻿.pd-section {
    background: #D4D4D4;
    padding: 60px 0 80px;
}

.pd-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    gap: 40px;

    align-items: flex-start;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• ZONA IZQUIERDA (GALERÃA) â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.pd-modal__gallery {
    display: flex;
    gap: 15px;
    flex: 0 0 550px;

    position: sticky;
    top: 100px;
    max-width: 100%;
    align-self: flex-start;
}

.pd-thumbs-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 90px;
}

.pd-thumb-nav {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #888;
    transition: color 0.3s;
    padding: 0;
    display: none;

}

.pd-thumb-nav:hover {
    color: #EB690B;
}

.pd-modal__thumbs {
    width: 100%;
    height: 410px;

    overflow: hidden;
    position: relative;
    padding: 0;
}

.pd-thumbs-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.4s ease-out;
}

.pd-thumb {
    width: 80px;
    height: 80px;
    background: #fff;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    border-radius: 8px;
    overflow: hidden;
    padding: 2px;
    flex-shrink: 0;
}

.pd-thumb.active {
    border-color: #EB690B;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
}

.pd-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #1a1a1a;
    border: none;
    width: 36px;
    height: 72px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 30;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    outline: none;
}

.pd-nav-btn:hover {
    background: #EB690B;
    color: #fff;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
}

#pd-nav-prev {
    left: 5px;
    border-radius: 4px 6px 6px 4px;
}

#pd-nav-next {
    right: 5px;
    border-radius: 6px 4px 4px 6px;
}

.pd-modal__main-img-wrap {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 480px;
    width: 100%;
    max-width: 580px;

    position: relative;
    overflow: visible;
}

.pd-main-img-container {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.pd-modal__main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 460px;
    transition: opacity 0.4s ease-in-out;
}

@media (max-width: 768px) {
    .pd-nav-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    #pd-nav-prev {
        left: 15px;
    }

    #pd-nav-next {
        right: 15px;
    }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• ZONA DERECHA (INFO) â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.pd-modal__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 15px;
}

.pd-modal__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
    line-height: 1.1;
    margin-top: -5px;

}

.pd-modal__desc {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 40px;
    overflow-x: auto;
}

.pd-modal__desc table {
    width: auto;
    max-width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    color: #222;
    font-size: .95rem;
}

/* Tablas de descripción sin líneas visibles (se conservan los datos) */
.pd-modal__desc table,
.pd-modal__desc th,
.pd-modal__desc td {
    border: none;
}

.pd-modal__desc th,
.pd-modal__desc td {
    padding: 8px 10px;
    text-align: left;
}

.pd-modal__desc th {
    background: rgba(255,106,0,.12);
    color: #111;
}

.pd-modal__cotizar-btn {
    background: #000;
    color: #fff;
    border: none;
    border-radius: 40px;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    align-self: flex-start;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.pd-modal__cotizar-btn:hover {
    background: #EB690B;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(249, 115, 22, 0.3);
}

@media (max-width: 900px) {
    .pd-container {
        flex-direction: column;
        padding: 0 20px;
        gap: 30px;
    }

    .pd-modal__gallery {
        flex-direction: column-reverse;
        flex: auto;
        width: 100%;
        max-width: 100%;
    }

    .pd-modal__main-img-wrap {
        height: auto;
        aspect-ratio: 1/1;
        max-height: 80vh;
    }

    .pd-modal__thumbs {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
        max-height: none;
        justify-content: center;
    }

    .pd-thumb {
        flex-shrink: 0;
    }
}

.pd-modal__gallery {
    overflow: visible;

}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• BOTÃ“N EXPANDIR â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.pd-expand-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.55);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 20;
    backdrop-filter: blur(4px);
}

.pd-expand-btn:hover {
    background: #EB690B;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• LIGHTBOX â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.pd-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.pd-lightbox.active {
    display: flex;
}

.pd-lightbox__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    cursor: pointer;
}

.pd-lightbox__content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100vw;
    height: 100vh;
    padding: 4vh 4vw;
}

.pd-lightbox__img {
    width: min(92vw, 1800px);
    height: min(88vh, 1200px);
    object-fit: contain;
    background: #0d0d0d;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    transition: opacity 0.25s ease;
    display: block;
}

.pd-lightbox__nav {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
}

.pd-lightbox__nav:hover {
    background: #EB690B;
}

.pd-lightbox__close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.65);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.pd-lightbox__close:hover {
    background: #e53e3e;
}

.pd-lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.pd-related-section {
    background: #000;
}

.pd-related-section--lined {
    border-top: 1px solid #222;
}

.pd-related-slider {
    position: relative;
    margin-top: 40px;
    overflow: hidden;
    width: 100%;
}

.pd-related-track {
    display: flex;
    gap: 30px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: flex-start;
}

.pd-related-card {
    flex: 0 0 calc(33.333% - 20px);
    min-width: 320px;
}

.pd-related-card--clickable {
    cursor: pointer;
}

.pd-related-link {
    text-decoration: none;
}

/* ═══════════════ MÓVIL ═══════════════ */
@media (max-width: 768px) {
  /* Título y CTA a escala */
  .pd-modal__title {
    font-size: clamp(1.5rem, 7vw, 2.5rem);
  }
  .pd-modal__desc {
    margin-bottom: 24px;
  }
  .pd-modal__cotizar-btn {
    padding: 14px 28px;
    font-size: 1rem;
    align-self: stretch;
    text-align: center;
  }
  /* Miniaturas: tira horizontal con alto automático */
  .pd-modal__thumbs {
    height: auto;
  }
  .pd-thumbs-inner {
    flex-direction: row;
  }
  .pd-thumb {
    width: 64px;
    height: 64px;
  }
  /* Flechas más discretas */
  .pd-nav-btn {
    width: 30px;
    height: 56px;
  }
  /* Relacionadas: 1 por vista sin mínimo fijo */
  .pd-related-card {
    flex: 0 0 100%;
    min-width: 0;
  }
  .pd-related-track {
    gap: 16px;
  }
  /* Lightbox: imagen arriba, flechas abajo */
  .pd-lightbox__content {
    flex-direction: column;
    gap: 12px;
    padding: 12vh 4vw 4vh;
  }
  .pd-lightbox__img {
    width: min(94vw, 1800px);
    height: auto;
    max-height: 62vh;
  }
  .pd-lightbox__nav {
    width: 44px;
    height: 44px;
    position: static;
  }
}
