/*
Theme Name: Vandeilson CD's
Author: Vandeilson CD's
Description: Tema Vandeilson CD's com painel seguro de postagem.
Version: 3.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: vandeilson-cds
*/

* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        html, body {
            width: 100%;
            height: 100%;
            background-color: #f4f4f4;
            color: #121212;
            overflow-x: hidden;
        }

        .app-container {
    width: 100%;
    max-width: 480px;
    min-height: 100dvh;
    margin: 0 auto;
    background: #f4f4f4;
    display: flex;
    flex-direction: column;
    position: relative;
}

        /* Telas */
        .screen {
            display: none;
            flex-direction: column;
            height: 100%;
            width: 100%;
            position: absolute;
            top: 0;
            left: 0;
            background-color: #f4f4f4;
            z-index: 1;
        }
        .screen.active {
            display: flex;
        }

        header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(480px, 100%);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #121212;
    flex-shrink: 0;
    z-index: 9999;
}

        #homeScreen { padding-top: 64px; }
        header h1 { cursor: pointer; }
        .menu-btn {
            background: #1a1a1a;
            border: 1px solid #333;
            color: #fff;
            width: 38px;
            height: 38px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            cursor: pointer;
        }
        header h1 {
            color: #ffffff;
            font-size: 1.1rem;
            font-weight: 800;
            letter-spacing: 0.5px;
            text-align: center;
        }
        header h1 span {
            color: #ffb703;
        }

        .scrollable-content {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            padding-bottom: 140px;
        }
        .scrollable-content::-webkit-scrollbar,
        .detail-scroll::-webkit-scrollbar {
            display: none;
        }

        .search-box {
            position: relative;
            padding: 10px 15px 12px;
            background-color: #121212;
        }
        .search-box input {
            width: 100%;
            padding: 10px 15px 10px 40px;
            background-color: #1a1a1a;
            border: 1px solid #2a2a2a;
            border-radius: 20px;
            color: #ffffff;
            font-size: 0.85rem;
            outline: none;
        }
        .search-box i {
            position: absolute;
            left: 27px;
            top: 50%;
            transform: translateY(-50%);
            color: #888;
        }

        .categories {
            display: flex;
            gap: 8px;
            padding: 10px 15px;
            background-color: #121212;
            overflow-x: auto;
            scrollbar-width: none;
        }
        .cat-btn {
            background-color: #1a1a1a;
            color: #ccc;
            border: 1px solid #333;
            padding: 6px 14px;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
            text-transform: uppercase;
        }
        .cat-btn.active {
            background-color: #ff0000;
            color: #ffffff;
            border-color: #ff0000;
        }

        .minha-loja-banner {
            margin: 12px 15px 8px;
            background: #dfa612;
            color: #000;
            text-align: center;
            padding: 8px;
            border-radius: 6px;
            font-weight: 900;
            font-size: 1rem;
            letter-spacing: 1px;
        }

        .loja-grid {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 0 15px;
            margin-bottom: 15px;
        }
        .loja-banner-principal {
            width: 100%;
            height: 110px;
            object-fit: contain !important;
            border-radius: 8px;
        }
        .loja-row-dupla {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }
        .loja-row-dupla img {
            width: 100%;
            height: 70px;
            object-fit: contain !important;
            border-radius: 6px;
        }

        .section-header-lancamentos {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            background-color: #000;
            margin: 0 15px 12px;
            padding: 8px;
            border-radius: 6px;
        }
        .section-header-lancamentos i {
            color: #fff;
            font-size: 1rem;
        }
        .section-header-lancamentos h2 {
            color: #fff;
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-weight: 800;
        }

        .cd-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            padding: 0 15px;
            margin-bottom: 15px;
        }
        .cd-card {
            background-color: #ffffff;
            border-radius: 10px;
            padding: 8px;
            border: 1px solid #e0e0e0;
            box-shadow: 0 2px 4px rgba(0,0,0,0.03);
            display: flex;
            flex-direction: column;
            gap: 6px;
            cursor: pointer;
        }
        .cd-card img {
            width: 100%;
            height: 110px;
            object-fit: contain !important;
            border-radius: 6px;
        }
        .cd-card h3 {
            font-size: 0.75rem;
            color: #000;
            text-align: center;
            font-weight: 800;
            text-transform: uppercase;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .btn-ouvir-card {
            width: 100%;
            background-color: #000;
            color: #fff;
            border: none;
            padding: 7px;
            border-radius: 5px;
            font-size: 0.65rem;
            font-weight: 800;
            cursor: pointer;
            text-align: center;
            letter-spacing: 0.5px;
        }

        .btn-mais {
            margin: 0 15px 15px;
            background-color: #000;
            color: #fff;
            border: none;
            padding: 10px;
            border-radius: 6px;
            font-weight: 900;
            text-align: center;
            font-size: 0.9rem;
            letter-spacing: 2px;
            cursor: pointer;
        }

        .videos-title {
            background-color: #ff0000;
            color: #fff;
            text-align: center;
            padding: 8px;
            font-weight: 900;
            font-size: 0.9rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 12px;
        }

        .video-container-box {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 15px;
            margin-bottom: 20px;
        }
        .video-container-box i {
            font-size: 1.2rem;
            color: #000;
            cursor: pointer;
            padding: 5px;
        }
        .video-card-preview {
            width: 78%;
            background: #fff;
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid #ddd;
            text-align: center;
        }
        .video-card-preview img {
            width: 100%;
            height: 95px;
            object-fit: contain !important;
            display: block;
        }

        .social-links {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 0 15px 20px;
        }
        .social-btn {
            background-color: #000;
            border: none;
            color: #fff;
            padding: 10px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-size: 0.8rem;
            font-weight: 800;
            text-decoration: none;
            letter-spacing: 0.5px;
        }

        /* --- PLAYER FIXO INFERIOR --- */
        .bottom-player {
            position: fixed;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            max-width: 480px;
            background-color: #121212;
            border-top: 1px solid #222;
            padding: 10px 15px 12px;
            z-index: 10;
        }
        .player-info {
            color: #fff;
            font-size: 0.75rem;
            text-align: center;
            margin-bottom: 6px;
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .player-timeline {
            width: 100%;
            height: 3px;
            background-color: #444;
            border-radius: 2px;
            margin-bottom: 8px;
            cursor: pointer;
        }
        .player-timeline-fill {
            width: 0%;
            height: 100%;
            background-color: #ffb703;
            transition: width 0.1s linear;
        }
        .player-controls {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 25px;
            color: #fff;
            font-size: 1rem;
            margin-bottom: 4px;
        }
        .player-controls i {
            cursor: pointer;
        }
        .player-time-text {
            text-align: center;
            font-size: 0.6rem;
            color: #888;
        }

        /* --- TELA 2: DETALHES --- */
        .detail-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 15px;
            background: #f4f4f4;
            flex-shrink: 0;
        }
        .close-detail-btn, .share-detail-btn {
            background: #e0e0e0;
            border: 1px solid #ccc;
            color: #000;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 0.85rem;
        }
        .detail-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 0 15px 140px;
        }
        .album-cover-box {
            width: 100%;
            display: flex;
            justify-content: center;
            margin-bottom: 12px;
        }
        .album-cover-box img {
            width: 100%;
            max-height: 220px;
            object-fit: contain !important;
            border-radius: 10px;
            border: 1px solid #ccc;
        }
        .album-info-card {
            background-color: #ffffff;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 10px 12px;
            margin-bottom: 12px;
            font-size: 0.75rem;
            line-height: 1.5;
            color: #444;
            box-shadow: 0 2px 4px rgba(0,0,0,0.03);
        }
        .album-info-card span {
            color: #000;
            font-weight: bold;
        }
        .btn-baixar-cd-completo {
            width: 100%;
            background: linear-gradient(180deg, #d32f2f 0%, #900 100%);
            color: #ffffff;
            border: none;
            padding: 10px;
            border-radius: 6px;
            font-size: 0.85rem;
            font-weight: 800;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            cursor: pointer;
            margin-bottom: 15px;
            text-transform: uppercase;
            text-decoration: none;
        }
        .track-list-container {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .track-item-card {
            background-color: #ffffff;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 8px 10px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.03);
        }
        .track-row-top {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .track-play-circle {
            width: 36px;
            height: 36px;
            background: #ffb703;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #000;
            font-size: 0.8rem;
            cursor: pointer;
            flex-shrink: 0;
        }
        .track-download-btn {
            flex: 1;
            background-color: #ffffff;
            color: #000;
            border: 1px solid #ccc;
            padding: 8px;
            border-radius: 5px;
            font-size: 0.75rem;
            font-weight: 900;
            cursor: pointer;
            text-align: center;
            text-decoration: none;
            letter-spacing: 0.5px;
        }
        .track-name-label {
            font-size: 0.7rem;
            color: #333;
            padding-left: 2px;
            font-weight: 600;
        }
        .track-line-bar {
            width: 100%;
            height: 2px;
            background-color: #000;
            border-radius: 2px;
            margin-top: 2px;
        }

        /* CORREÇÕES E MELHORIAS */
        .btn-mais {
            width: calc(100% - 30px);
            display: block;
        }

        .cd-card.hidden {
            display: none !important;
        }

        .search-box input::placeholder {
            color: #888;
        }

        .cat-btn:focus,
        .btn-mais:focus,
        .btn-ouvir-card:focus,
        .track-play-circle:focus,
        .track-download-btn:focus {
            outline: 2px solid #ffb703;
            outline-offset: 2px;
        }

        .bottom-player {
            padding-bottom: max(12px, env(safe-area-inset-bottom));
        }

        @media (max-width: 360px) {
            .cd-grid {
                grid-template-columns: 1fr;
            }

            .player-controls {
                gap: 22px;
            }
        }

        .track-play-circle {
            border: 0;
            padding: 0;
        }
        .track-download-btn {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .track-unavailable {
            cursor: pointer;
        }
        .track-item-card.playing {
            border-color: #ffb703;
            box-shadow: 0 0 0 2px rgba(255,183,3,.18);
        }
        .track-item-card.playing .track-play-circle {
            background: #000;
            color: #ffb703;
        }
        .btn-baixar-cd-completo {
            text-decoration: none;
        }
        @media (max-width: 480px) {
            .app-container { max-width: 480px; min-height: 100dvh; }
            .screen { min-height: 100dvh; }
            .cd-card img { height: 148px; }
            .cd-card { padding: 7px; }
            .cd-card h3 { font-size: .78rem; }
            .btn-ouvir-card { font-size: .68rem; padding: 8px 5px; }
            .detail-scroll { padding-bottom: 155px; }
            .bottom-player { padding-top: 9px; }
        }
.vcd-menu-link{
    width:40px;height:40px;display:flex;align-items:center;justify-content:center;
    border:1px solid #444;border-radius:9px;color:#fff;background:#181818;
    text-decoration:none;font:28px/1 Arial,sans-serif;
}
.vcd-menu-link:hover{color:#fff;background:#252525}
@media (min-width:769px){
    .app-container{max-width:1200px}
}

/* Imagem do cantor no cadastro do CD */
.vcd-image-upload-row {
    display:flex;
    gap:8px;
    align-items:center;
}
.vcd-image-upload-row input {
    flex:1;
}
.vcd-artist-image-preview {
    margin-top:10px;
    min-height:20px;
}
.vcd-artist-image-preview img {
    display:block;
    width:120px;
    height:120px;
    object-fit: contain !important;
    border-radius:10px;
    border:1px solid #dcdcde;
}
@media (max-width:782px) {
    .vcd-image-upload-row {
        display:block;
    }
    .vcd-image-upload-row input,
    .vcd-image-upload-row button {
        width:100%;
        margin-bottom:8px;
    }
}

/* Cadastro de CD: campos sempre no topo do editor clássico */
#vcd-cadastro-topo {
    background:#fff !important;
    border:1px solid #ccd0d4 !important;
    border-radius:6px;
    padding:20px !important;
    margin:18px 0 22px !important;
}
#vcd-cadastro-topo .vcd-image-first {
    background:#f0f6fc !important;
    border:2px solid #2271b1 !important;
}

/* ===== PADRÃO FINAL DO SITE ===== */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #f4f4f4;
}
.app-container {
    max-width: 480px !important;
    min-height: 100dvh;
}
.screen {
    width: 100% !important;
    max-width: 480px !important;
}
.cd-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: start;
}
.cd-card {
    min-width: 0;
    overflow: hidden;
}
.cd-card img {
    aspect-ratio: 1 / 1;
    height: auto !important;
}
.btn-ouvir-card {
    pointer-events: auto !important;
    position: relative;
    z-index: 2;
}
.search-box, .categories {
    width: 100%;
    box-sizing: border-box;
}
.detail-screen {
    max-width: 480px !important;
    left: 50% !important;
    transform: translateX(-50%);
}
.bottom-player {
    width: min(480px, 100%) !important;
    max-width: 480px !important;
    left: 50%;
    transform: translateX(-50%);
}
@media (min-width: 481px) {
    body {
        display: flex;
        justify-content: center;
    }
}
@media (max-width: 480px) {
    body {
        display: block;
    }
    .app-container {
        max-width: 100% !important;
    }
    header {
        width: 100% !important;
    }
}

/* ===== IMAGEM DO CANTOR: MOSTRAR INTEIRA ===== */
.album-cover-box {
    width: calc(100% - 32px) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 16px auto !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border-radius: 14px !important;
}

.album-cover-box img,
#detailImgCover {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    border-radius: 14px !important;
}

