/* ══════════════════════════════════════════════
   PRE LECTURA — variables del proyecto
══════════════════════════════════════════════ */
:root {
    --pl-orange:      #FD7E14;
    --pl-orange-dark: #e06a00;
    --pl-dark:        #343A40;
    --pl-gray:        #6c757d;
    --pl-light:       #f8f9fa;
    --pl-border:      #dee2e6;
    --pl-white:       #ffffff;
    --pl-radius:      14px;
    --pl-shadow:      0 2px 12px rgba(0,0,0,0.07);
}

/* ── Página ── */
.pl-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ══════════════════════════════════════════════
   HERO CARD
══════════════════════════════════════════════ */
.pl-hero-card {
    display: flex;
    gap: 28px;
    background: var(--pl-white);
    border-radius: var(--pl-radius);
    padding: 28px;
    box-shadow: var(--pl-shadow);
    border: 1px solid var(--pl-border);
}

/* Imagen */
.pl-hero-img-wrap {
    flex-shrink: 0;
    width: 220px;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--pl-border);
}

.pl-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pl-hero-img-placeholder {
    width: 100%;
    height: 100%;
    background: var(--pl-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--pl-border);
}

/* Info */
.pl-hero-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pl-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--pl-dark);
    line-height: 1.3;
}

/* Rating resumen */
.pl-rating-summary {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pl-stars-display {
    display: flex;
    gap: 2px;
}

.pl-star-filled { color: #f59e0b; font-size: 14px; }
.pl-star-empty  { color: #d1d5db; font-size: 14px; }

.pl-avg-value {
    font-weight: 700;
    font-size: 15px;
    color: #f59e0b;
}

.pl-review-count {
    font-size: 13px;
    color: var(--pl-gray);
}

/* Meta row */
.pl-meta-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.pl-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pl-meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pl-gray);
    font-weight: 600;
}

.pl-meta-val {
    font-size: 14px;
    font-weight: 600;
    color: var(--pl-dark);
}

/* Tags */
.pl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pl-tag {
    background: var(--pl-light);
    border: 1px solid var(--pl-border);
    color: var(--pl-dark);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* Autor */
.pl-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.pl-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--pl-orange);
    flex-shrink: 0;
}

.pl-author-avatar-default {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--pl-orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.pl-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pl-author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--pl-dark);
}

.pl-author-role {
    font-size: 12px;
    color: var(--pl-gray);
}

/* ── Botones de acción ── */
.pl-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.pl-btn-read {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    background: var(--pl-orange);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.pl-btn-read:hover {
    background: var(--pl-orange-dark);
    color: #fff;
}

/* Añadir dropdown */
.pl-add-wrap {
    position: relative;
}

.pl-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    background: var(--pl-white);
    color: var(--pl-dark);
    border: 1.5px solid var(--pl-orange);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.pl-btn-add:hover {
    background: var(--pl-light);
}

.pl-btn-add.active {
    background: var(--pl-orange);
    color: #fff;
    border-color: var(--pl-orange);
}

.pl-chevron {
    font-size: 11px;
    transition: transform 0.2s;
}

.pl-chevron.open {
    transform: rotate(180deg);
}

.pl-add-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: var(--pl-white);
    border: 1.5px solid var(--pl-border);
    border-radius: 10px;
    padding: 6px;
    min-width: 180px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 100;
    display: none;
    flex-direction: column;
    gap: 2px;
}

.pl-add-dropdown.open {
    display: flex;
}

.pl-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: none;
    border: none;
    border-radius: 7px;
    font-size: 14px;
    color: var(--pl-dark);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 0.15s;
    width: 100%;
}

.pl-dropdown-item:hover {
    background: var(--pl-orange);
    color: #fff;
}

.pl-dropdown-item.active-item {
    background: var(--pl-light);
    color: var(--pl-orange);
    font-weight: 600;
}

/* ══════════════════════════════════════════════
   TABS
══════════════════════════════════════════════ */
.pl-tabs-wrap {
    background: var(--pl-white);
    border-radius: var(--pl-radius);
    box-shadow: var(--pl-shadow);
    border: 1px solid var(--pl-border);
    overflow: hidden;
}

.pl-tabs {
    display: flex;
    border-bottom: 2px solid var(--pl-border);
}

.pl-tab {
    flex: 1;
    padding: 14px 20px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--pl-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: color 0.2s, border-bottom 0.2s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.pl-tab:hover { color: var(--pl-dark); }

.pl-tab.active {
    color: var(--pl-orange);
    border-bottom-color: var(--pl-orange);
}

.pl-tab-panel {
    display: none;
    padding: 24px;
}

.pl-tab-panel.active {
    display: block;
}

/* ── Descripción ── */
.pl-desc-text {
    font-size: 15px;
    color: var(--pl-dark);
    line-height: 1.75;
    margin: 0 0 20px;
}

.pl-utensilios {
    background: var(--pl-light);
    border-radius: 10px;
    padding: 16px 20px;
    border-left: 3px solid var(--pl-orange);
}

.pl-utensilios-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--pl-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pl-utensilios-title i { color: var(--pl-orange); }

.pl-utensilios-text {
    margin: 0;
    font-size: 14px;
    color: var(--pl-gray);
    line-height: 1.6;
}

/* ══════════════════════════════════════════════
   RESEÑAS
══════════════════════════════════════════════ */

/* Distribución de estrellas */
.pl-rating-breakdown {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--pl-border);
}

