/* ==========================================================================
   Ficha de producto — Dr. Ulises Gómez
   --------------------------------------------------------------------------
   La estructura la pinta Pages/Producto.cshtml y las interacciones
   (miniaturas, variantes, cantidad y relacionados) las resuelve
   wwwroot/zcore/js/Producto.js.

   Se apoya en las variables de color de profesional.css, que se carga antes.
   ========================================================================== */

/* ==========================================================================
   01. Migas de pan
   ========================================================================== */

#breadcrumb-area.producto-migas {
    padding: 34px 0 30px;
}

#breadcrumb-area.producto-migas .producto-migas-lista {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

#breadcrumb-area.producto-migas .producto-migas-lista li {
    display: inline-block;
    max-width: 100%;
    margin-right: 10px;
    font-size: .9rem;
    vertical-align: middle;
}

#breadcrumb-area.producto-migas .producto-migas-lista li:after {
    margin-left: 10px;
    opacity: .55;
}

#breadcrumb-area.producto-migas .producto-miga-actual {
    max-width: min(560px, 58vw);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    opacity: .82;
}

/* ==========================================================================
   02. Bloque principal: galeria + informacion
   ========================================================================== */

.producto-detalle {
    padding-top: 2.75rem;
    padding-bottom: 3.25rem;
}

/* --- Galeria -------------------------------------------------------------- */

.producto-foto-principal {
    overflow: hidden;
    border: 1px solid var(--line, #e6ecf5);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(5, 19, 80, .06);
}

.producto-foto-principal img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: clamp(10px, 2.4vw, 26px);
    object-fit: contain;
    background: #fbfcfe;
}

