.content {
    min-height: calc(100vh - 140px);
    padding: 0 20px 40px;
    background: #121212;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== FAIXA SUPERIOR (estilo header de curso Udemy) ===== */
.purchase-hero {
    width: 100%;
    max-width: 1100px;
    padding: 30px 0 26px;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.purchase-breadcrumb {
    font-size: 0.8rem;
    color: #999;
}

.purchase-breadcrumb a {
    color: #FFA500;
    text-decoration: none;
}

.purchase-breadcrumb a:hover {
    text-decoration: underline;
}

.purchase-breadcrumb i {
    font-size: 0.6rem;
    margin: 0 4px;
    color: #666;
}

.purchase-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #FFD700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.25);
    word-break: break-word;
}

.purchase-owner {
    color: #ccc;
    font-size: 0.9rem;
}

.purchase-owner a {
    color: #FFD700;
    text-decoration: none;
    font-weight: 600;
}

.purchase-owner a:hover {
    text-decoration: underline;
}

.purchase-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.purchase-idiomas {
    color: #ccc;
    font-size: 0.9rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.purchase-idiomas i {
    color: #FFD700;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-stock {
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.badge-delivery {
    background: rgba(40, 167, 69, 0.12);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.35);
}

.purchase-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px solid #2a2a2a;
}

.purchase-stat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.purchase-stat i {
    font-size: 1.2rem;
    color: #FFD700;
}

.purchase-stat div {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.purchase-stat strong {
    color: #fff;
    font-size: 0.95rem;
}

.purchase-stat span {
    color: #888;
    font-size: 0.75rem;
}

/* ===== LAYOUT PRINCIPAL (conteudo + sidebar) ===== */
.purchase-wrapper {
    width: 100%;
    max-width: 1100px;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
}

.purchase-main {
    flex: 2 1 500px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ===== DESCRICAO DO PRODUTO (HTML livre do vendedor) ===== */
.purchase-desc-box {
    background: linear-gradient(145deg, #1e1e1e, #1a1a1a);
    border: 1px solid #333;
    border-radius: 18px;
    padding: 26px;
}

.purchase-desc-title {
    margin: 0 0 18px;
    font-size: 1.1rem;
    color: #FFD700;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #333;
    padding-bottom: 14px;
}

.purchase-desc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    border-bottom: 1px solid #333;
    padding-bottom: 14px;
}

.purchase-desc-header .purchase-desc-title {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.purchase-desc-header-btns {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.purchase-previa-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #FFD700;
    border-radius: 10px;
    color: #FFD700;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.purchase-previa-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.35);
}

.chapters-modal-content {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.15);
}

.chapters-modal-content .close {
    position: absolute;
    top: 16px;
    right: 18px;
    cursor: pointer;
    color: #FFD700;
    font-size: 1rem;
}

.chapters-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    margin-top: 6px;
}

.chapters-list-item {
    background: #222;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 0.92rem;
}

.chapters-list-numero {
    color: #FFD700;
    font-weight: 700;
    flex-shrink: 0;
}

.chapters-list-titulo {
    color: #ddd;
}

.purchase-desc {
    color: #ddd;
    font-size: 0.98rem;
    line-height: 1.7;
    overflow-x: auto;
}

.purchase-desc img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.purchase-desc table {
    max-width: 100%;
    border-collapse: collapse;
}

.purchase-desc iframe,
.purchase-desc embed {
    max-width: 100%;
}

.purchase-desc video {
    max-width: 100%;
}

/* ===== PLAYER CUSTOMIZADO PARA VIDEOS DA DESCRICAO (mesmo padrao do curso em video) ===== */
.custom-player {
    position: relative;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    margin: 16px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.custom-player video {
    width: 100%;
    display: block;
    cursor: pointer;
}

.custom-player .center-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 50px;
    color: #FFD700;
    opacity: 0.85;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.custom-player .center-play.hidden {
    opacity: 0;
}

.custom-player .cp-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.65);
}

.custom-player .cp-controls button {
    background: none;
    border: none;
    color: #FFD700;
    font-size: 15px;
    cursor: pointer;
    flex-shrink: 0;
}

.custom-player .cp-controls button:hover {
    color: #FFA500;
}

.custom-player .cp-progress {
    flex: 1;
    height: 4px;
    margin: 0 4px;
    cursor: pointer;
    appearance: none;
    background: #555;
    border-radius: 5px;
}

.custom-player .cp-progress::-webkit-slider-thumb {
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #FFD700;
    cursor: pointer;
}

.custom-player .cp-volume {
    width: 60px;
    height: 4px;
    cursor: pointer;
    appearance: none;
    background: rgba(255, 215, 0, 0.25);
    border-radius: 5px;
}

.custom-player .cp-volume::-webkit-slider-thumb {
    appearance: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FFD700;
    cursor: pointer;
}

.custom-player .cp-time {
    color: #fff;
    font-size: 11px;
    min-width: 45px;
    text-align: center;
    flex-shrink: 0;
}

/* ===== SIDEBAR FIXA / CAIXA DE COMPRA (estilo Udemy) ===== */
.purchase-sidebar {
    flex: 1 1 300px;
    max-width: 340px;
}

.purchase-sidebar-card {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, #1e1e1e, #1a1a1a);
    border: 1px solid #333;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.12);
}

.purchase-sidebar-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: center 75%;
    display: block;
}

