.pd-product {
    display: none;
}

.pd-product:target {
    display: block;
}

.pd-empty-msg {
    display: block;
    max-width: 600px;
    margin: 80px auto;
    text-align: center;
    color: #888888;
    font-size: 1rem;
}

.pd-empty-msg a {
    color: var(--rosa);
    font-weight: 700;
    text-decoration: none;
}

.pd-product:target ~ .pd-empty-msg {
    display: none;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px; 
    margin: 0 auto;
    padding: 60px 40px 20px;
}

.pd-slide-radio {
    display: none;
}

.pd-gallery {
    position: relative;
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 20px;
}

.pd-thumbs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pd-thumb {
    display: block;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    height: 100px;
    opacity: 0.5;
    transition: opacity 0.3s ease, border-color 0.3s ease;
}

.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pd-thumb:hover {
    opacity: 0.8;
}

.pd-main {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f7f7f7;
    height: 550px;
}

.pd-slide {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pd-slide-radio:nth-of-type(1):checked ~ .pd-main .pd-slide:nth-of-type(1),
.pd-slide-radio:nth-of-type(2):checked ~ .pd-main .pd-slide:nth-of-type(2),
.pd-slide-radio:nth-of-type(3):checked ~ .pd-main .pd-slide:nth-of-type(3) {
    display: block;
}

.pd-slide-radio:nth-of-type(1):checked ~ .pd-thumbs .pd-thumb:nth-of-type(1),
.pd-slide-radio:nth-of-type(2):checked ~ .pd-thumbs .pd-thumb:nth-of-type(2),
.pd-slide-radio:nth-of-type(3):checked ~ .pd-thumbs .pd-thumb:nth-of-type(3) {
    border-color: var(--rosa);
    opacity: 1; 
}

.pd-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.pd-nombre {
    font-size: 2.2rem;
    font-weight: 700;
    color: #000000;
    margin: 0 0 15px;
    line-height: 1.2;
}

.pd-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.pd-estrellas {
    color: #ffb800; 
    letter-spacing: 2px;
    font-size: 1.1rem;
}

.pd-reviews {
    font-size: 0.9rem;
    color: #888888;
}

.pd-precio {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000000;
    margin: 0 0 20px;
}

.pd-precio span {
    font-size: 1.1rem;
    font-weight: 400;
    color: #a0a0a0;
    text-decoration: line-through;
    margin-left: 10px;
}

.pd-desc {
    font-size: 1rem;
    line-height: 1.7;
    color: #555555;
    margin-bottom: 25px;
}

.pd-divider {
    height: 1px;
    background-color: #eeeeee;
    margin: 25px 0;
}

.pd-compra {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    height: 50px; 
}

.pd-cantidad {
    display: flex;
    align-items: center;
    border: 1px solid #dddddd;
    border-radius: 4px;
    overflow: hidden;
    width: 100px;
}

.pd-qty-input {
    width: 100%;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #000000;
    outline: none;
}

.pd-btn-carrito {
    flex: 1;
    border: none;
    background-color: #000000;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pd-btn-carrito:hover {
    background-color: var(--rosa);
}

.pd-stock {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2ecc71;
    margin: 0;
}

.pd-share {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #000000;
}

.pd-share a {
    color: #666666;
    transition: color 0.2s ease;
}

.pd-share a:hover {
    color: var(--rosa);
}

.pd-tabs-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 40px 70px;
}

.pd-tab-radio {
    display: none;
}

.pd-tab-labels {
    display: flex;
    justify-content: center; 
    gap: 50px;
    border-bottom: 1px solid #eeeeee;
    margin-bottom: 40px;
}

.pd-tab-label {
    padding: 15px 4px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #888888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.pd-tab-panel {
    display: none;
    font-size: 1rem;
    line-height: 1.8;
    color: #555555;
    max-width: 900px;
    margin: 0 auto;
}

.pd-tab-radio:nth-of-type(1):checked ~ .pd-tab-labels .pd-tab-label:nth-of-type(1),
.pd-tab-radio:nth-of-type(2):checked ~ .pd-tab-labels .pd-tab-label:nth-of-type(2),
.pd-tab-radio:nth-of-type(3):checked ~ .pd-tab-labels .pd-tab-label:nth-of-type(3) {
    color: #000000;
    border-bottom-color: var(--rosa);
}

.pd-tab-radio:nth-of-type(1):checked ~ .pd-tab-panel.pd-panel-desc,
.pd-tab-radio:nth-of-type(2):checked ~ .pd-tab-panel.pd-panel-det,
.pd-tab-radio:nth-of-type(3):checked ~ .pd-tab-panel.pd-panel-video {
    display: block;
}

.pd-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.pd-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}


.pd-panel-det h3 {
    font-size: 1.2rem;
    color: #000000;
    margin-bottom: 20px;
}

.pd-ficha {
    display: grid;
    gap: 12px;
}

.pd-ficha-fila {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    padding: 12px 20px;
    background-color: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
}

.pd-ficha-fila span:first-child {
    font-weight: 700;
    color: #000000;
}

.pd-relacionados {
    max-width: 1100px; 
    margin: 0 auto;
    padding: 0 20px 70px;
}

.pd-relacionados h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 40px;
    text-align: center;
}

.pd-relacionados-grid {
    padding: 0;
    grid-template-columns: repeat(3, 1fr) !important; 
    gap: 35px;
}

@media (max-width: 1100px) {
    .product-detail {
        grid-template-columns: 1fr;
        padding: 40px 30px 10px;
    }

    .pd-relacionados {
        padding: 0 50px 60px;
    }
}

@media (max-width: 600px) {
    .pd-gallery {
        grid-template-columns: 1fr;
    }

    .pd-thumbs {
        flex-direction: row;
        overflow-x: auto;
    }

    .pd-thumb {
        min-width: 80px;
        height: 80px;
    }

    .pd-main {
        height: 340px;
    }

    .pd-tabs-section,
    .pd-relacionados {
        padding-left: 20px;
        padding-right: 20px;
    }

    .pd-tab-labels {
        gap: 20px;
        flex-wrap: wrap;
    }

    .pd-ficha-fila {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .pd-relacionados-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 15px !important;
        width: 100% !important;
        padding: 0 !important;
        justify-content: center;
    }

    .pd-relacionados-grid .producto-card { 
        width: 100% !important;
        margin: 0 auto;
    }
    
    .pd-relacionados-grid .producto-img-wrap img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }
}