/* ============================================
   BestApps - Estilo de Loja de Aplicativos
   CSS Isolado - Não afetado por temas
   ============================================ */

/* Reset e Base */
.bestapps-single-wrapper,
.bestapps-single-wrapper *,
.bestapps-grid,
.bestapps-grid * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.bestapps-single-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #202124;
    line-height: 1.6;
}

/* ============================================
   HEADER DO APP
   ============================================ */
.bestapps-access-text {
    font-size: 14px;
    color: #5f6368;
    margin-bottom: 2px;
    padding: 12px 16px;
    background: #f0f6ff;
    border-radius: 10px;
    border: 1px solid #d2e3fc;
    line-height: 1.5;
}

.bestapps-access-text strong {
    color: #1a73e8;
    font-weight: 600;
}

.bestapps-header {
    position: relative;
    margin: 0 0 30px;
    padding: 30px 0 0;
    overflow: hidden;
}

.bestapps-header-content {
    display: flex;
    align-items: flex-end;
    gap: 24px;
}

.bestapps-header-icon {
    flex-shrink: 0;
    width: 128px;
    height: 128px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    background: #fff;
    border: 2px solid #e8eaed;
}

.bestapps-header-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bestapps-header-info {
    flex: 1;
    min-width: 0;
    padding-bottom: 4px;
}

.bestapps-header-title {
    font-size: 28px;
    font-weight: 700;
    color: #202124;
    margin: 0 0 4px;
    line-height: 1.2;
}

.bestapps-header-developer {
    font-size: 15px;
    color: #5f6368;
    margin: 0 0 12px;
}

.bestapps-header-developer a {
    color: #5f6368;
    text-decoration: none;
    transition: color 0.2s;
}

.bestapps-header-developer a:hover {
    color: #202124;
    text-decoration: underline;
}

.bestapps-header-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.bestapps-header-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bestapps-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

.bestapps-stars .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #fbbc04;
}

.bestapps-rating-text {
    font-size: 15px;
    font-weight: 600;
    color: #202124;
}

.bestapps-rating-count {
    font-size: 13px;
    color: #5f6368;
}

.bestapps-header-separator {
    color: #dadce0;
    font-size: 14px;
}

.bestapps-header-price {
    font-size: 15px;
    font-weight: 600;
    color: #1a73e8;
}

.bestapps-platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bestapps-platform-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.bestapps-header-categories {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0;
}

.bestapps-category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #e8f0fe;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #1a73e8;
    text-decoration: none;
    transition: background 0.2s;
}

.bestapps-category-tag:hover {
    background: #d2e3fc;
    color: #1557b0;
}

.bestapps-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

/* Texto de aviso abaixo dos botões */
.bestapps-btn-disclaimer {
    font-size: 12px;
    color: #9aa0a6;
    margin: 8px 0 14px;
    line-height: 1.4;
    font-style: italic;
}

/* Ícone nos botões de ação */
.bestapps-btn-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

/* ============================================
   BOTÕES
   ============================================ */
.bestapps-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 28px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    line-height: 1.4;
}

.bestapps-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.bestapps-btn-android {
    background: #34A853;
    color: #fff;
    box-shadow: 0 2px 8px rgba(52,168,83,0.3);
}

.bestapps-btn-android:hover {
    background: #2d8f47;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52,168,83,0.4);
}

.bestapps-btn-ios {
    background: #000;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.bestapps-btn-ios:hover {
    background: #1a1a1a;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.bestapps-btn-web {
    background: #5f6368;
    color: #fff;
    box-shadow: 0 2px 8px rgba(95,99,104,0.3);
}

.bestapps-btn-web:hover {
    background: #4a4d52;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(95,99,104,0.4);
}

.bestapps-btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 15px;
}

/* ============================================
   CORPO PRINCIPAL
   ============================================ */
.bestapps-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    align-items: start;
}

.bestapps-main {
    min-width: 0;
}

/* ============================================
   SEÇÕES
   ============================================ */
.bestapps-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border: 1px solid #e8eaed;
}

.bestapps-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #202124;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #1a73e8;
    display: inline-block;
}

/* ============================================
   SCREENSHOTS CARROSSEL
   ============================================ */
.bestapps-screenshots-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bestapps-screenshots-track {
    display: flex;
    gap: 15px;
    overflow: hidden;
    scroll-behavior: smooth;
    transition: transform 0.3s ease;
    padding: 4px 0;
}

.bestapps-screenshot-slide {
    flex: 0 0 auto;
    width: 200px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.bestapps-screenshot-slide:hover {
    transform: scale(1.03);
}

.bestapps-screenshot-slide img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
}

.bestapps-carousel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #dadce0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    z-index: 2;
}

.bestapps-carousel-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.bestapps-carousel-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #5f6368;
}

.bestapps-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.bestapps-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dadce0;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.bestapps-carousel-dot.active {
    background: #1a73e8;
    width: 24px;
    border-radius: 4px;
}

/* ============================================
   DESCRIÇÃO
   ============================================ */
.bestapps-description-content {
    font-size: 15px;
    line-height: 1.7;
    color: #3c4043;
}

.bestapps-description-content p {
    margin-bottom: 12px;
}