/* Também evita cortar a imagem do cantor nos cards da página inicial. */
.cd-card img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
}

/* =========================================================
   CORREÇÃO DEFINITIVA: NUNCA CORTAR A FOTO DO CANTOR
   ========================================================= */
#detailScreen .album-cover-box,
#detailScreen .album-cover-box img,
#detailScreen #detailImgCover {
    box-sizing: border-box !important;
}

#detailScreen .album-cover-box {
    width: calc(100% - 32px) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 16px auto !important;
    display: block !important;
    background: transparent !important;
}

#detailScreen .album-cover-box img,
#detailScreen #detailImgCover {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    margin: 0 auto !important;
}

/* A imagem do card também não deve ser cortada. */
#homeScreen .cd-card img,
#homeScreen .cd-card > img {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
}

/* Não deixar regras de altura do tema antigo cortarem a foto. */
#detailScreen img,
#homeScreen .cd-card img {
    max-height: none !important;
}

/* MOSTRAR SOMENTE O TITULO DO CD */
.vcd-only-title {
    text-align: center !important;
    font-weight: 800 !important;
    font-size: 20px !important;
    line-height: 1.25 !important;
    padding: 12px 16px !important;
    margin: 8px 16px 14px !important;
}
.vcd-only-title #detailAlbumName {
    display: block !important;
    font-weight: 800 !important;
}
.cd-card .cd-title {
    margin: 8px 6px 10px !important;
    text-align: center !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
}
