/* CONTENEDOR PRINCIPAL */

.product-layout{
max-width:1200px;
margin:40px auto;
display:grid;
grid-template-columns:1fr 1fr;
gap:60px;
margin-bottom:30px;
}

/* ===== GALERIA ===== */

.product-gallery{
display:flex;
gap:15px;
}

.product-thumbs{
display:flex;
flex-direction:column;
gap:12px;
width:90px;
}

.product-thumbs img{
width:100%;
cursor:pointer;
border-radius:6px;
border:1px solid #eee;
transition:0.2s;
}

.product-thumbs img:hover{
border-color:#000;
}

.product-main-image{
flex:1;
min-width:400px;
}

.product-main-image img{
width:100%;
border-radius:10px;
transition:opacity .2s ease;
}

/* ===== INFO PRODUCTO ===== */

.product-info{
display:flex;
flex-direction:column;
}

/* ===== TITULO ===== */

.product-title{
font-family:Poppins,sans-serif;
font-weight:700;
font-size:52px;
line-height:60px;
margin-bottom:20px;
color: #000;
}

/* ===== PRECIO ===== */

.product-price{
font-family:Poppins,sans-serif;
font-weight:600;
font-size:40px;
line-height:48px;
margin-bottom:20px;
color: #000;
}

/* ===== DESCRIPCION ===== */

.product-short-description{
font-family:Poppins,sans-serif;
font-weight:400;
font-size:20px;
line-height:24px;
margin-bottom:30px;
color:#333;
}

/* ===== CARRITO ===== */

.mpb-cart{
display:flex;
gap:20px;
align-items:center;
margin-top:30px;
}

/* ===== BOTON CANTIDAD ===== */

.mpb-qty-wrapper{
width:170px;
height:52px;
background:#f3f3f3;
border-radius:62px;
display:flex;
align-items:center;
justify-content:space-between;
padding:0 20px;
}

.qty-minus,
.qty-plus{
background:none;
border:none;
font-size:26px;
font-weight:500;
cursor:pointer;
color:#000;
width:40px;
height:100%;
display:flex;
align-items:center;
justify-content:center;
}

.qty-number{
font-size:20px;
font-weight:500;
color:#000;
min-width:20px;
text-align:center;
}

/* ===== BOTON ADD TO CART ===== */

.mpb-add-to-cart{
width:400px;
height:52px;
background:#000;
color:#fff;
border:none;
border-radius:62px;
font-family:Poppins,sans-serif;
font-weight:600;
cursor:pointer;
display:flex;
align-items:center;
justify-content:center;
transition:.2s;
}

.mpb-add-to-cart:hover{
background:#222;
}

/* ===== DETALLES DEL PRODUCTO ===== */

.product-details-section{
max-width:1200px;
width:100%;
margin:20px auto;
font-family:Poppins,sans-serif;
}

.details-title{
font-weight:700;
font-size:52px;
line-height:60px;
margin-bottom:20px;
color:#000;
}
.details-description{
font-weight:400;
font-size:20px;
line-height:28px;
column-count:2;
column-gap:80px;
margin-bottom:15px;
color:#000;
}

.details-grid{
display:block;
}

.detail-item{
display:flex;
gap:10px;
margin-bottom:10px;
}

.detail-label,
.detail-value{
font-weight:700;
font-size:24px;
line-height:28px;
}

/* ===== QUIZAS TE INTERESE ===== */

.related-products-section{
max-width:1200px;
margin:20px auto;
}

.related-title{
font-family:Poppins,sans-serif;
font-weight:700;
font-size:52px;
line-height:60px;
text-align:center;
margin-top:-80px;
margin-bottom:60px;
color:#000;
}

/* GRID PRODUCTOS */

.related-products-grid{
display:grid;
grid-template-columns:repeat(4,1fr);
gap:24px;
width:100%;
margin-top:90px;
}

/* TARJETA */

.related-product-card{
display:flex;
flex-direction:column;
gap:10px;
font-family:Poppins,sans-serif;
background:transparent;
}

/* IMAGEN */

.related-product-image{
display:block;
}

.related-product-image img{
width:100%;
border-radius:10px;
}

/* TITULO */

.related-product-title{
font-weight:600;
font-size:18px;
color: #000;
}

/* DESCRIPCION */

.related-product-desc{
font-size:14px;
line-height:18px;
color:#555;
}

/* PRECIO + CARRITO */

.related-price-cart{
display:flex;
align-items:center;
justify-content:space-between;
margin-top:6px;
}

/* PRECIO */

.related-product-price{
font-weight:600;
font-size:18px;
color:#000;
}

/* BOTON CARRITO */

