/* ═══════════════════════════════════════════════════════
   ZOFLY — Detalle de Restaurante
   Página completa con info + calificación
   ═══════════════════════════════════════════════════════ */

/* ─── Back Button ─── */
.detalle-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    margin-top: 100px;
    margin-bottom: var(--space-lg);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
}

.detalle-back:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
    transform: translateX(-4px);
    border-color: rgba(139, 47, 201, 0.3);
}

.back-icon {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.detalle-back:hover .back-icon {
    transform: translateX(-3px);
}

/* ─── Hero Image ─── */
.detalle-hero {
    width: 100%;
    margin-bottom: var(--space-xl);
}

.detalle-hero-image {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    height: 360px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(139, 47, 201, 0.1), rgba(61, 214, 140, 0.1));
}

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

.detalle-hero-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    background: linear-gradient(135deg, rgba(139, 47, 201, 0.08), rgba(61, 214, 140, 0.08));
}

.detalle-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.9), transparent);
    pointer-events: none;
}

.detalle-tier-badge {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    padding: 8px 18px;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    backdrop-filter: blur(12px);
    letter-spacing: 0.5px;
    z-index: 2;
}

/* ─── Info Section ─── */
.detalle-info-section {
    padding-bottom: var(--space-4xl);
}

.detalle-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-3xl);
    align-items: start;
}

/* ─── Left Column: Info ─── */
.detalle-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.detalle-nombre {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 900;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.detalle-direccion {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin: 0;
}

/* Categories */
.detalle-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detalle-cat-tag {
    padding: 6px 16px;
    background: rgba(91, 63, 217, 0.12);
    border: 1px solid rgba(91, 63, 217, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Rating Summary */
.detalle-rating-summary {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg) var(--space-xl);
    background: rgba(255, 193, 7, 0.05);
    border: 1px solid rgba(255, 193, 7, 0.15);
    border-radius: var(--radius-md);
}

.rating-big-number {
    font-size: 3rem;
    font-weight: 900;
    color: #FFC107;
    line-height: 1;
}

.rating-summary-right {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rating-stars-display {
    display: flex;
    gap: 3px;
    font-size: 1.5rem;
}

.rating-stars-display .star-filled { color: #FFC107; }
.rating-stars-display .star-empty { color: rgba(255, 255, 255, 0.12); }

.rating-votes-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Description */
.detalle-desc {
    padding: var(--space-xl);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.detalle-desc h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-md) 0;
}

.detalle-desc p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 0;
}

/* Contact Buttons */
.detalle-contact {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.detalle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-body);
    border-radius: var(--radius-full);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid var(--glass-border);
}

.detalle-btn:hover {
    transform: translateY(-2px);
}

.detalle-btn-wa {
    background: rgba(37, 211, 102, 0.12);
    border-color: rgba(37, 211, 102, 0.3);
    color: #25D366;
}

.detalle-btn-wa:hover {
    background: rgba(37, 211, 102, 0.22);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.2);
    color: #25D366;
}

.detalle-btn-ig {
    background: rgba(225, 48, 108, 0.1);
    border-color: rgba(225, 48, 108, 0.25);
    color: #E1306C;
}

.detalle-btn-ig:hover {
    background: rgba(225, 48, 108, 0.2);
    box-shadow: 0 4px 20px rgba(225, 48, 108, 0.2);
    color: #E1306C;
}

/* ═══════ RIGHT COLUMN: RATING CARD ═══════ */
.detalle-rating-card {
    position: sticky;
    top: 100px;
    padding: var(--space-xl) !important;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    border: 1px solid rgba(139, 47, 201, 0.2) !important;
    background: rgba(18, 18, 28, 0.8) !important;
    backdrop-filter: blur(20px);
}

.rating-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    text-align: center;
}

/* User info */
.rating-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: var(--space-sm) var(--space-md);
    background: rgba(139, 47, 201, 0.08);
    border: 1px solid rgba(139, 47, 201, 0.15);
    border-radius: var(--radius-full);
}

.rating-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(139, 47, 201, 0.4);
}

