/**
 * Perfilmil Cart - CSS para Carrinho de Compras Customizado
 * Design moderno e intuitivo para melhor experiência do usuário
 */

/* ===== PÁGINA DO CARRINHO ===== */
.perfilmil-cart-page {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 40px 0;
}

/* Breadcrumb */
.perfilmil-cart-page .perfilmil-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 24px;
}

.perfilmil-cart-page .perfilmil-breadcrumb a {
    color: #00c853;
    text-decoration: none;
    transition: color 0.2s ease;
}

.perfilmil-cart-page .perfilmil-breadcrumb a:hover {
    color: #00a644;
}

.perfilmil-cart-page .perfilmil-breadcrumb i {
    font-size: 12px;
}

/* Header do Carrinho */
.perfilmil-cart-header {
    margin-bottom: 32px;
}

.perfilmil-cart-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.perfilmil-cart-title i {
    color: #00c853;
}

.perfilmil-cart-subtitle {
    font-size: 1rem;
    color: #718096;
    margin: 0;
}

/* ===== CARRINHO VAZIO ===== */
.perfilmil-empty-cart {
    background: white;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.empty-cart-icon {
    font-size: 80px;
    color: #cbd5e0;
    margin-bottom: 24px;
}

.perfilmil-empty-cart h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 12px 0;
}

.perfilmil-empty-cart p {
    font-size: 1rem;
    color: #718096;
    margin: 0 0 32px 0;
}

/* ===== LAYOUT DO CARRINHO ===== */
.perfilmil-cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
}

/* ===== LISTA DE PRODUTOS ===== */
.perfilmil-cart-items {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Cabeçalho da Tabela */
.perfilmil-cart-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1fr 60px;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    font-size: 14px;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Lista de Itens */
.perfilmil-cart-items-list {
    margin: 0;
}

/* Item do Carrinho */
.perfilmil-cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1fr 60px;
    gap: 16px;
    padding: 24px 0;
    border-bottom: 1px solid #e2e8f0;
    align-items: center;
}

.perfilmil-cart-item:last-child {
    border-bottom: none;
}

/* Produto */
.cart-item-product {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.cart-item-title a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cart-item-title a:hover {
    color: #00c853;
}

.cart-item-sku {
    font-size: 13px;
    color: #a0aec0;
    margin: 0 0 8px 0;
}

.cart-item-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 6px;
}

.cart-item-stock.in-stock {
    background: #d4edda;
    color: #155724;
}

.cart-item-stock.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

/* Preço */
.cart-item-price {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

/* Quantidade */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

.qty-btn {
    background: #f7fafc;
    border: none;
    padding: 10px 14px;
    cursor: pointer;
    color: #4a5568;
    transition: all 0.2s ease;
    font-size: 14px;
}

.qty-btn:hover {
    background: #00c853;
    color: white;
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-input {
    border: none;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    width: 60px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    padding: 10px 8px;
}

.qty-input:focus {
    outline: none;
}

/* Remove spinners do input number */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input[type=number] {
    -moz-appearance: textfield;
}

/* Total do Item */
.cart-item-total {
    font-size: 20px;
    font-weight: 700;
    color: #00c853;
}

/* Remover */
.remove-item-btn {
    background: #fee;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    color: #e53e3e;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.remove-item-btn:hover {
    background: #e53e3e;
    color: white;
    transform: scale(1.1);
}

/* Ações do Carrinho */
.perfilmil-cart-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #e2e8f0;
}

/* ===== RESUMO DO CARRINHO ===== */
.perfilmil-cart-summary {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cart-summary-box {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
}

.summary-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-title i {
    color: #00c853;
}

/* Cupom */
.cart-coupon-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.coupon-input-group {
    display: flex;
    gap: 8px;
}

.coupon-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.coupon-input:focus {
    outline: none;
    border-color: #00c853;
}

.applied-coupons {
    margin-top: 12px;
}

.applied-coupon {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #00c853, #00a644);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.applied-coupon i {
    font-size: 14px;
}

.remove-coupon {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.remove-coupon:hover {
    background: rgba(255,255,255,0.3);
}

/* Totais */
.cart-totals {
    margin-bottom: 20px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 15px;
    color: #4a5568;
}

.cart-total-row.discount {
    color: #00c853;
}

.discount-value {
    color: #00c853;
}

.cart-total-row.total-row {
    border-top: 2px solid #e2e8f0;
    padding-top: 16px;
    margin-top: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
}

.total-value {
    font-size: 24px;
    color: #00c853;
}

/* Informações de Segurança */
.cart-security-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
    color: #4a5568;
}

.security-item i {
    color: #00c853;
    font-size: 16px;
}

/* Cross-sells */
.cart-cross-sells {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cross-sells-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cross-sells-title i {
    color: #00c853;
}

.cross-sells-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cross-sell-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.cross-sell-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #00c853;
}

.cross-sell-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.cross-sell-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cross-sell-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cross-sell-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    line-height: 1.3;
}

.cross-sell-price {
    font-size: 15px;
    font-weight: 700;
    color: #00c853;
    margin: 0;
}

/* ===== BOTÕES ===== */
.perfilmil-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.perfilmil-btn-primary {
    background: linear-gradient(135deg, #00c853, #00a644);
    color: white;
    box-shadow: 0 4px 12px rgba(0,200,83,0.3);
}

.perfilmil-btn-primary:hover {
    background: linear-gradient(135deg, #00a644, #008a37);
    box-shadow: 0 6px 16px rgba(0,200,83,0.4);
    transform: translateY(-2px);
    color: white;
}

.perfilmil-btn-secondary {
    background: #f7fafc;
    color: #2d3748;
    border: 2px solid #e2e8f0;
}

.perfilmil-btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e0;
}

.perfilmil-btn-outline {
    background: transparent;
    color: #e53e3e;
    border: 2px solid #e53e3e;
}

.perfilmil-btn-outline:hover {
    background: #e53e3e;
    color: white;
}

.perfilmil-btn-block {
    width: 100%;
}

.perfilmil-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 1024px) {
    .perfilmil-cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary-box {
        position: static;
    }

    .perfilmil-cart-table-header {
        display: none;
    }

    .perfilmil-cart-item {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px;
        background: #f7fafc;
        border-radius: 12px;
        margin-bottom: 16px;
        border: none;
    }

    .cart-item-product {
        flex-direction: column;
    }

    .cart-item-image {
        width: 100%;
        height: 200px;
    }

    .cart-item-price::before {
        content: "Preço: ";
        font-weight: 400;
        color: #718096;
    }

    .cart-item-total::before {
        content: "Total: ";
        font-weight: 400;
        color: #718096;
    }

    .quantity-controls {
        width: 100%;
        justify-content: center;
    }

    .remove-item-btn {
        width: 100%;
        height: 48px;
        border-radius: 8px;
    }
}

@media (max-width: 768px) {
    .perfilmil-cart-page {
        padding: 20px 0;
    }

    .perfilmil-cart-title {
        font-size: 1.5rem;
    }

    .perfilmil-cart-items,
    .cart-summary-box,
    .cart-cross-sells {
        padding: 16px;
    }

    .perfilmil-cart-actions {
        flex-direction: column;
    }

    .perfilmil-cart-actions .perfilmil-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cart-item-image {
        height: 150px;
    }

    .coupon-input-group {
        flex-direction: column;
    }

    .coupon-input-group .perfilmil-btn {
        width: 100%;
    }
}