.related-add-cart{
width:75px;
height:35px;
border:1px solid #0000001A;
background:transparent;
border-radius:20px;
display:flex;
align-items:center;
justify-content:center;
cursor:pointer;
transition:0.2s;
}

.related-add-cart svg{
width:24px;
height:24px;
stroke:#000;
}

.related-add-cart:hover{
background:#000;
}

.related-add-cart:hover svg{
stroke:#fff;
}

/* ===== RESPONSIVE ===== */

@media(max-width:900px){

.product-layout{
grid-template-columns:1fr;
}

.product-gallery{
flex-direction:column;
}

.product-thumbs{
flex-direction:row;
width:100%;
}

.mpb-cart{
flex-direction:column;
align-items:flex-start;
}

.mpb-add-to-cart{
width:100%;
}

.details-description{
column-count:1;
}

.related-products-grid{
grid-template-columns:1fr 1fr;
}

}

.product-details-section{
grid-column:1 / -1;
}

.related-products-section{
grid-column:1 / -1;
}


/* ===================================================
   GALERÍA VERTICAL MÓVIL - MASTER DETAIL LAYOUT
   Solo aplica en dispositivos móviles (max-width: 768px)
   NO modifica nada del comportamiento desktop
   =================================================== */

@media(max-width:768px){

    /* Forzar galería en fila horizontal: thumbs izquierda | imagen principal derecha */
    .product-gallery{
        display:flex !important;
        flex-direction:row !important;
        gap:10px !important;
        align-items:flex-start !important;
        width:100% !important;
    }

    /* Columna de miniaturas: 22% del ancho */
    .product-thumbs{
        display:flex !important;
        flex-direction:column !important;
        gap:8px !important;
        width:22% !important;
        min-width:60px !important;
        max-width:80px !important;
        flex-shrink:0 !important;
        overflow-y:auto !important;
        max-height:420px !important;
    }

    /* Scroll suave en columna de thumbs */
    .product-thumbs::-webkit-scrollbar{
        width:3px;
    }
    .product-thumbs::-webkit-scrollbar-thumb{
        background:#ccc;
        border-radius:3px;
    }

    /* Miniaturas individuales */
    .product-thumbs img{
        width:100% !important;
        height:auto !important;
        aspect-ratio:1/1 !important;
        object-fit:cover !important;
        border-radius:5px !important;
        border:2px solid #e8e8e8 !important;
        cursor:pointer !important;
        transition:border-color 0.2s ease !important;
        display:block !important;
    }

    /* Miniatura activa / hover */
    .product-thumbs img:hover,
    .product-thumbs img.ptmg-thumb-active{
        border-color:#000 !important;
    }

    /* Imagen principal: ocupa el 78% restante */
    .product-main-image{
        flex:1 !important;
        min-width:0 !important;
        width:78% !important;
    }

    .product-main-image img{
        width:100% !important;
        height:auto !important;
        border-radius:8px !important;
        display:block !important;
        object-fit:cover !important;
    }

    /* ===================================================
       CAMBIO 1: SELECTOR DE CANTIDAD — mismo ancho que
       el botón "Añadir al carrito" en móvil
       =================================================== */

    .mpb-qty-wrapper{
        width:100% !important;
        box-sizing:border-box !important;
    }

    /* ===================================================
       CAMBIO 2: BOTÓN "LEER MÁS / LEER MENOS"
       Estilos exclusivos para móvil
       =================================================== */

    /* Contenedor del botón, centrado */
    .ptmg-readmore-wrap{
        display:flex;
        justify-content:center;
        margin-top:16px;
    }

    /* Botón con los estilos solicitados */
    .ptmg-readmore-btn{
        width:230px;
        height:52px;
        border-radius:62px;
        border:1px solid #0000001A;
        padding:16px 54px;
        gap:12px;
        opacity:1;
        background:transparent;
        color:#000;
        font-family:Poppins,sans-serif;
        font-weight:600;
        font-size:15px;
        cursor:pointer;
        display:flex;
        align-items:center;
        justify-content:center;
        box-sizing:border-box;
        transition:background 0.2s ease, color 0.2s ease;
    }

    .ptmg-readmore-btn:hover{
        background:#000;
        color:#fff;
    }

}


