/* --- DETAIL VIEW --- */
#view-detail { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; animation: slideUp 0.3s ease-out; margin-bottom: 20px; border: 1px solid var(--border); }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.detail-header { padding: 15px; border-bottom: 1px solid #eee; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; background: var(--glass); z-index: 50; backdrop-filter: blur(5px); }
.btn-back { background: none; border: none; font-size: 16px; cursor: pointer; color: var(--primary); font-weight: 700; display:flex; align-items:center; gap:5px;}
.gallery-container { position: relative; width: 100%; height: 350px; background: #000; display: flex; align-items: center; justify-content: center; cursor: zoom-in; }
.gallery-main { max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 10px; padding: 10px; overflow-x: auto; background: var(--bg); }
.gallery-thumb { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; cursor: pointer; border: 2px solid transparent; opacity: 0.7; }
.gallery-thumb.active { border-color: var(--primary); opacity: 1; }
.detail-body { padding: 20px; }
.detail-desc { white-space: pre-wrap; line-height:1.6; color: var(--text-light); font-size: 15px; }

.breadcrumbs { font-size: 11px; color: var(--secondary); margin-bottom: 10px; display: flex; gap: 5px; }
.bc-link { text-decoration: underline; cursor: pointer; }

.btn-whatsapp { background: var(--whatsapp); color: white; border: none; padding: 14px; border-radius: 8px; font-weight: 700; cursor: pointer; text-decoration: none; display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; margin-top: 20px; box-sizing: border-box; }

.bid-card { background: var(--primary-light); border: 2px solid var(--auction); border-radius: 12px; padding: 15px; margin-top: 20px; }
.bid-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.bid-winner { font-size: 13px; font-weight: bold; color: var(--auction); }
.bid-input-group { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 640px) {
    .bid-input-group {
        flex-direction: column;
    }
}
.bid-input { flex: 1; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-weight: bold; background: var(--surface); color: var(--text); }
.btn-bid { background: var(--auction); color: white; border: none; padding: 10px 20px; border-radius: 8px; font-weight: bold; cursor: pointer; }
.btn-bid:disabled { background: #ccc; cursor: not-allowed; }

/* --- PUBLISH --- */
.publish-card { background: var(--surface); padding: 30px; border-radius: var(--radius-lg); box-shadow: var(--shadow); max-width: 500px; margin: 0 auto; border: 1px solid var(--border); }

/* --- PROFILE --- */
.profile-header { text-align: center; padding: 20px; background: var(--surface); border-radius: var(--radius-lg); margin-bottom: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.profile-stats { display: flex; gap: 10px; justify-content: center; margin-top: 15px; }
.stat-box { background: var(--bg); padding: 10px; border-radius: 8px; min-width: 80px; }
.stat-val { font-weight: 900; font-size: 18px; color: var(--primary); }
.stat-label { font-size: 10px; color: var(--secondary); text-transform: uppercase; }
.profile-section-title { font-size: 14px; font-weight: 800; color: var(--secondary); margin: 20px 0 10px; text-transform: uppercase; border-bottom: 2px solid var(--border); padding-bottom: 5px; }

.description-box { background: var(--bg); padding: 20px; border-radius: var(--radius-md); border: 1px solid var(--border); margin: 15px 0 25px 0; position: relative; }
.description-label { font-size: 11px; font-weight: 800; color: var(--secondary); text-transform: uppercase; margin-bottom: 10px; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); padding-bottom: 5px; display: inline-block; }
.description-text { color: var(--text); line-height: 1.6; font-size: 15px; white-space: pre-wrap; }

/* --- REVIEWS --- */
.star-rating { color: var(--gold); font-size: 20px; }
.write-review-box { background: var(--surface); padding: 20px; border-radius: 12px; border: 1px solid var(--border); margin-top: 20px; }
.rating-input { display: flex; gap: 10px; font-size: 24px; cursor: pointer; color: #ddd; margin-bottom: 10px; justify-content: center; }
.rating-input span:hover, .rating-input span.active { color: var(--gold); }
.role-tag { font-size: 10px; padding: 3px 8px; border-radius: 12px; margin-left: 8px; text-transform: uppercase; font-weight: 800; }
.role-buyer { background: #dbeafe; color: #1e40af; }
.role-seller { background: #fef3c7; color: #92400e; }

/* Review Summary & Modern Cards */
.review-summary-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: var(--surface);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    align-items: center;
}
.review-score-large {
    flex: 1;
    min-width: 120px;
    text-align: center;
    border-right: 1px solid var(--border);
}
.score-big { font-size: 48px; font-weight: 900; color: var(--text); line-height: 1; }
.score-stars { color: var(--gold); font-size: 18px; margin: 5px 0; }
.score-total { color: var(--text-light); font-size: 12px; }

.review-bars { flex: 2; min-width: 200px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; font-size: 12px; }
.bar-label { width: 30px; text-align: right; color: var(--text-light); font-weight: 600; }
.bar-track { flex: 1; height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--gold); border-radius: 3px; }
.bar-count { width: 30px; color: var(--text-light); text-align: left; }

@media (max-width: 600px) {
    .review-score-large { border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 15px; margin-bottom: 15px; }
}

.review-card-modern { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 15px; margin-bottom: 15px; transition: transform 0.2s; }
.rc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.rc-user { display: flex; gap: 10px; align-items: center; }
.rc-avatar { width: 40px; height: 40px; background: var(--primary-light); color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 16px; text-transform: uppercase; }
.rc-meta { display: flex; flex-direction: column; }
.rc-name { font-weight: 700; font-size: 14px; color: var(--text); }
.rc-date { font-size: 11px; color: var(--text-light); }
.rc-rating { color: var(--gold); font-size: 14px; letter-spacing: 1px; }
.rc-body { font-size: 14px; color: var(--text); line-height: 1.5; }
.rc-context { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 11px; color: var(--text-light); display: flex; align-items: center; }

/* --- ADMIN & SHOP --- */
.admin-user-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 15px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.user-status-badge { padding: 4px 8px; border-radius: 12px; font-size: 10px; font-weight: bold; text-transform: uppercase; }
.status-active { background: #dcfce7; color: #166534; }
.status-suspended { background: #fee2e2; color: #991b1b; }

/* --- TIENDA MODERNA --- */
.shop-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); 
    gap: 15px; 
    padding: 10px 0; 
}

.shop-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.shop-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 12px 20px -8px rgba(99, 102, 241, 0.3);
}

.token-icon-wrapper {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}
.shop-card:hover .token-icon-wrapper { transform: scale(1.1) rotate(10deg); background: var(--primary); color: white; }

.pack-title { font-size: 12px; font-weight: 700; color: var(--secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.pack-amount { font-size: 22px; font-weight: 900; color: var(--text); margin-bottom: 15px; line-height: 1; }

.pack-btn {
    width: 100%; padding: 10px; border-radius: 10px;
    background: var(--bg); border: 1px solid var(--border);
    color: var(--text); font-weight: 800; font-size: 14px;
    transition: all 0.2s;
}
.shop-card:hover .pack-btn { background: var(--primary); color: white; border-color: var(--primary); }

/* --- SOCIAL CARD GENERATOR --- */
#hidden-area {
    position: fixed; top: 0; left: -9999px; width: 1200px; height: 630px; overflow: hidden; pointer-events: none; z-index: -9999;
}
#social-card-hidden { 
    position: relative; 
    width: 100%; 
    height: 100%; 
    background: #0f172a; 
    display: flex; 
    flex-direction: row; 
    overflow: hidden; 
    font-family: 'Inter', sans-serif;
    visibility: visible;
}

/* CAPA DE FONDO (BLUR) */
.sc-bg-layer {
    position: absolute;
    top: -20px; left: -20px; right: -20px; bottom: -20px; /* Extendido para evitar bordes blancos por el blur */
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.35); /* Desenfoque fuerte y oscurecido para contraste */
    z-index: 0;
}

/* LADO IMAGEN (FLOTANTE) */
.sc-image-side { 
    width: 45%; 
    height: 100%; 
    position: relative; 
    z-index: 1;
    padding: 50px; /* Espacio para que la imagen "flote" */
    display: flex;
    align-items: center;
    justify-content: center;
}
.sc-image { 
    width: 100%; 
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover; 
    border-radius: 24px; /* Bordes redondeados modernos */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6); /* Sombra profunda */
    border: 2px solid rgba(255, 255, 255, 0.1); /* Borde sutil */
}