.bestapps-description-content p:last-child {
    margin-bottom: 0;
}

/* ============================================
   GRADE DE INFORMAÇÕES
   ============================================ */
.bestapps-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.bestapps-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e8eaed;
}

.bestapps-info-label {
    font-size: 12px;
    font-weight: 600;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bestapps-info-value {
    font-size: 15px;
    font-weight: 500;
    color: #202124;
}

.bestapps-age-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #1a73e8;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

/* ============================================
   TAGS
   ============================================ */
.bestapps-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bestapps-tag {
    display: inline-block;
    padding: 6px 14px;
    background: #e8f0fe;
    color: #1a73e8;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.bestapps-tag:hover {
    background: #d2e3fc;
    color: #1557b0;
}

/* ============================================
   SIDEBAR
   ============================================ */
.bestapps-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bestapps-sidebar-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border: 1px solid #e8eaed;
}

.bestapps-sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: #202124;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a73e8;
}

/* Rating Card */
.bestapps-rating-big {
    text-align: center;
    padding: 8px 0;
}

.bestapps-rating-number {
    display: block;
    font-size: 48px;
    font-weight: 800;
    color: #202124;
    line-height: 1;
    margin-bottom: 8px;
}

.bestapps-stars-big .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.bestapps-rating-total {
    display: block;
    font-size: 13px;
    color: #5f6368;
    margin-top: 8px;
}

/* Quick Info List */
.bestapps-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bestapps-sidebar-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f3f4;
    font-size: 14px;
    color: #3c4043;
}

.bestapps-sidebar-list li:last-child {
    border-bottom: none;
}

.bestapps-sidebar-list .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #5f6368;
    flex-shrink: 0;
}

/* Download Card */
.bestapps-download-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ============================================
   GRID DE APPS (Shortcode)
   ============================================ */
.bestapps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.bestapps-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border: 1px solid #e8eaed;
    transition: all 0.2s ease;
}

.bestapps-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.bestapps-card-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
}

.bestapps-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bestapps-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bestapps-card-info {
    flex: 1;
    min-width: 0;
}

.bestapps-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #202124;
    margin: 0 0 2px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bestapps-card-developer {
    font-size: 13px;
    color: #5f6368;
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bestapps-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bestapps-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #5f6368;
}

.bestapps-card-rating .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #fbbc04;
}

.bestapps-card-price {
    font-size: 13px;
    font-weight: 600;
    color: #1a73e8;
}

.bestapps-no-results {
    text-align: center;
    padding: 40px;
    color: #5f6368;
    font-size: 16px;
}

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 1024px) {
    .bestapps-body {
        grid-template-columns: 1fr;
    }
    
    .bestapps-sidebar {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    /* Mobile: ícone ao lado do nome, botão abaixo do nome do app */
    .bestapps-header-content {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 4px 16px;
        align-items: start;
    }
    
    .bestapps-header-icon {
        grid-column: 1;
        grid-row: 1 / span 2;
        width: 72px;
        height: 72px;
        border-radius: 16px;
        align-self: start;
    }
    
    .bestapps-header-info {
        grid-column: 2;
        grid-row: 1;
        padding-bottom: 0;
        display: flex;
        flex-direction: column;
    }
    
    .bestapps-header-title {
        font-size: 20px;
        margin-bottom: 0;
        line-height: 1.2;
    }
    
    .bestapps-header-developer {
        font-size: 13px;
        margin-bottom: 0;
        margin-top: 2px;
    }
    
    .bestapps-header-actions {
        grid-column: 2;
        grid-row: 2;
        justify-content: flex-start;
        margin-top: 6px;
    }
    
    .bestapps-header-actions .bestapps-btn {
        width: 100%;
        justify-content: center;
        padding: 16px 20px;
        border-radius: 12px;
        font-size: 15px;
    }
    
    .bestapps-header-meta {
        grid-column: 1 / -1;
        grid-row: 3;
        display: inline-flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
        margin-bottom: 0;
        padding-top: 8px;
        margin-top: 4px;
        border-top: 1px solid #f1f3f4;
    }
    
    .bestapps-header-categories {
        display: inline-flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .bestapps-info-grid {
        grid-template-columns: 1fr;
    }
    
    .bestapps-sidebar {
        grid-template-columns: 1fr;
    }
    
    .bestapps-screenshot-slide {
        width: 160px;
    }
    
    .bestapps-screenshot-slide img {
        height: 280px;
    }
}

@media (max-width: 480px) {
    .bestapps-single-wrapper {
        padding: 0 12px 30px;
    }
    
    .bestapps-header {
        margin: 0 0 20px;
        padding: 4px 0 0;
    }
    
    .bestapps-header-icon {
        width: 64px;
        height: 64px;
        border-radius: 14px;
    }
    
    .bestapps-header-title {
        font-size: 18px;
    }
    
    .bestapps-header-developer {
        font-size: 12px;
    }
    
    .bestapps-section {
        padding: 16px;
    }
    
    .bestapps-screenshot-slide {
        width: 140px;
    }
    
    .bestapps-screenshot-slide img {
        height: 240px;
    }
    
    .bestapps-grid {
        grid-template-columns: 1fr;
    }
}