@media(max-width:768px){

    .mpb-cart{
        width:100% !important;
        display:flex !important;
        flex-direction:column !important;
        align-items:stretch !important;
    }

    .mpb-cart > *{
        width:100% !important;
        box-sizing:border-box !important;
    }

    .mpb-qty-wrapper{
        width:100% !important;
        max-width:none !important;
        flex:0 0 100% !important;
    }

    .mpb-add-to-cart{
        width:100% !important;
        max-width:none !important;
    }

    .ptmg-readmore-wrap{
        display:flex !important;
        justify-content:center !important;
        width:100% !important;
    }

    .ptmg-readmore-btn{
        width:230px !important;
        height:52px !important;
        border-radius:62px !important;
        border:1px solid #0000001A !important;
        padding:16px 54px !important;
        background:transparent !important;
        margin:16px auto !important;
    }
}


/* =================================================================
   NOTIFICACIÓN DRAWER — importado de mini-product-builder
   Prefijo ptmg- en selectores propios para evitar conflictos.
   Los selectores .mpb-* se mantienen igual para reutilizar estilos.
================================================================= */

/* OVERLAY */
.ptmg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}
.ptmg-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* PANEL LATERAL DERECHO */
.mpb-cart-drawer.ptmg-cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 360px;
    height: 100%;
    background: #fff;
    z-index: 9999;
    box-shadow: -5px 0 25px rgba(0,0,0,.2);
    display: flex;
    flex-direction: column;
    transition: right .3s ease;
    font-family: 'Poppins', sans-serif;
}
.mpb-cart-drawer.ptmg-cart-drawer.active {
    right: 0;
}

/* HEADER */
.mpb-cart-drawer.ptmg-cart-drawer .mpb-drawer-header {
    padding: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #eee;
}
.mpb-cart-drawer.ptmg-cart-drawer .mpb-header-left {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 4px;
}

/* IMAGEN MINIATURA */
.mpb-cart-drawer.ptmg-cart-drawer .mpb-product-thumb {
    position: relative;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}
.mpb-cart-drawer.ptmg-cart-drawer .mpb-product-thumb img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}
.mpb-cart-drawer.ptmg-cart-drawer .mpb-check {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #00a650;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    padding: 2px 4px;
    line-height: 1;
}

/* TEXTOS HEADER */
.mpb-cart-drawer.ptmg-cart-drawer .mpb-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 3px;
}
.mpb-cart-drawer.ptmg-cart-drawer .mpb-product-name {
    font-size: 13px;
    margin-bottom: 2px;
}
.mpb-cart-drawer.ptmg-cart-drawer .mpb-qty {
    font-size: 12px;
    color: #666;
}

/* BOTÓN CERRAR */
.mpb-cart-drawer.ptmg-cart-drawer .mpb-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #333;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

/* BODY */
.mpb-cart-drawer.ptmg-cart-drawer .mpb-drawer-body {
    padding: 16px;
    flex: 1;
    overflow-y: auto;
}
.mpb-cart-drawer.ptmg-cart-drawer .mpb-related-title {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

/* GRID PRODUCTOS RELACIONADOS */
.mpb-cart-drawer.ptmg-cart-drawer .mpb-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.mpb-cart-drawer.ptmg-cart-drawer .mpb-related-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #111;
    text-decoration: none;
}
.mpb-cart-drawer.ptmg-cart-drawer .mpb-related-item img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 6px;
}
.mpb-cart-drawer.ptmg-cart-drawer .mpb-related-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mpb-cart-drawer.ptmg-cart-drawer .mpb-related-title-item {
    font-size: 11px;
    line-height: 1.2;
    margin: 0;
}
.mpb-cart-drawer.ptmg-cart-drawer .mpb-related-desc {
    font-size: 10px;
    color: #777;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mpb-cart-drawer.ptmg-cart-drawer .mpb-related-price {
    font-size: 12px;
    font-weight: 600;
    margin: 0;
}

/* FOOTER */
.mpb-cart-drawer.ptmg-cart-drawer .mpb-drawer-footer {
    flex-shrink: 0;
    padding: 16px;
    border-top: 1px solid #eee;
    background: #fff;
}
.mpb-cart-drawer.ptmg-cart-drawer .mpb-go-cart {
    display: block;
    text-align: center;
    background: #000;
    color: #fff;
    padding: 12px;
    border-radius: 22px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}
.mpb-cart-drawer.ptmg-cart-drawer .mpb-go-cart:hover {
    background: #222;
}

/* =================================================================
   BOTÓN TIPO TEMU — animación de escala al pulsar
   (ya tiene estilos base de .related-add-cart en el CSS original)
================================================================= */
.ptmg-temu-btn {
    transition: transform 0.15s ease, background 0.2s !important;
}
.ptmg-temu-btn:active {
    transform: scale(0.88) !important;
}

/* Responsive: drawer más estrecho en pantallas pequeñas */
@media (max-width: 400px) {
    .mpb-cart-drawer.ptmg-cart-drawer {
        width: 100%;
        right: -100%;
    }
}