.producto-miniaturas {
    display: flex;
    gap: .65rem;
    margin-top: .9rem;
    padding-bottom: .15rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.producto-miniatura {
    flex: 0 0 auto;
    width: 76px;
    height: 76px;
    padding: 4px;
    border: 1px solid var(--line, #e6ecf5);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.producto-miniatura img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.producto-miniatura:hover {
    border-color: #b9c7de;
    transform: translateY(-1px);
}

.producto-miniatura.activa {
    border-color: var(--brand, #051350);
    box-shadow: 0 0 0 2px rgba(5, 19, 80, .12);
}

/* --- Informacion --------------------------------------------------------- */

.producto-panel {
    padding-left: 2.25rem;
}

.producto-categoria {
    margin-bottom: .55rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    line-height: 1.4;
    text-transform: uppercase;
}

.producto-categoria a {
    color: var(--accent, #00b4d7);
}

.producto-nombre {
    margin-bottom: .8rem;
    color: var(--ink, #0d1738);
    font-size: clamp(1.5rem, 1.15rem + 1.35vw, 2.1rem);
    font-weight: 600;
    letter-spacing: -.015em;
    line-height: 1.25;
}

/* El nombre del producto es el contenido principal de la pagina: no debe
   depender de la animacion de entrada de site-pro.js para verse. */
.js .producto-detalle h1,
.js .producto-detalle h1.visible {
    opacity: 1;
    transform: none;
    transition: none;
}

.producto-intro {
    margin-bottom: 1.1rem;
    color: var(--body, #52607a);
    font-size: 1.02rem;
    line-height: 1.7;
}

.producto-precio {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: 1.35rem;
    color: var(--brand, #051350);
    font-size: clamp(1.6rem, 1.3rem + .9vw, 2.1rem);
    font-weight: 700;
    line-height: 1.1;
}

.producto-precio small {
    color: #8c96a8;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .1em;
}

/* --- Variantes ----------------------------------------------------------- */

.producto-variante {
    margin-bottom: 1.15rem;
}

.producto-variante label,
.producto-cantidad label {
    display: block;
    margin-bottom: .4rem;
    color: #8c96a8;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

#IdProductoTallasColores {
    width: 100%;
    max-width: 340px;
    height: 48px;
    padding: 0 2.4rem 0 .95rem;
    border: 1px solid var(--line, #e6ecf5);
    border-radius: 12px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2352607a' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    color: var(--ink, #0d1738);
    font-size: .95rem;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}

#IdProductoTallasColores:focus {
    border-color: var(--accent, #00b4d7);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 180, 215, .15);
}

/* --- Cantidad y compra --------------------------------------------------- */

.producto-compra {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line, #e6ecf5);
}

.producto-cantidad {
    flex: 0 0 auto;
}

.cantidad-stepper {
    display: inline-flex;
    align-items: center;
    height: 50px;
    overflow: hidden;
    border: 1px solid var(--line, #e6ecf5);
    border-radius: 12px;
    background: #fff;
}

.cantidad-btn {
    width: 42px;
    height: 100%;
    border: 0;
    background: #f6f9fd;
    color: var(--brand, #051350);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s;
}

.cantidad-btn:hover,
.cantidad-btn:focus-visible {
    background: #eaf1fb;
}

#IdCantidad {
    width: 58px;
    height: 100%;
    border: 0;
    background: #fff;
    color: var(--ink, #0d1738);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    appearance: textfield;
    -moz-appearance: textfield;
}

#IdCantidad::-webkit-outer-spin-button,
#IdCantidad::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

#IdCantidad:focus {
    outline: none;
}

.producto-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: 50px;
    padding: 0 2.1rem;
    border: 0;
    border-radius: 26px;
    background: var(--brand, #051350);
    color: #fff;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .25s, box-shadow .25s, transform .25s;
}

.producto-btn i {
    font-size: 1rem;
}

.producto-btn:hover,
.producto-btn:focus {
    background: var(--accent, #00b4d7);
    color: #fff;
    box-shadow: 0 14px 30px rgba(0, 180, 215, .28);
    text-decoration: none;
    transform: translateY(-1px);
}

.producto-btn:focus-visible {
    outline: 2px solid var(--brand, #051350);
    outline-offset: 3px;
}

.producto-btn[disabled] {
    background: #7d8aa5;
    box-shadow: none;
    cursor: not-allowed;
    opacity: .6;
    transform: none;
}

.producto-btn-whatsapp {
    background: #1faa59;
}

.producto-btn-whatsapp:hover,
.producto-btn-whatsapp:focus {
    background: #17924b;
    box-shadow: 0 14px 30px rgba(31, 170, 89, .28);
}

/* --- Nota y datos de servicio ------------------------------------------- */

.producto-nota {
    display: flex;
    gap: .55rem;
    margin-bottom: 1.35rem;
    padding: .85rem 1rem;
    border-radius: 12px;
    background: var(--soft, #f6f9fd);
    color: var(--body, #52607a);
    font-size: .88rem;
    line-height: 1.55;
}

.producto-nota i {
    margin-top: .2rem;
    color: var(--accent, #00b4d7);
}

.producto-datos {
    margin: 0;
    padding: 0;
    list-style: none;
}

.producto-datos li {
    display: flex;
    gap: .85rem;
    padding: .75rem 0;
    border-top: 1px solid var(--line, #e6ecf5);
}

.producto-datos li:first-child {
    padding-top: 0;
    border-top: 0;
}

.producto-datos i {
    flex: 0 0 22px;
    margin-top: .25rem;
    color: var(--accent, #00b4d7);
    font-size: 1rem;
    text-align: center;
}

.producto-datos strong {
    display: block;
    color: var(--ink, #0d1738);
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.4;
}

.producto-datos span {
    display: block;
    color: var(--body, #52607a);
    font-size: .85rem;
    line-height: 1.55;
}

/* ==========================================================================
   03. Descripcion
   ========================================================================== */

.producto-descripcion-bloque {
    padding-top: 3rem;
    padding-bottom: 3.25rem;
    background: var(--soft, #f6f9fd);
}

.producto-subtitulo {
    position: relative;
    margin-bottom: 1.5rem;
    padding-bottom: .8rem;
    color: var(--ink, #0d1738);
    font-size: clamp(1.25rem, 1.05rem + .7vw, 1.6rem);
    font-weight: 600;
}

.producto-subtitulo::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 52px;
    height: 3px;
    border-radius: 3px;
    background: var(--accent, #00b4d7);
}

.producto-descripcion {
    color: var(--body, #52607a);
    font-size: 1rem;
    line-height: 1.8;
}

.producto-descripcion strong {
    color: var(--ink, #0d1738);
    font-weight: 600;
}

.producto-descripcion em {
    color: #6b778c;
}

.producto-ayuda {
    margin-top: 2rem;
    padding: 1.6rem 1.5rem;
    border: 1px solid var(--line, #e6ecf5);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(5, 19, 80, .06);
}

.producto-ayuda h3 {
    margin-bottom: .55rem;
    color: var(--ink, #0d1738);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.35;
}

.producto-ayuda p {
    margin-bottom: 1.1rem;
    color: var(--body, #52607a);
    font-size: .92rem;
    line-height: 1.65;
}

.producto-ayuda-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    width: 100%;
    min-height: 46px;
    padding: 0 1.25rem;
    border-radius: 23px;
    background: #1faa59;
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.2;
    transition: background-color .25s, box-shadow .25s;
}

.producto-ayuda-btn:hover,
.producto-ayuda-btn:focus {
    background: #17924b;
    color: #fff;
    box-shadow: 0 12px 26px rgba(31, 170, 89, .26);
    text-decoration: none;
}

.producto-ayuda-aviso {
    margin: 1rem 0 0;
    color: #8c96a8;
    font-size: .78rem;
    line-height: 1.55;
}

.producto-ayuda p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   04. Productos relacionados
   ========================================================================== */

.producto-relacionados {
    padding-top: 3rem;
    padding-bottom: 3.5rem;
}

.producto-relacionados .section-title {
    margin-bottom: 2.25rem;
}

.producto-relacionados .section-title h2 {
    margin-bottom: .75rem;
}

.producto-relacionados .product-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 10px;
}

.producto-relacionados .product-thumb img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    object-fit: contain;
    background: #fbfcfe;
}

.producto-relacionados .product-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding-top: .55rem;
}

.producto-relacionados .price-box {
    margin-top: auto;
}

/* ==========================================================================
   05. Ajustes por tamano de pantalla
   ========================================================================== */

@media (max-width: 991.98px) {
    .producto-panel {
        margin-top: .5rem;
        padding-left: 0;
    }

    .producto-ayuda {
        margin-top: .5rem;
    }
}

@media (min-width: 992px) {
    .producto-ayuda {
        position: sticky;
        top: 100px;
        margin-top: .25rem;
    }
}

@media (max-width: 575.98px) {
    .producto-detalle {
        padding-top: 1.75rem;
    }

    .producto-foto-principal {
        border-radius: 14px;
    }

    .producto-miniatura {
        width: 64px;
        height: 64px;
    }

    .producto-nombre {
        font-size: 1.35rem;
    }

    .producto-compra {
        gap: .85rem;
    }

    .producto-cantidad {
        width: 100%;
    }

    .cantidad-stepper {
        width: 100%;
        justify-content: space-between;
    }

    #IdCantidad {
        flex: 1;
    }

    .producto-btn {
        width: 100%;
    }

    .producto-ayuda {
        padding: 1.3rem 1.15rem;
    }
}
