* {
    box-sizing: border-box;
}

#producto-detalle {
    background:#0f0f0f;
    min-height: 100vh;
    padding: 42px 0px 80px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.producto-detalle-wrap,
.resenas-wrap {
    position: relative;
    z-index: 2;
    width: 1300px;
    max-width: 90%;
    margin: 0 auto;
}

.producto-detalle-wrap {
    display: flex;
    flex-direction: column;
    gap: 34px;
    align-items: center;
    padding: 26px 50px;
    border-radius: 30px;
    background:rgba(8, 8, 8, 0.98);
    border: 1px solid rgba(245, 196, 0, 0.16);
    backdrop-filter: blur(10px);
}

.producto-img {
    height: 330px;
    position: relative;
    overflow: hidden;
    background:#121212;
    max-width: 90%;
    border-radius: 10px;
}

.producto-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease, opacity 0.35s ease;
}

.producto-img:hover img {
    opacity: 0.96;
}

.producto-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 8px 4px;
}

.producto-info h1 {
    font-size: 25px;
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -1.6px;
    color: #fff;
    margin: 0;
}

.categoria,
.stock,
.sin-stock,
.error-resena,
.sin-resenas {
    margin: 0;
}

.categoria {
    color: #d4d4d4;
    font-size: 1rem;
    line-height: 1.6;
}

.categoria strong,
.stock strong {
    color: #ffc107;
    font-weight: 800;
}

.precio {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
}

.precio-original {
    color: #7f7f7f;
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: line-through;
    line-height: 1;
}

.precio-oferta {
    color: #ffc107;
    font-size: clamp(2.5rem, 4vw, 3.8rem) !important;
    font-weight: 900;
    line-height: 0.95;
}

.precio:not(:has(.precio-oferta)) {
    color: #fff;
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    font-weight: 900;
    line-height: 1;
}

.badge-oferta {
    padding: 8px 12px;
    font-size: 1.5rem;
    font-weight: 900;
}

.oferta-fechas {
    position: static;
    display: block;
    padding: 8px;
    font-size: 1.3rem;
    border: none;
    text-align: center;
}

.oferta-fechas::before {
    font-size: 1.5rem;
}

.descripcion {
    font-size: 1rem;
    margin: 0;
}

.descripcion::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 4px;
    height: calc(100% - 12px);
    border-radius: 999px;
    background: linear-gradient(180deg, #ffc107 0%, #ffda47 100%);
}

.stock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(245, 196, 0, 0.12);
    color: #e5e5e5;
    font-size: 0.96rem;
    font-weight: 700;
}

.form-add-cart {
    margin-top: 8px;
    padding: 22px;
    border-radius: 22px;
    background: rgba(18, 18, 18, 0.96);
    border: 1px solid rgba(245, 196, 0, 0.14);
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.form-add-cart label {
    width: 100%;
    color: #ffc107;
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: -2px;
}

.btn-principal {
    min-width: 220px;
    height: 54px;
    border: none;
    border-radius: 16px;
    padding: 0 22px;
    background: #ffc107;
    color: #111;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.btn-principal:hover {
    transform: translateY(-2px);
    filter: brightness(1.03);
}

.sin-stock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 80, 80, 0.1);
    border: 1px solid rgba(255, 80, 80, 0.2);
    color: #ff9696;
    font-weight: 800;
}

.error-resena {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 84, 84, 0.12);
    border: 1px solid rgba(255, 84, 84, 0.24);
    color: #ff9191;
    font-size: 0.95rem;
    font-weight: 700;
}

.resenas-wrap {
    margin-top: 50px;
    padding: 30px;
    border-radius: 30px;
    background:rgba(8, 8, 8, 0.98);
    border: 1px solid rgba(245, 196, 0, 0.16);
    backdrop-filter: blur(10px);
}

.resenas-wrap>h2 {
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -1px;
    margin: 0 0 24px;
    color: #fff;
}



.resenas-wrap form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.resenas-wrap select,
.resenas-wrap textarea {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(245, 196, 0, 0.16);
    background: #070707;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.resenas-wrap select {
    height: 54px;
    padding: 0 16px;
    font-weight: 700;
}

.resenas-wrap textarea {
    min-height: 160px;
    resize: vertical;
    padding: 16px;
    line-height: 1.7;
}

.resenas-wrap select:hover,
.resenas-wrap textarea:hover {
    border-color: rgba(245, 196, 0, 0.35);
}

.resenas-wrap select:focus,
.resenas-wrap textarea:focus {
    border-color: #ffc107;
    transform: translateY(-1px);
}

.lista-resenas {
    display: grid;
    gap: 18px;
}

.resena {
    padding: 22px;
    border-radius: 22px;
    background: rgba(18, 18, 18, 0.96);
    border: 1px solid rgba(245, 196, 0, 0.12);
}

.resena-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.resena-top strong {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
}

.resena-estrellas {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 1.05rem;
}

.estrella.llena {
    color: #ffc107;
}

.estrella.vacia {
    color: #6e6e6e;
}

.resena em {
    display: block;
    margin-bottom: 12px;
    color: #a2a2a2;
    font-size: 0.9rem;
    font-style: normal;
}

.resena p {
    margin: 0;
    color: #dddddd;
    line-height: 1.8;
    font-size: 0.98rem;
}

.sin-resenas {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(245, 196, 0, 0.12);
    color: #d8d8d8;
    font-weight: 700;
}

@media (max-width: 1080px) {
    .producto-detalle-wrap {
        grid-template-columns: 1fr;
    }

    .producto-img {
        position: relative;
        width: 100%;
        margin: 0 auto;
    }
    
}

@media (max-width: 768px) {
    h2{
        font-size: 20px;
    }
    #producto-detalle {
        padding: 26px 0px 56px;
    }

    .producto-detalle-wrap,
    .resenas-wrap {
        padding: 20px;
        border-radius: 24px;
    }


    .precio-oferta,
    .precio:not(:has(.precio-oferta)) {
        font-size: 2.5rem;
    }

    .form-add-cart {
        padding: 18px;
    }

    .btn-principal {
        width: 100%;
    }
}

@media (max-width: 540px) {

    .producto-detalle-wrap,
    .resenas-wrap,
    .form-add-cart,
    .resena {
        padding: 7px;
    }

    .producto-info h1 {
        font-size: 18px;
        letter-spacing: -1px;
    }
    h2{
        font-size: 18px !important;
    }
    

    .marca {
        font-size: 0.8rem;
    }

    .precio {
        gap: 10px;
    }

    .precio-original {
        font-size: 1rem;
    }

    .precio-oferta,
    .precio:not(:has(.precio-oferta)) {
        font-size: 2.15rem;
    }

    .badge-oferta {
        font-size: 0.82rem;
        padding: 7px 10px;
    }

    .descripcion {
        font-size: 0.96rem;
    }

    .resena-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ── Galería de miniaturas ── */
.producto-img {
    overflow: hidden;
}

.producto-img-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.galeria-miniaturas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.miniatura {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid rgba(245, 196, 0, 0.15);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.miniatura:hover {
    border-color: rgba(245, 196, 0, 0.6);
    transform: translateY(-2px);
}

.miniatura.activa {
    border-color: #ffc107;
    box-shadow: 0 0 0 2px #ffc107;
}