.purchase-sidebar-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
}

.purchase-sidebar-label {
    font-size: 0.8rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.purchase-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.purchase-price {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
}

.purchase-price i {
    color: #FFD700;
    font-size: 1.3rem;
}

.purchase-price span {
    background: linear-gradient(to right, #FFD700, #FFA500);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.purchase-price .purchase-price-tc {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: #ccc;
    font-size: 0.5em;
    font-weight: 600;
}

.purchase-price-tc img {
    width: 14px;
    height: 14px;
}

.purchase-unavailable {
    color: #ff6b6b;
    font-weight: 600;
    margin: 0;
}

.purchase-price .promo-old-price,
.related-price .promo-old-price {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: #999;
    text-decoration: line-through;
    font-size: 0.85em;
    font-weight: 500;
}

.promo-tag,
.purchase-price .promo-tag,
.related-price .promo-tag {
    display: inline-block;
    background: linear-gradient(90deg, #ff4d4d, #ff1a1a);
    color: #fff;
    -webkit-background-clip: initial;
    background-clip: initial;
    font-size: 0.6em;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: 5px;
    vertical-align: middle;
    margin-left: 4px;
}

.menu-button-buy {
    width: 100%;
    padding: 14px 0;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    color: #000;
    font-weight: bold;
    font-size: 1.05rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.menu-button-buy:hover {
    transform: scale(1.03);
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.5);
}

.purchase-guarantees {
    list-style: none;
    margin: 0;
    padding: 14px 0 0;
    border-top: 1px solid #333;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.purchase-guarantees li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #ccc;
}

.purchase-guarantees i {
    color: #FFD700;
    width: 16px;
    text-align: center;
}

.purchase-note {
    margin: 0;
    color: #999;
    font-size: 0.8rem;
    text-align: center;
}

.green-effect {
    transition: filter 0.3s ease;
}

.green-effect:hover {
    filter: brightness(1.2);
}

.yellow-link {
    display: block;
    text-align: center;
    color: #FFD700;
    font-weight: bold;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.yellow-link:hover {
    color: #FFCC00;
}

/* ===== VOCE TAMBEM PODE GOSTAR ===== */
.related-section {
    width: 100%;
    max-width: 1100px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #2a2a2a;
}

.related-title {
    color: #FFD700;
    font-size: 1.3rem;
    margin: 0 0 20px;
    border-left: 4px solid #FFD700;
    padding-left: 12px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, #1e1e1e, #1a1a1a);
    border: 1px solid #333;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
}

.related-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    object-position: center 75%;
}

.related-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.related-card-body h3 {
    margin: 0;
    font-size: 1rem;
    color: #FFD700;
}

.related-card-body p {
    margin: 0;
    color: #aaa;
    font-size: 0.82rem;
    line-height: 1.5;
}

.related-price {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #FFD700;
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 4px;
}

.related-price-tc {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ccc;
    font-weight: 600;
    font-size: 0.75rem;
}

.related-price-tc img {
    width: 12px;
    height: 12px;
}

.related-btn {
    width: 100%;
    margin-top: 8px;
    padding: 10px 0;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    color: #000;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 0 14px rgba(255, 215, 0, 0.5);
}

/* ===== MODAL DE CONFIRMACAO DE COMPRA ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.confirm-modal-content {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 380px;
    position: relative;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.15);
}

.confirm-modal-content .close {
    position: absolute;
    top: 16px;
    right: 18px;
    cursor: pointer;
    color: #FFD700;
    font-size: 1rem;
}

.confirm-title {
    margin: 0 0 20px;
    text-align: center;
    color: #FFD700;
}

.confirm-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.confirm-rows hr {
    border: none;
    border-top: 1px solid #333;
    margin: 4px 0;
}

.confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: #ccc;
}

.confirm-row.confirm-negative strong {
    color: #ff6b6b;
}

.confirm-row.confirm-final {
    font-size: 1.1rem;
}

.confirm-row.confirm-final strong {
    background: linear-gradient(to right, #FFD700, #FFA500);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.confirm-row.confirm-final-negative strong {
    background: none;
    -webkit-background-clip: unset;
    color: #ff6b6b;
}

.confirm-warning {
    color: #ff6b6b;
    font-size: 0.85rem;
    text-align: center;
    margin: 0 0 14px;
}

.confirm-irreversible {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #FFA500;
    font-size: 0.78rem;
    line-height: 1.5;
    background: rgba(255, 165, 0, 0.08);
    border: 1px solid rgba(255, 165, 0, 0.25);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 0 0 18px;
}

.confirm-irreversible i {
    margin-top: 2px;
}

.confirm-irreversible a {
    color: #FFD700;
    font-weight: bold;
    text-decoration: underline;
}

.confirm-cancel {
    width: 100%;
    margin-top: 10px;
    padding: 12px 0;
    background: transparent;
    border: 1px solid #444;
    border-radius: 10px;
    color: #ccc;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.confirm-cancel:hover {
    border-color: #FFD700;
    color: #FFD700;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 850px) {
    .purchase-wrapper {
        flex-direction: column;
    }

    .purchase-sidebar {
        max-width: 100%;
        width: 100%;
        order: -1;
    }

    .purchase-sidebar-card {
        position: static;
    }

    .purchase-title {
        font-size: 1.5rem;
    }

    .purchase-stats {
        gap: 20px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}
