/* ============================
   CARRINHO.CSS
   Página do Carrinho - Disco Cloud
   ============================ */

/* === CONTAINER === */
.carrinho-container {
    max-width: var(--page-max-width);
    margin: 0 auto;
    padding: var(--spacing-lg);
    animation: fadeIn 0.6s ease;
}

/* === CABEÇALHO === */
.carrinho-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding: 3rem var(--spacing-lg);
    background: var(--grad-sunset);
    border-radius: var(--radius-lg);
    color: var(--text-light);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.carrinho-header::before {
    content: '🛒';
    position: absolute;
    font-size: 12rem;
    opacity: 0.08;
    top: -50px;
    right: -50px;
    animation: float 5s ease-in-out infinite;
}

.carrinho-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    margin: 0;
    padding: 0;
    font-family: var(--font-body), Arial, sans-serif;

}

/* === AVISO LOGIN === */
.aviso-login {
    background: var(--gray-100);
    border-left: 5px solid var(--vinyl-gold);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    text-align: center;
    color: var(--gray-700);
    box-shadow: var(--shadow-sm);
    animation: slideInDown 0.5s ease;
}

.aviso-login a {
    color: var(--vinyl-red);
    font-weight: 600;
    text-decoration: none;
}

.aviso-login a:hover {
    text-decoration: underline;
}

/* === LAYOUT === */
.carrinho-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1366px) {
    .carrinho-content {
        grid-template-columns: 1fr 320px;
        gap: 1.5rem;
    }

    .item-carrinho {
        grid-template-columns: 100px 1fr auto auto;
        gap: var(--spacing-md);
    }
}

/* === LISTA === */
.carrinho-items {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    min-height: 450px;
}

/* === ITEM === */
.item-carrinho {
    display: grid;
    grid-template-columns: 120px 1fr auto auto;
    gap: var(--spacing-lg);
    align-items: center;
    padding: var(--spacing-lg);
    background: var(--gray-100);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    border: 2px solid transparent;
    animation: slideInLeft 0.5s ease;
    transition: all 0.3s ease;
}

.item-carrinho:hover {
    border-color: var(--vinyl-gold);
    box-shadow: var(--shadow-md);
    transform: translateX(8px);
    background: var(--white);
}

/* === IMAGEM === */
.item-imagem {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--dark);
    box-shadow: var(--shadow-sm);
}

.item-imagem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === INFO === */
.item-info h3 {
    color: var(--dark);
    margin-bottom: var(--spacing-xs);
    font-size: 1.1rem;
}

.item-preco {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--vinyl-red);
    font-family: var(--font-display);
}

/* === QUANTIDADE === */
.item-quantidade {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: var(--white);
    padding: var(--spacing-xs);
    border-radius: var(--radius-xl);
    border: 2px solid var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.item-quantidade button {
    background: var(--vinyl-red);
    color: var(--text-light);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--trans-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-quantidade button:hover {
    background: var(--dark);
    color: var(--text-light);
    transform: scale(1.1);
}

.item-quantidade button:active {
    transform: scale(0.95);
}

.item-quantidade input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    background: transparent;
    color: var(--dark);
    font-family: var(--font-display);
}

/* === AÇÕES === */
.item-actions-right {
    text-align: right;
    min-width: 100px;
}

.item-price-total {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.item-remover {
    background: var(--gray-300);
    color: var(--dark);
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--trans-normal);
    text-transform: uppercase;
    font-size: 0.85rem;
}

.item-remover:hover {
    background: var(--vinyl-red);
    color: var(--text-light);
}

/* === RESUMO === */
.carrinho-resumo {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 110px;
    border: 3px solid var(--vinyl-gold);
}

.resumo-header {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--vinyl-red);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--font-display);
}

.resumo-linha {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-md) 0;
    border-bottom: 1px dashed var(--gray-300);
}

.resumo-linha.total {
    border-top: 2px solid var(--vinyl-gold);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--vinyl-red);
}

/* === BOTÕES === */
.btn-checkout {
    width: 100%;
    padding: 1.2rem;
    background: var(--grad-sunset);
    color: var(--text-light);
    border: none;
    border-radius: var(--radius-xl);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: var(--spacing-lg);
}

.btn-checkout:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

.btn-continuar {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    cursor: pointer;
}

/* === RESPONSIVO === */
@media (max-width: 768px) {
    .carrinho-content {
        grid-template-columns: 1fr;
    }

    .item-carrinho {
        grid-template-columns: 80px 1fr;
    }

    .item-quantidade,
    .item-remover {
        grid-column: 1 / -1;
    }
}

@media (max-height: 820px) and (min-width: 900px) {
    .carrinho-header {
        padding: 2rem var(--spacing-lg);
    }
}

/* === ANIMAÇÕES === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

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

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