/* ============================================================================
 * Drop Shop — Producto Interactivo (Bloque B2 CSS)
 * ========================================================================== */

/* a. Migas */
.pd-breadcrumb {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
    grid-column: 1 / -1;
}
.pd-breadcrumb a {
    color: var(--text);
    text-decoration: none;
}
.pd-breadcrumb a:hover {
    color: var(--accent);
}

/* b. Lens */
.pd-img-container {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
    border-radius: var(--radius);
}
.lens-glass {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
    transition: opacity 0.2s, transform 0.2s;
    background-repeat: no-repeat;
    background-size: 220%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 10;
}
@media (prefers-reduced-motion: reduce) {
    .lens-glass { transition: none; }
}

/* c. Buybox */
@media (min-width: 768px) {
    .pd-buybox {
        position: sticky;
        top: 104px;
        align-self: start;
    }
}

/* d. Delivery */
.pd-delivery {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-size: 0.9rem;
    margin: 1rem 0;
    font-weight: 500;
}
.pd-delivery svg {
    color: var(--accent);
}

/* e. Buy Now Btn */
#buy-now-btn {
    margin-top: 0.75rem;
}

/* f. Share Btn */
.pd-share-btn {
    color: var(--muted);
}
.pd-share-btn:hover {
    color: var(--text);
}

/* g. Tracing Beam */
.tracing-beam {
    display: flex;
    position: relative;
    gap: 1.5rem;
    margin-top: 2rem;
}
.tb-svg-container {
    position: relative;
    width: 20px;
    flex-shrink: 0;
}
.tb-svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: visible;
}
.tb-path-bg {
    stroke: rgba(255,255,255,0.1);
}
.tb-path-active {
    transition: stroke-dashoffset 0.1s linear;
}
.tb-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ff4b4b;
    border-radius: 50%;
    left: 10px;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px #ff4b4b;
    z-index: 2;
}
.tb-content {
    flex-grow: 1;
}

.tb-content h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.tb-content li {
    margin-left: 1.5rem;
    margin-bottom: 0.25rem;
    list-style-type: disc;
}

/* h. Related */
.pd-related {
    margin-top: 4rem;
    margin-bottom: 2rem;
    max-width: 100vw;
}
.pd-related h3 {
    margin-bottom: 1.5rem;
    padding: 0 var(--container-px, 2rem);
    max-width: 1200px;
    margin-inline: auto;
}
.pd-related-carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 var(--container-px, 2rem) 2rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}
.pd-related-carousel::-webkit-scrollbar {
    display: none;
}
.pd-related-carousel.active {
    cursor: grabbing;
}
.pd-related-carousel > * {
    scroll-snap-align: start;
    min-width: 280px;
    max-width: 280px;
    flex-shrink: 0;
}

/* i. Móvil */
@media (max-width: 767px) {
    .pd-swipe-track {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        border-radius: var(--radius);
        margin-bottom: 1rem;
    }
    .pd-swipe-track::-webkit-scrollbar { display: none; }
    .pd-swipe-img {
        width: 100%;
        flex-shrink: 0;
        scroll-snap-align: start;
        object-fit: cover;
        aspect-ratio: 1;
    }
    
    .pd-dots {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    .pd-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: rgba(255,255,255,0.2);
        transition: background 0.3s;
    }
    .pd-dot.active {
        background: var(--accent);
    }
    
    .pd-sticky-bar {
        position: fixed;
        bottom: 84px; /* encima del dock que mide ~60px + gap */
        left: 1rem;
        right: 1rem;
        background: rgba(10, 12, 16, 0.85);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 100px;
        padding: 0.5rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        z-index: 99;
        transform: translateY(150%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .pd-sticky-bar.visible {
        transform: translateY(0);
    }
    .pd-sticky-bar img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
    }
    .sbar-info {
        flex-grow: 1;
    }
    .sbar-price {
        font-weight: 600;
        font-size: 0.9rem;
    }
    .sbar-add {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        border-radius: 100px;
    }
    
    /* Prevenir desborde horizontal general */
    body, html {
        overflow-x: hidden;
    }
}

/* Barra fija móvil en el tema claro (planificador): el texto oscuro no se leía sobre el fondo negro */
@media (max-width: 767px) {
    .pd-sticky-bar { background: rgba(255,255,255,.94); border-color: rgba(15,23,42,.08); box-shadow: 0 12px 32px -12px rgba(15,23,42,.35); color: var(--ink); }
    .pd-sticky-bar, .pd-sticky-bar * { color: var(--ink); }
    .pd-sticky-bar button, .pd-sticky-bar .btn-primary { background: var(--ink); color: #fff; }
    .pd-sticky-bar button *, .pd-sticky-bar .btn-primary * { color: #fff; }
}