.rating-user-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Star Selector */
.rating-star-selector {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: var(--space-md) 0;
}

.rate-star-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 2.8rem;
    color: rgba(255, 255, 255, 0.12);
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.rate-star-btn:hover {
    transform: scale(1.2);
}

.rate-star-btn.selected {
    color: #FFC107;
    text-shadow: 0 0 15px rgba(255, 193, 7, 0.5);
}

.rate-star-btn.hovered {
    color: #FFD54F;
    transform: scale(1.15);
    text-shadow: 0 0 18px rgba(255, 193, 7, 0.6);
}

.rating-star-hint {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* Comment Section */
.rating-comment-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rating-comment-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.optional-text {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.82rem;
}

.rating-comment-section textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-body);
    resize: none;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.rating-comment-section textarea:focus {
    border-color: rgba(139, 47, 201, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 47, 201, 0.1);
}

.comment-char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Submit Button */
.rating-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #8B2FC9, #6C00FF);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-size: 1rem;
    font-weight: 800;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 20px rgba(139, 47, 201, 0.3);
    position: relative;
    overflow: hidden;
}

.rating-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(139, 47, 201, 0.5);
}

.rating-submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.rating-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

/* Shimmer animation on button */
.rating-submit-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.rating-submit-btn:hover:not(:disabled)::after {
    left: 100%;
}

.rating-already-text {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

/* Login Prompt */
.rating-login-prompt {
    text-align: center;
    padding: var(--space-lg) 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.login-prompt-icon {
    font-size: 3rem;
}

.rating-login-prompt h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.rating-login-prompt p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

.rating-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: white;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.rating-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ═══════ REVIEWS SECTION ═══════ */
.detalle-reviews {
    margin-top: var(--space-4xl);
    padding-top: var(--space-3xl);
    border-top: 1px solid var(--glass-border);
}

.reviews-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 var(--space-xl) 0;
}

.reviews-count {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1rem;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* Review Card */
.review-card {
    padding: var(--space-lg) !important;
    transition: all var(--transition-normal);
}

.review-card:hover {
    border-color: rgba(139, 47, 201, 0.2) !important;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.review-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(139, 47, 201, 0.3);
}

.review-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(139, 47, 201, 0.1);
    border: 2px solid rgba(139, 47, 201, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.review-user-info {
    display: flex;
    flex-direction: column;
}

.review-user-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.review-date {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.review-stars {
    display: flex;
    gap: 2px;
    font-size: 1.1rem;
}

.review-stars .star-filled { color: #FFC107; }
.review-stars .star-empty { color: rgba(255, 255, 255, 0.12); }

.review-text {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
    margin: 0;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--glass-border);
}

/* ═══════ SUCCESS ANIMATION ═══════ */
@keyframes ratingSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.rating-success-anim {
    animation: ratingSuccess 0.5s ease;
}

/* ═══════ TOAST ═══════ */
.detalle-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(139, 47, 201, 0.95);
    color: white;
    padding: 14px 28px;
    border-radius: 9999px;
    font-size: 0.92rem;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 25px rgba(139, 47, 201, 0.4);
}

.detalle-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 900px) {
    .detalle-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .detalle-rating-card {
        position: static;
    }

    .detalle-hero-image {
        height: 280px;
        border-radius: 0;
    }
}

@media (max-width: 768px) {
    .detalle-back {
        margin-top: 85px;
    }

    .detalle-hero-image {
        height: 220px;
    }

    .rating-big-number {
        font-size: 2.4rem;
    }

    .rate-star-btn {
        font-size: 2.2rem;
    }

    .navbar-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 80px var(--space-xl) var(--space-xl);
        gap: var(--space-md);
        transition: right var(--transition-normal);
        border-left: 1px solid var(--glass-border);
        z-index: 1000;
    }

    .navbar-links.active {
        right: 0;
    }

    .menu-toggle {
        display: flex;
    }
}

@media (max-width: 480px) {
    .detalle-nombre {
        font-size: 1.6rem;
    }

    .detalle-rating-summary {
        flex-direction: column;
        text-align: center;
    }

    .rating-summary-right {
        align-items: center;
    }
}