.pl-breakdown-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.pl-big-score {
    font-size: 48px;
    font-weight: 800;
    color: var(--pl-dark);
    line-height: 1;
}

.pl-big-stars {
    display: flex;
    gap: 3px;
}

.pl-total-votes {
    font-size: 12px;
    color: var(--pl-gray);
}

.pl-breakdown-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pl-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.pl-bar-label {
    width: 14px;
    text-align: right;
    color: var(--pl-gray);
    font-weight: 600;
    flex-shrink: 0;
}

.pl-bar-track {
    flex: 1;
    height: 8px;
    background: var(--pl-light);
    border-radius: 4px;
    overflow: hidden;
}

.pl-bar-fill {
    height: 100%;
    background: var(--pl-orange);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.pl-bar-count {
    width: 20px;
    text-align: right;
    color: var(--pl-gray);
    font-size: 12px;
    flex-shrink: 0;
}

/* Formulario reseña */
.pl-review-form {
    background: var(--pl-light);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--pl-border);
}

.pl-review-form-title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--pl-dark);
}

/* Star picker */
.pl-star-picker {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.pl-star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 28px;
    color: #d1d5db;
    transition: color 0.15s, transform 0.1s;
    line-height: 1;
}

.pl-star-btn:hover,
.pl-star-btn.hover { color: #f59e0b; }

.pl-star-btn.selected { color: #f59e0b; }

.pl-star-btn:active { transform: scale(0.9); }

.pl-review-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--pl-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--pl-dark);
    background: var(--pl-white);
    resize: vertical;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
    margin-bottom: 12px;
}

.pl-review-textarea:focus {
    border-color: var(--pl-orange);
    box-shadow: 0 0 0 3px rgba(253,126,20,0.12);
}

.pl-btn-submit-review {
    padding: 10px 24px;
    background: var(--pl-orange);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.pl-btn-submit-review:hover:not(:disabled) {
    background: var(--pl-orange-dark);
}

.pl-btn-submit-review:disabled {
    background: #adb5bd;
    cursor: not-allowed;
}

.pl-login-prompt {
    font-size: 14px;
    color: var(--pl-gray);
    margin-bottom: 20px;
}

.pl-login-prompt a {
    color: var(--pl-orange);
    font-weight: 600;
    text-decoration: none;
}

/* Lista reseñas */
.pl-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pl-no-reviews {
    text-align: center;
    color: var(--pl-gray);
    font-size: 14px;
    padding: 20px 0;
}

.pl-review-item {
    padding: 16px;
    background: var(--pl-light);
    border-radius: 10px;
    border: 1px solid var(--pl-border);
}

.pl-review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.pl-review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--pl-orange);
    flex-shrink: 0;
}

.pl-review-avatar-default {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--pl-orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.pl-review-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pl-review-user {
    font-size: 14px;
    font-weight: 600;
    color: var(--pl-dark);
}

.pl-review-stars {
    display: flex;
    gap: 2px;
    font-size: 12px;
}

.pl-review-text {
    margin: 0;
    font-size: 14px;
    color: var(--pl-gray);
    line-height: 1.6;
}

.pl-author-link {
    text-decoration: none;
    flex-shrink: 0;
}

.pl-author-link:hover .pl-author-avatar,
.pl-author-link:hover .pl-author-avatar-default {
    opacity: 0.85;
}

.pl-author-name-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--pl-dark);
    text-decoration: none;
    transition: color 0.15s;
}

.pl-author-name-link:hover {
    color: var(--pl-orange);
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 992px) {
    .pl-hero-img-wrap {
        width: 180px;
        height: 170px;
    }

    .pl-title {
        font-size: 20px;
    }

    .pl-big-score {
        font-size: 40px;
    }
}

/* Celular */
@media (max-width: 768px) {
    .pl-page {
        padding: 14px 10px 36px;
        gap: 16px;
    }

    /* Hero card apilada */
    .pl-hero-card {
        flex-direction: column;
        padding: 18px 16px;
        gap: 16px;
    }

    .pl-hero-img-wrap {
        width: 100%;
        height: 200px;
        border-radius: 8px;
    }

    .pl-title {
        font-size: 18px;
    }

    .pl-meta-row {
        gap: 14px;
    }

    .pl-actions {
        flex-direction: row;
        gap: 8px;
    }

    .pl-btn-read,
    .pl-btn-add {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
        font-size: 13px;
    }

    /* Tabs */
    .pl-tab {
        padding: 12px 10px;
        font-size: 13px;
        gap: 5px;
    }

    .pl-tab-panel {
        padding: 16px 14px;
    }

    /* Breakdown rating */
    .pl-rating-breakdown {
        gap: 20px;
    }

    .pl-big-score {
        font-size: 36px;
    }

    /* Star picker más grande para táctil */
    .pl-star-btn {
        font-size: 34px;
    }

    /* Dropdown por encima en móvil */
    .pl-add-dropdown {
        left: auto;
        right: 0;
    }
}

/* Celular muy pequeño */
@media (max-width: 380px) {
    .pl-hero-card {
        padding: 14px 12px;
    }

    .pl-title {
        font-size: 16px;
    }

    .pl-rating-breakdown {
        flex-direction: column;
        gap: 16px;
    }

    .pl-breakdown-left {
        flex-direction: row;
        gap: 12px;
        align-items: center;
    }

    .pl-big-score {
        font-size: 32px;
    }

    .pl-tab {
        font-size: 12px;
        padding: 10px 6px;
    }

    .pl-star-btn {
        font-size: 30px;
    }
}