/* LADO CONTENIDO (TRANSPARENTE) */
.sc-content-side { 
    width: 55%; 
    padding: 45px 50px; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    /* Gradiente sutil para asegurar legibilidad sobre el fondo borroso */
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.8) 100%);
    position: relative; 
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3); /* Sombra de texto para legibilidad */
}

/* Decoración de fondo moderna (Glow) */
.sc-content-side::after {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 400px; height: 400px;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.1), transparent 60%);
    pointer-events: none;
}

/* HEADER */
.sc-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    z-index: 10;
}
.sc-logo { 
    font-size: 32px; 
    font-weight: 900; 
    color: #ffffff; 
    letter-spacing: -0.5px; 
    display: flex; 
    align-items: center; 
    gap: 10px;
}
.sc-badge { 
    background: #f59e0b; /* Default Gold */
    color: #000; /* Texto oscuro para contraste */
    font-weight: 800; 
    padding: 8px 18px; 
    border-radius: 8px; 
    font-size: 16px; 
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5); /* Sombra con color para brillar */
}

/* TÍTULO */
.sc-title { 
    font-size: 44px; 
    font-weight: 800; 
    line-height: 1.15; 
    margin: 0 0 25px 0;
    color: #f8fafc;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    z-index: 10;
}

/* PRECIO */
.sc-price-block {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 25px;
    border-radius: 12px;
    display: inline-flex;
    flex-direction: column;
    align-self: flex-start;
    min-width: 260px;
    z-index: 10;
}
.sc-price-label {
    font-size: 13px;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 1px;
}
.sc-price { 
    font-size: 56px; /* Un poco más grande */
    font-weight: 900; 
    color: #10b981; 
    line-height: 1;
    letter-spacing: -2px; /* Más compacto */
    text-shadow: 0 0 25px rgba(16, 185, 129, 0.4); /* Glow neón */
}

/* FOOTER */
.sc-footer { 
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.1); 
    padding-top: 20px; 
    display: flex; 
    justify-content: space-between;
    align-items: center;
    font-size: 18px; 
    color: #cbd5e1; 
    font-weight: 500;
    z-index: 10;
}
.sc-footer-left { display: flex; align-items: center; gap: 8px; }