/**
 * MyProduct Page Styles - REDESIGN COMPLETO
 * Layout profissional e moderno para página de produtos
 */

/* ========================================
   RESET E BASE
======================================== */

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --success-color: #10b981;
    --success-dark: #059669;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
}

/* ========================================
   PAGE HEADER
======================================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-weight: 600;
    font-size: 0.8rem;
}

/* ========================================
   CARD PREMIUM DO PRODUTO
======================================== */

.product-card-premium {
    border-radius: 12px;
    transition: all 0.3s ease;
    background: white;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.product-card-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12) !important;
}

.product-card-premium .card-body {
    padding: 1.5rem !important;
}

/* ========================================
   IMAGEM DO PRODUTO
======================================== */

.product-image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 280px;
    margin: 0 auto;
}

.product-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    max-height: 280px;
    object-fit: cover;
}

.product-card-premium:hover .product-image-wrapper img {
    transform: scale(1.05);
}

.badge-purchased {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-purchased i {
    font-size: 0.75rem;
}

.product-image-placeholder {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   INFORMAÇÕES DO PRODUTO
======================================== */

.product-title-main {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.4rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.price-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.price-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.price-value {
    color: var(--success-color);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.quantity-badge {
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ========================================
   BOTÃO DE DOWNLOAD PRINCIPAL
======================================== */

.btn-download-main {
    width: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-download-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn-download-main:hover::before {
    left: 100%;
}

.btn-download-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-download-main:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-download-main i {
    font-size: 1.1rem;
    animation: downloadPulse 2s ease-in-out infinite;
}

@keyframes downloadPulse {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.btn-download-main:hover i {
    animation: none;
    transform: scale(1.2);
}

/* ========================================
   DETALHES DO ARQUIVO
======================================== */

.file-details {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 0.75rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
    font-size: 0.8rem;
}

.info-item i {
    font-size: 0.95rem;
}

.info-label {
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    color: var(--text-dark);
    font-weight: 600;
}

/* ========================================
   ESTATÍSTICAS DE DOWNLOAD
======================================== */

.download-history {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 8px;
    padding: 0.75rem;
}

.stat-box {
    background: white;
    border-radius: 6px;
    padding: 0.75rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-box i {
    color: var(--info-color);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.35rem;
}

.stat-box strong {
    display: block;
    color: var(--text-dark);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.stat-box span {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.first-download-notice {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 6px;
    padding: 0.7rem 0.85rem;
    color: #92400e;
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.first-download-notice i {
    font-size: 0.95rem;
}

/* ========================================
   RESUMO DA COMPRA
======================================== */

.summary-stat {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
}

.summary-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.summary-stat .icon-bg {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 2rem;
    opacity: 0.06;
}

.summary-stat h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.summary-stat p {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8rem;
}

/* ========================================
   BADGE SEGURO
======================================== */

.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 50px;
    color: #065f46;
    font-weight: 600;
    font-size: 0.85rem;
}

.secure-badge i {
    color: #10b981;
    font-size: 1rem;
}

/* ========================================
   LOADING OVERLAY
======================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #e5e7eb;
    border-top: 6px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   BOTÃO SECUNDÁRIO
======================================== */

.btn-download {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
    color: white;
}

/* ========================================
   DESKTOP OPTIMIZATIONS
======================================== */

@media (min-width: 992px) {
    .product-title-main {
        font-size: 1.6rem;
    }

    .price-value {
        font-size: 1.75rem;
    }

    .btn-download-main {
        font-size: 1rem;
        padding: 0.9rem 1.75rem;
    }

    .product-card-premium .card-body {
        padding: 2rem !important;
    }

    .summary-stat h4 {
        font-size: 1.65rem;
    }

    .stat-box strong {
        font-size: 1.25rem;
    }

    .page-header h2 {
        font-size: 1.65rem;
    }

    .product-image-wrapper {
        max-width: 300px;
    }
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 768px) {
    .product-image-wrapper {
        max-width: 100%;
    }
    .page-header {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .page-header h2 {
        font-size: 1.5rem;
    }

    .product-title-main {
        font-size: 1.5rem;
    }

    .price-value {
        font-size: 1.75rem;
    }

    .btn-download-main {
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
    }

    .summary-stat h4 {
        font-size: 2rem;
    }

    .product-card-premium .card-body {
        padding: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 1.25rem;
    }

    .page-header h2 {
        font-size: 1.25rem;
    }

    .product-title-main {
        font-size: 1.25rem;
    }

    .price-value {
        font-size: 1.5rem;
    }

    .btn-download-main {
        font-size: 1rem;
        padding: 0.875rem 1.25rem;
    }

    .btn-download-main i {
        font-size: 1.25rem;
    }

    .summary-stat {
        padding: 1rem;
    }

    .summary-stat h4 {
        font-size: 1.75rem;
    }

    .stat-box strong {
        font-size: 1.25rem;
    }

    .badge-purchased {
        font-size: 0.7rem;
        padding: 6px 12px;
    }
}

/* ========================================
   SCROLLBAR CUSTOMIZADA
======================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ========================================
   ANIMAÇÕES ADICIONAIS
======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card-premium {
    animation: fadeIn 0.5s ease-out;
}

/* ========================================
   PRODUCT DESCRIPTION
======================================== */

.product-description {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.product-description p {
    line-height: 1.6;
    font-size: 0.95rem;
}
